Detail logs here: https://gist.github.com/2158975
[sajia@211 temp]$ export JAVA_OPTS='-javaagent:/home/sajia/sdk/btrace/build/btrace-agent.jar=script=TraceSystemGCCall.class,debug=true,scriptOutputFile=/home/sajia/temp/mybtrace.log'
[sajia@211 temp]$ groovysh
btrace DEBUG: debugMode is true
btrace DEBUG: scriptOutputFile is /home/sajia/temp/mybtrace.log
btrace DEBUG: unsafeMode is false
btrace DEBUG: dumpClasses is false
btrace DEBUG: stdout is false
btrace DEBUG: probe descriptor path is .
btrace DEBUG: initial script is TraceSystemGCCall.class
btrace DEBUG: verifying BTrace class
btrace DEBUG: verified 'TraceSystemGCCall' successfully
btrace DEBUG: created class filter
btrace DEBUG: preprocessing BTrace class TraceSystemGCCall
btrace DEBUG: preprocessed BTrace class TraceSystemGCCall
btrace DEBUG: creating BTraceRuntime instance for TraceSystemGCCall
btrace DEBUG: created BTraceRuntime instance for TraceSystemGCCall
btrace DEBUG: removing @OnMethod, @OnProbe methods
btrace DEBUG: removed @OnMethod, @OnProbe methods
btrace DEBUG: sending Okay command
btrace DEBUG: client TraceSystemGCCall: got com.sun.btrace.comm.OkayCommand@22c84d9
btrace DEBUG: about to defineClass TraceSystemGCCall
btrace DEBUG: defineClass succeeded for TraceSystemGCCall
btrace DEBUG: parsed command line arguments
btrace DEBUG: new Client created com.sun.btrace.agent.FileClient@268b819f
btrace DEBUG: skipping transform for BTrace class com/sun/btrace/agent/Main$3
btrace DEBUG: starting agent thread
btrace DEBUG: starting server at 2020
btrace DEBUG: filtering loaded classes
btrace DEBUG: client TraceSystemGCCall: instrumenting java/util/Collections$EmptySet$1
btrace DEBUG: client TraceSystemGCCall: instrumenting java/net/ServerSocket
jstack -l
Found one Java-level deadlock:
=============================
"Thread-1":
waiting to lock monitor 0x00002aaab40f2678 (object 0x0000000604343e40, a <unknown>),
which is held by "pool-1-thread-1"
"pool-1-thread-1":
waiting to lock monitor 0x000000005e7f88e0 (object 0x000000075862d060, a sun.misc.Launcher$AppClassLoader),
which is held by "Thread-1"
Java stack information for the threads listed above:
===================================================
"Thread-1":
at com.sun.btrace.agent.Client.instrument(Client.java:373)
at com.sun.btrace.agent.Client.doTransform(Client.java:195)
at com.sun.btrace.agent.Client.transform(Client.java:155)
at sun.instrument.TransformerManager.transform(TransformerManager.java:169)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365)
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:926)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
- locked <0x00000007586261b0> (a sun.misc.Launcher$ExtClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
- locked <0x000000075862d060> (a sun.misc.Launcher$AppClassLoader)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
- locked <0x000000075862d060> (a sun.misc.Launcher$AppClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at com.sun.btrace.agent.Main.startServer(Main.java:368)
at com.sun.btrace.agent.Main.access$000(Main.java:65)
at com.sun.btrace.agent.Main$3.run(Main.java:166)
at java.lang.Thread.run(Thread.java:662)
"pool-1-thread-1":
at com.sun.btrace.agent.Client.instrument(Client.java:373)
at com.sun.btrace.agent.Client.doTransform(Client.java:195)
at com.sun.btrace.agent.Client.transform(Client.java:155)
at sun.instrument.TransformerManager.transform(TransformerManager.java:169)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365)
at java.util.Collections$EmptySet.iterator(Collections.java:2907)
at java.lang.Class.initAnnotationsIfNecessary(Class.java:3078)
- locked <0x00000006040308d8> (a java.lang.Class for java.lang.System)
at java.lang.Class.getAnnotation(Class.java:3029)
at com.sun.btrace.runtime.ClassFilter.isCandidate(ClassFilter.java:83)
at com.sun.btrace.agent.Client.isCandidate(Client.java:315)
at com.sun.btrace.agent.Main$4.run(Main.java:416)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Found 1 deadlock.