Java thread dump: blocked thread does not have “wait lock…”
It is difficult for me to understand the thread dump obtained from jstack for spring MVC web applications running on Tomcat 6 (Java 1.6.0_22, Linux)
I see blocked threads (causing other threads to wait). These threads automatically block, but the thread dump doesn't tell me why or which monitor I'm waiting for
Example:
"TP-Processor75" daemon prio=10 tid=0x00007f3e88448800 nid=0x56f5 waiting for monitor entry [0x00000000472bc000] java.lang.Thread.State: BLOCKED (on object monitor) at java.lang.Class.initAnnotationsIfNecessary(Class.java:3067) - locked <0x00007f3e9a0b3830> (a java.lang.Class for org.catapultframework.resource.ResourceObject) at java.lang.Class.getAnnotation(Class.java:3029) ...
That is, I missed the "wait for lock..." line in the stack trace Obviously, the thread locks a class object, but I don't understand why the thread itself is blocked
The thread dump does not contain any deadlock hints
What can I do to identify the lock monitor?
Thank you, Oliver
Solution
Obviously, we observed that this thread blocking condition is related to a large amount of memory consumption, so there is a large amount of garbage collection
Java blocking issue: why would JVM block threads in many different classes / methods? Describes a similar situation, so I believe these threads are simply blocked by the garbage collector
(in any case, after solving the memory problem, the problem of blocking threads disappears.)