"2"#13 prio=5 os_prio=0 tid=0x00000000202b9800 nid=0x3d60 waiting for monitor entry [0x0000000020c2f000] java.lang.Thread.State: BLOCKED (on object monitor) at org.zhenchao.jvm.DeadLock.lambda$main$1(DeadLock.java:32) - waiting to lock <0x000000076be2a648> (a org.zhenchao.jvm.DeadLock$A) - locked <0x000000076be2c9e8> (a org.zhenchao.jvm.DeadLock$B) at org.zhenchao.jvm.DeadLock$$Lambda$2/999966131.run(Unknown Source) at java.lang.Thread.run(Thread.java:748)
"1"#12 prio=5 os_prio=0 tid=0x00000000202b9000 nid=0x10dc waiting for monitor entry [0x0000000020b2f000] java.lang.Thread.State: BLOCKED (on object monitor) at org.zhenchao.jvm.DeadLock.lambda$main$0(DeadLock.java:23) - waiting to lock <0x000000076be2c9e8> (a org.zhenchao.jvm.DeadLock$B) - locked <0x000000076be2a648> (a org.zhenchao.jvm.DeadLock$A) at org.zhenchao.jvm.DeadLock$$Lambda$1/2093631819.run(Unknown Source) at java.lang.Thread.run(Thread.java:748)
"Monitor Ctrl-Break"#6 daemon prio=5 os_prio=0 tid=0x000000001e6b5000 nid=0x3120 runnable [0x000000001fc2e000] java.lang.Thread.State: RUNNABLE at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) at java.net.SocketInputStream.read(SocketInputStream.java:171) at java.net.SocketInputStream.read(SocketInputStream.java:141) at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178) - locked <0x000000076bd049c0> (a java.io.InputStreamReader) at java.io.InputStreamReader.read(InputStreamReader.java:184) at java.io.BufferedReader.fill(BufferedReader.java:161) at java.io.BufferedReader.readLine(BufferedReader.java:324) - locked <0x000000076bd049c0> (a java.io.InputStreamReader) at java.io.BufferedReader.readLine(BufferedReader.java:389) at com.intellij.rt.execution.application.AppMainV2$1.run(AppMainV2.java:64)
"Finalizer"#3 daemon prio=8 os_prio=1 tid=0x000000001cf13000 nid=0x3ec4 in Object.wait() [0x000000001f92f000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x000000076bb88ee0> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144) - locked <0x000000076bb88ee0> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:216)
"Reference Handler"#2 daemon prio=10 os_prio=2 tid=0x000000001e5d3000 nid=0x25a0 in Object.wait() [0x000000001f82e000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x000000076bb86c00> (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Object.java:502) at java.lang.ref.Reference.tryHandlePending(Reference.java:191) - locked <0x000000076bb86c00> (a java.lang.ref.Reference$Lock) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)
"VM Periodic Task Thread" os_prio=2 tid=0x000000001e77c800 nid=0x15c0 waiting on condition
JNI global references: 316
Found one Java-level deadlock: ============================= "2": waiting to lock monitor 0x000000001cf12688 (object 0x000000076be2a648, a org.zhenchao.jvm.DeadLock$A), which is held by "1" "1": waiting to lock monitor 0x000000001cf111e8 (object 0x000000076be2c9e8, a org.zhenchao.jvm.DeadLock$B), which is held by "2"
Java stack information for the threads listed above: =================================================== "2": at org.zhenchao.jvm.DeadLock.lambda$main$1(DeadLock.java:32) - waiting to lock <0x000000076be2a648> (a org.zhenchao.jvm.DeadLock$A) - locked <0x000000076be2c9e8> (a org.zhenchao.jvm.DeadLock$B) at org.zhenchao.jvm.DeadLock$$Lambda$2/999966131.run(Unknown Source) at java.lang.Thread.run(Thread.java:748) "1": at org.zhenchao.jvm.DeadLock.lambda$main$0(DeadLock.java:23) - waiting to lock <0x000000076be2c9e8> (a org.zhenchao.jvm.DeadLock$B) - locked <0x000000076be2a648> (a org.zhenchao.jvm.DeadLock$A) at org.zhenchao.jvm.DeadLock$$Lambda$1/2093631819.run(Unknown Source) at java.lang.Thread.run(Thread.java:748)