1. 程式人生 > >發生死鎖的執行緒dump日誌

發生死鎖的執行緒dump日誌

注意日誌裡面的紅色加粗的日誌



"Thread-1" prio=6 tid=0x000000000d3d3000 nid=0x3414 waiting for monitor entry [0x000000000cc5f000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at Deadlocker$Thread2.run(Deadlocker.java:37)
- waiting to lock <0x00000007d5d9b500> (a [I)
- locked <0x00000007d5d9b518> (a [I)



   Locked ownable synchronizers:
- None


"Thread-0" prio=6 tid=0x000000000d3d0000 nid=0x30cc waiting for monitor entry [0x000000000db9f000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at Deadlocker$Thread1.run(Deadlocker.java:18)
- waiting to lock <0x00000007d5d9b518> (a [I)
- locked <0x00000007d5d9b500> (a [I)



   Locked ownable synchronizers:
- None



Found one Java-level deadlock:
=============================
"Thread-1":
  waiting to lock monitor 0x000000000b813448 (object 0x00000007d5d9b500, a [I),
  which is held by "Thread-0"
"Thread-0":
  waiting to lock monitor 0x000000000b814628 (object 0x00000007d5d9b518, a [I),
  which is held by "Thread-1"


Java stack information for the threads listed above:
===================================================
"Thread-1":
at Deadlocker$Thread2.run(Deadlocker.java:37)
- waiting to lock
<0x00000007d5d9b500> (a [I)
- locked <0x00000007d5d9b518> (a [I)
"Thread-0":
at Deadlocker$Thread1.run(Deadlocker.java:18)
- waiting to lock<0x00000007d5d9b518> (a [I)
- locked <0x00000007d5d9b500> (a [I)


Found 1 deadlock.