问题
My thread TP-Processor27
is waiting, tells me a thread dump.
Usually WAITING (on object monitor)
lines are immediately followed by a waiting on <0x09c34480>
or similar line. But not in the dump below. In such cases, can I know on which id is the wait?
"TP-Processor27" daemon prio=10 tid=0x00002aab91c88800 nid=0x58d7 in Object.wait() [0x0000000050d01000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1104)
- locked <0x00002aaaccce0150> (a org.apache.commons.pool.impl.GenericObjectPool$Latch)
at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:88)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:115)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1053)
[...]
"TP-Processor28" daemon prio=10 tid=0x00002aab91c8a000 nid=0x58d8 runnable [0x0000000050e03000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
[...]
回答1:
It seems that I saw a problem where there is actually no problem.
来源:https://stackoverflow.com/questions/11827186/java-thread-dump-waiting-on-object-monitor-line-not-followed-by-waiting-on