How to get Common Agent Container/detached jvm dump
One of the frequently asked question is : My Jvm just crash but I cannot find any core dump of log.
All this may depend on host and/or Jvm configuration. The Common Agent Container is a service and
then run in background. It is not as easy as with console application to get any traces.
There are several methods I've used, here they are, just pick the one you prefer (some are not working on all jdks).
Using the fault probe of the Proc provider you can print the stack trace each time the jvm
triggers one. I've wrote a small DTrace script that you can use. For all running Jvms it will
print output like the following on case of failure. In that example I've hacked a jni call to trigger
a segmentation fault. (get the script)
[java: 4213/ 2] experiencing fault <address not mapped to object>, signal 11
libc.so.1`0xff1c5a70
libc.so.1`0xff2103ec
Interpreter
com/sun/cacao/agent/auth/UserPrincipal.internalGetUid(Ljava/lang/String;)I
com/sun/cacao/agent/auth/UserPrincipal.internalGetUid(Ljava/lang/String;)I
com/sun/cacao/agent/auth/UserPrincipal.getUid()I
com/sun/cacao/agent/auth/AssertMechanism.createSubject(Ljava/lang/String;Z)Ljavax/security/auth/Subject;
com/sun/cacao/container/impl/ContainerPrivate.internalStart(Ljava/lang/String;)V
com/sun/cacao/container/impl/ContainerPrivate.start(Ljava/lang/String;Ljava/lang/String;)V
com/sun/cacao/container/impl/ContainerPrivate.main([Ljava/lang/String;)V
StubRoutines (1)
libjvm.so`__1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_+0x1e4
libjvm.so`jni_CallStaticVoidMethod+0x4b8
java`0x13a4c
libc.so.1`0xff245e28
unix`trap_cleanup+0x24
unix`trap+0x1b84
unix`utl0+0x4c
Posted at 07:24PM févr. 05, 2008 by ejannett in Common Agent Container FAQ | Comments[0]
Today's Page Hits: 21