I'm very much new in the world of java. Recently I faced a problem in which a java application hang due to some issue. When I make a thread dump & I found that this particular thread making hundred thousands of blocked count.
"Thread-1" #12 daemon prio=5 os_prio=0 tid=0x0000000018392800 nid=0x2de0 waiting on condition [0x0000000018ece000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000a1da8db8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:492)
at com.sun.glass.ui.InvokeLaterDispatcher.run(InvokeLaterDispatcher.java:108)
Locked ownable synchronizers:
- None
& after sometimes the application hang & the thread changes to -
"Thread-1" #12 daemon prio=5 os_prio=0 tid=0x0000000018392800 nid=0x2de0 in Object.wait() [0x0000000018ece000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at com.sun.glass.ui.InvokeLaterDispatcher.run(InvokeLaterDispatcher.java:126)
- locked <0x00000000a1d65960> (a java.lang.StringBuilder)
Locked ownable synchronizers:
- None
As it's a compiled jar file & I don't know every aspects of java to search for this particulater thread. Is it possible to make an external class file to stop or kill this thread of execution to stop application hang.