分析 Java 进程的线程转储
2022-09-04 22:12:09
我有基于Java EE的应用程序在tomcat上运行,我看到应用程序在运行几个小时后突然挂起。
我在应用程序挂起之前从应用程序中收集了线程转储,并将其放入TDA中进行分析:
TDA(线程转储分析器)为上述监视器提供以下消息:
A lot of threads are waiting for this monitor to become available again.
This might indicate a congestion. You also should analyze other locks
blocked by threads waiting for this monitor as there might be much more
threads waiting for it.
下面是上面突出显示的线程的堆栈跟踪:
"MY_THREAD" prio=10 tid=0x00007f97f1918800 nid=0x776a
waiting for monitor entry [0x00007f9819560000]
java.lang.Thread.State: BLOCKED (on object monitor)
at java.util.Hashtable.get(Hashtable.java:356)
- locked <0x0000000680038b68> (a java.util.Properties)
at java.util.Properties.getProperty(Properties.java:951)
at java.lang.System.getProperty(System.java:709)
at com.MyClass.myMethod(MyClass.java:344)
我想知道状态是什么意思?也将不胜感激任何指针来帮助我调试此问题。"waiting for monitor entry"