Automatic deadlock detection

Thread deadlocks can be very hard to debug. To help you in this, the ThreadAnalyzer provides information on threads holding locks and threads waiting on locks. The Deadlock Detection Report is displayed when one or more deadlocks are detected as shown in Figure 16-29.

Figure 16-29 ThreadAnalyzer - Overall Monitor Analysis and Deadlock Detection Report

Deadlock information is displayed differently between AIX, Windows, Linux, zLinux, HP, and Solaris. The output format for AIX, Windows, Linux, and zLinux is shown in Example 16-6.

Example 16-6 Deadlock Detection Report: Output format for AIX, Windows, Linux, and zLinux

Overall monitor analysis 

Deadlock Detection Report
------------------------ 

The following threads appear to be in a circular deadlock.
Further information can be found by looking in the Overall Thread Analysis
section of this tool. 

Multi-threaded deadlock 1: 

"inst: 0 - thd:0" of (sys:0x136AFC68) (TID:0x4D3F3E0)
       Holding Resource: java.lang.Object@4D517F0/4D517F8
       Thread Waiting: "inst: 0 - thd:4" (sys:0x136B1030) (TID:0x4D3F2A0) 

The first line shows the thread named inst: 0 - thd:0 with thread identification numbers sys:0x136AFC68 and TID: 0x4D3F3E0. The next line shows that the thread inst: 0 - thd:0 is holding the resource called java.lang.Object@4D517F0/4D517F8. The following lines show that thread inst: 0 - thd:4 with thread identification numbers sys:0x136B1030 and TID:0x4D3F2A0 is waiting for the resource java.lang.Object@4D517F0/4D517F8.

The output format for HP and Solaris is shown in Example 16-7.

Example 16-7 Deadlock Detection Report: Output format for HP and Solaris

FOUND A JAVA LEVEL DEADLOCK:
----------------------------
"Servlet.Engine.Transports : 3":
  waiting to lock monitor 0xbc360 (object 0xea3383c8, a java.lang.Object),
  which is locked by "Servlet.Engine.Transports : 0"

The first line shows that the thread Servlet.Engine.Transports : 3 is waiting for the thread Servlet.Engine.Transports : 0 to release the lock on the monitor (object 0xea3383c8, a java.lang.Object). In order to further analyze the cause of the deadlock, look for the thread's stack trace in the Overall Thread Analysis. The methods in the stack trace can be correlated to the source code in most cases.

  Prev | Home | Next

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.