The attached program is using jstack to detect the deadlock, but it failed with the following exception:
sun.jvm.hotspot.types.WrongTypeException
at sun.jvm.hotspot.types.basic.BasicField.getAddress(BasicField.java:246)
at sun.jvm.hotspot.types.basic.BasicAddressFieldWrapper.getValue(BasicAddressFieldWrapper.java:48)
at sun.jvm.hotspot.runtime.JavaThread.getStackBase(JavaThread.java:320)
at sun.jvm.hotspot.runtime.JavaThread.isLockOwned(JavaThread.java:368)
at sun.jvm.hotspot.runtime.Threads.owningThreadFromMonitor(Threads.java:168)
at sun.jvm.hotspot.runtime.Threads.owningThreadFromMonitor(Threads.java:175)
at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:90)
at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:39)
at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:52)
at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
at sun.jvm.hotspot.tools.JStack.run(JStack.java:60)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
at sun.jvm.hotspot.tools.JStack.main(JStack.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:623)
at sun.tools.jstack.JStack.runJStackTool(JStack.java:136)
at sun.tools.jstack.JStack.main(JStack.java:102)