I have accessed thread-dump of a staging web-server which has multiple threads waiting on different objects. One Timer thread has access to 0x13e30613 object and waiting on 0x2fa1056c.
"Timer-17637" prio=5 tid=0x75e4 nid=0xffffffff in Object.wait()
java.lang.Thread.State: WAITING (on object monitor)
at java.base@11.0.8/jdk.internal.misc.Unsafe.park(Native Method)
- waiting to lock <0x2fa1056c> (a java.util.concurrent.CountDownLatch$Sync) owned by "null" tid=0x-1
at java.base@11.0.8/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
.....
.....
- locked <0x13e30613> (a java.lang.Object)
at java.base@11.0.8/java.util.TimerThread.mainLoop(Timer.java:556)
at java.base@11.0.8/java.util.TimerThread.run(Timer.java:506)
But the thread-does not mention which thread has locked 0x2fa1056c object. No other thread-stack mentions anything about 0x2fa1056c object. Most of the other threads are waiting on 0x13e30613 object held by the Timer thread which is causing a deadlock like situation. How do I figure out which thread owns the 0x2fa1056c object ?
EDITED: Gist containing the logs https://gist.github.com/riteshksriv/3b249eb56e0500a9234cd2470152d730
User contributions licensed under CC BY-SA 3.0