|
public class ParseJStack { |
- exception with dead-lock info with jstack -l
"GC task thread#9 (ParallelGC)" os_prio=31 tid=0x00007fb63e01a800 nid=0x5203 runnable
"VM Periodic Task Thread" os_prio=31 tid=0x00007fb63f81a800 nid=0x7403 waiting on condition
JNI global references: 15
Found one Java-level deadlock:
=============================
"Thread-1":
waiting to lock monitor 0x00007fb63f8162e8 (object 0x000000076ac1bc98, a java.lang.String),
which is held by "Thread-0"
"Thread-0":
waiting to lock monitor 0x00007fb63f815528 (object 0x000000076ac1bcc8, a java.lang.String),
which is held by "Thread-1"
Java stack information for the threads listed above:
===================================================
"Thread-1":
at com.alibaba.jstacktest.DeadLockSyncTest$LockB.run(DeadLockSyncTest.java:42)
- waiting to lock <0x000000076ac1bc98> (a java.lang.String)
- locked <0x000000076ac1bcc8> (a java.lang.String)
at java.lang.Thread.run(Thread.java:750)
"Thread-0":
at com.alibaba.jstacktest.DeadLockSyncTest$LockA.run(DeadLockSyncTest.java:23)
- waiting to lock <0x000000076ac1bcc8> (a java.lang.String)
- locked <0x000000076ac1bc98> (a java.lang.String)
at java.lang.Thread.run(Thread.java:750)
Found 1 deadlock.
- not exclude socketWrite0 from running Threads
- should not skip fixed lines except running, becasue we already know of stack from classification
|
jsp.insertJavaMethod(waitingThreads, 2); |
|
jsp.insertJavaMethod(sleepingThreads, 2); |
|
jsp.insertJavaMethod(waitingThreads, 2); |
- if top of jstack is not jdk inner method, should skip it
|
private void skipJavaClasses() throws IOException { |
- missing io write classification
- missing some important top of stack about net work write read。like PlainDatagramSocketImpl.receive0, PlainDatagramSocketImpl.send0 etc.
Reactions are currently unavailable
JavaPerformanceTuning/FirstEdition/JStack/src/net/sdo/ParseJStack.java
Line 27 in 49d6b37
JavaPerformanceTuning/FirstEdition/JStack/src/net/sdo/ParseJStack.java
Line 263 in 49d6b37
JavaPerformanceTuning/FirstEdition/JStack/src/net/sdo/ParseJStack.java
Line 269 in 49d6b37
JavaPerformanceTuning/FirstEdition/JStack/src/net/sdo/ParseJStack.java
Line 282 in 49d6b37
JavaPerformanceTuning/FirstEdition/JStack/src/net/sdo/ParseJStack.java
Line 187 in 49d6b37