"pool-1-thread-1" #10 prio=5 os_prio=0 tid=0x00000000585ff800 nid=0x40c in Object.wait() [0x00000000590cf000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000d61e0e60> (a jstack.Demo2$1) at java.lang.Object.wait(Unknown Source) at jstack.Demo2$1.run(Demo2.java:14) - locked <0x00000000d61e0e60> (a jstack.Demo2$1) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
"Thread-1"#11 prio=5 os_prio=0 tid=0x0000000058716800 nid=0xf30 waiting for monitor entry [0x00000000596ee000] java.lang.Thread.State:BLOCKED (on object monitor) atjstack.DeadLockThreadDemo.run(DeadLockThreadDemo.java:24) - waiting to lock <0x00000000d6257f40> (a java.lang.Object) - locked <0x00000000d6257f50> (a java.lang.Object)
"Thread-0"#10 prio=5 os_prio=0 tid=0x0000000058716000 nid=0x12e0 waiting for monitor entry [0x000000005945f000] java.lang.Thread.State:BLOCKED (on object monitor) atjstack.DeadLockThreadDemo.run(DeadLockThreadDemo.java:24) - waiting to lock <0x00000000d6257f50> (a java.lang.Object) - locked <0x00000000d6257f40> (a java.lang.Object)
Found one Java-level deadlock: ============================= "Thread-1": waiting to lock monitor 0x0000000057095ce8 (object 0x00000000d6257f40, a java.lang.Object), which is held by "Thread-0" "Thread-0": waiting to lock monitor 0x0000000057098628 (object 0x00000000d6257f50, a java.lang.Object), which is held by "Thread-1"
Java stack information for the threads listed above: =================================================== "Thread-1": atjstack.DeadLockThreadDemo.run(DeadLockThreadDemo.java:24) - waiting to lock <0x00000000d6257f40> (a java.lang.Object) - locked <0x00000000d6257f50> (a java.lang.Object) "Thread-0": atjstack.DeadLockThreadDemo.run(DeadLockThreadDemo.java:24) - waiting to lock <0x00000000d6257f50> (a java.lang.Object) - locked <0x00000000d6257f40> (a java.lang.Object)
"main" #1 prio=5 os_prio=0 tid=0x000000000220e000 nid=0x890 runnable [0x00000000024de000] java.lang.Thread.State: RUNNABLE at java.io.FileInputStream.readBytes(Native Method) at java.io.FileInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) - locked <0x00000000d61597e0> (a java.io.BufferedInputStream) at jstack.Demo4.main(Demo4.java:7)