Skip to main content

Extended JIT debugging

7 replies [Last post]
krokodile
Offline
Joined: 2008-08-03
Points: 0

We are using CDC on mips with JIT under linux. We faced with CDC crash in case of enabled JIT. Im wondering - is it possible to turn on some CDC build switches (like JIT_DEBUG=yes) to see which java object or class causes problem? i'd like to see human readeable object name that causes the crash.

Some addtional info: for now it seems that problem is caused by incorrect translation to MIPS command set. Crash happends in CVMprivate_cpExtractTypeIDFromUnresolvedEntry when CVMcpGetMemberRefTypeIDIdx statement is executed (due to incorrect param - it is out of possible enumeration range )/

So how to know which java object or method causes the crash ?
Thanks in advance.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
krokodile
Offline
Joined: 2008-08-03
Points: 0

one more suspection - is it possible that CVM's JIT conflicts with Java compiler that is used for application?
Now we are using javac from java 1.6 with option target=1.4 and source=1.4

cjplummer
Offline
Joined: 2006-10-16
Points: 0

It's possible, but I would say not likely. We typically use 1.4.2, but I have on occasion used 1.6. I would suggest you try 1.4.2 just to make sure 1.6 isn't the problem.

cjplummer
Offline
Joined: 2006-10-16
Points: 0

I doubt this involves a java object. Start by building with CVM_DEBUG=true. Then when it crashes use gdb to get a C backtrace and also get the value of any local variables of interested. Run with -Xjit:trace=status so you can see which methods are getting compiled.

Also, are you using the latest cdc source from the svn trunk and can you provide a testcase?

Chris

krokodile
Offline
Joined: 2008-08-03
Points: 0

thanks for support.

we tried to attach gdb, but it cant show source source due to unknown reason, now we are cheking this. We'll try to use trace=status option - i'll publish resullts asap.

Regarding test case - im not sure it is possible. We running cvm on set-top-box device, thus specific environment cannot be supplied with testcase.

cjplummer
Offline
Joined: 2006-10-16
Points: 0

trace=status probably isn't going to be of much help until you can also do some gdb debugging and provide details on why it is crashing.

krokodile
Offline
Joined: 2008-08-03
Points: 0

Now we merged with latest cdc sources (from svn) and Xjit:trace is available. Now i have following quesion - before crash i see some methods under instrumentation - is it possible to say that last instrumented method causes the crash or it is impossible to say with sure?

cjplummer
Offline
Joined: 2006-10-16
Points: 0

> Now we merged with latest cdc sources (from svn) and
> Xjit:trace is available. Now i have following quesion
> - before crash i see some methods under
> instrumentation - is it possible to say that last
> instrumented method causes the crash or it is
> impossible to say with sure?

If it started compilation of the method and didn't complete it, then the method being compiled is likely the cause. However, in order to really understand the problem and do a proper fix you are going to need gdb debugging. By just knowing which method results in the crash, the best you can hope for is to hide the bug by changing the method, which just means it can pop up elsewhere.