Oracle® Solaris Studio 12.4: Thread Analyzer User's Guide

Exit Print View

Updated: December 2014
 
 

Examine the Deadlock-Detection Experiment

You can examine a deadlock-detection experiment with Thread Analyzer, Performance Analyzer, or the er_print utility. Both Thread Analyzer and Performance Analyzer present a GUI interface; Thread Analyzer presents a simplified set of default views, but is otherwise identical to Performance Analyzer.

Using Thread Analyzer to View the Deadlock-Detection Experiment

To start Thread Analyzer and open the din_philo.1.er experiment , type the following command:

% tha din_philo.1.er

Thread Analyzer has a menu bar, a tool bar, and vertical navigation bar on the left that enables you to select data views.

    The following data views are shown by default when you open an experiment that was collected for deadlock detection:

  • Overview screen shows the metrics overview of the loaded experiments.

  • Deadlocks view shows a list of potential and actual deadlocks that Thread Analyzer detected in the program. This view 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.

    When you select a deadlock, the Deadlock Details window in the right panel shows detailed information about the threads involved.

  • Dual Source view 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. To display this view, select a thread in the circular chain on the Deadlocks view and then click on the Dual Source view.

  • Experiments view shows the load objects in the experiment and lists any error and warning messages.

You can choose to see other views with the More Views options menu.

Using er_print to View the Deadlock-Detection Experiment

The er_print utility presents a command-line interface. You can use the er_print utility in an interactive session and specify sub-commands during the session. You can also use command-line options to specify sub-commands non-interactively.

    The following sub-commands are useful for examining deadlocks with the er_print utility:

  • –deadlocks

    This option reports any potential and actual deadlocks detected in the experiment. Specify deadlocks at the (er_print) prompt or –deadlocks on the er_print command line.

  • –ddetail deadlock-ID

    This option returns detailed information about the deadlock with the specified deadlock-ID. Specify ddetail at the (er_print) prompt or –ddetail on the er_print command line. If the specified deadlock-ID is all, then detailed information about all deadlocks is displayed. Otherwise, specify a single deadlock number such as 1 for the first deadlock.

  • –header

    This option displays descriptive information about the experiment and reports any errors or warnings. Specify header at the (er_print) prompt or –header on the command line.

Refer to the collect(1), tha(1), analyzer(1), and er_print(1) man pages for more information.