You can examine the deadlock-detection experiment with either the tha command, the analyzer command, or the er_print utility. Both the Thread Analyzer
and
the Analyzer
present a GUI interface while er_print
employes a command-line interface.
See tha.1, analyzer.1, and er_print.1 for more information.
The Thread Analyzer includes a menu bar, a tool bar, and a split pane that contains tabs for the various displays. The following three tabs are shown by default in the left-hand pane:
The Deadlocks tab
This tab shows a list of potential and actual deadlocks that the Thread Analyzer detected in the program. This tab is selected by default. The threads involved for each deadlock are shown. These threads form a circular chain where each thread holds a lock and requests another lock that the next thread in the chain holds.
The Dual Source tab
Select a thread in the circular chain and then click on the Dual Source tab. The Dual Source tab shows the source location where the thread held a lock, and the source location where the same thread requested a lock. The source lines where the thread held and requested locks are highlighted.
The Experiments tab
This tab shows the load objects in the experiment, and lists any error and warning messages. The following two tabs are shown on the right-hand pane of the Thread Analyzer display:
The Summary tab which shows summary information about a deadlock selected from the Deadlocks tab.
The Deadlock Details tab which shows detailed information about a thread context selected from the Deadlocks tab.
er_print
InterfaceIn contrast to the left-hand pane, the right-hand pane contains the
Deadlock Details tab which shows detailed information for the selected thread
in the Deadlocks tab. The most useful subcommands for examining deadlocks
with er_print
are the following:
-deadlocks
The option reports any potential and actual deadlocks detected in the experiment.
-ddetail deadlock_id
This option
returns detailed information about the deadlock with the specified deadlock_id. If you specify the value all as the deadlock_id, then er_print
displays detailed information
about all deadlocks.
-header
This option displays descriptive information about the experiment and reports any errors or warnings.
See er_print.1 for more information.