C:\Program Files\Java\jdk1.8.0_121\bin>jps -m
15524
15432 Launcher D:/download/IntelliJ IDEA 2018.1.1/lib/forms_rt.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/commons-codec-1.9.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/jna.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/jna-platform.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/idea_rt.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/commons-logging-1.2.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/jdom.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/aether-dependency-resolver.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/util.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/aether-1.1.0-all.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/maven-aether-provider-3.3.9-all.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/javac2.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/platform-api.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/oro-2.0.8.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/log4j.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/slf4j-api-1.7.10.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/snappy-in-java-0.5.1.jar;D:/download/IntelliJ IDEA
18504 Launcher D:/download/IntelliJ IDEA 2018.1.1/lib/forms_rt.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/commons-codec-1.9.jar;D:/download/IntelliJ IDEA 2018.1.1/lib/jna.jar;D:/download/IntelliJ IDEA
...
...
3592 Jps -m
20300 UserApiApp
C:\Program Files\Java\jdk1.8.0_121\bin>jstack 17416
...
...
"http-nio-8181-exec-9" #74 daemon prio=5 os_prio=0 tid=0x000000001fc42000 nid=0x33c8 waiting on condition [0x0000000022fbe000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x000000079107a370> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:103)
at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:31)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Locked ownable synchronizers:
- None
...
...
Found one Java-level deadlock:
=============================
"正在等待的线程名称 t1"
waiting for ownable synchronizer 0x000000001fc40000, (a java.util.concurrent.locks.ReentrantLock$NonfairSync),
which is held by "持有死锁的线程名称 t2"
"正在等待的线程名称 t2"
waiting for ownable synchronizer 0x000000001fc48000, (a java.util.concurrent.locks.ReentrantLock$NonfairSync),
which is held by "持有死锁的线程名称 t1"
...
...
C:\Program Files\Java\jdk1.8.0_121\bin>jmap -clstats 20300
Attaching to process ID 20300, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.121-b13
finding class loader instances ..done.
computing per loader stat ..done.
please wait.. computing liveness..............................................................liveness analysis may be inaccurate ...
class_loader classes bytes parent_loader alive? type
<bootstrap> 2948 5125781 null live <internal>
0x0000000703933390 1 880 0x0000000701814b00 dead sun/reflect/DelegatingClassLoader@0x00000007c0009df8
0x0000000701ed4ee8 1 880 0x0000000701814b00 dead sun/reflect/DelegatingClassLoader@0x00000007c0009df8
0x0000000701b44ab8 1 1473 0x0000000701814b00 dead sun/reflect/DelegatingClassLoader@0x00000007c0009df8
0x0000000701ed47e0 1 880 0x0000000701814b00 dead sun/reflect/DelegatingClassLoader@0x00000007c0009df8
0x0000000701861f88 0 0 0x0000000701814b00 live java/util/ResourceBundle$RBClassLoader@0x00000007c00f5470
0x0000000701b44ea0 1 1473 0x0000000701814b00 dead sun/reflect/DelegatingClassLoader@0x00000007c0009df8
0x0000000701ed43f8 1 880 0x0000000701814b00 dead sun/reflect/DelegatingClassLoader@0x00000007c0009df8
0x0000000702bb43a0 1 1471 null dead sun/reflect/DelegatingClassLoader@0x00000007c0009df8
0x0000000703932c88 1 880 0x0000000701814b00 dead sun/reflect/DelegatingClassLoader@0x00000007c0009df8
...
...
total = 111 11286 19084340 N/A alive=8, dead=103 N/A
...
...
jmap -finalizerinfo <pid> 输出等待终结的对象信息
C:\Program Files\Java\jdk1.8.0_121\bin>jmap -finalizerinfo 20300
Attaching to process ID 20300, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.121-b13
Number of objects pending for finalization: 0