How to get Thread Wait Chain Inspector

Navigation: »No topics above this level«

How to get Thread Wait Chain Inspector

 Return to chapter overview

Thread Wait Chain Inspector is free for commercial use. Thread Wait Chain Inspector can be downloaded for Software Verify's website at https://www.softwareverify.com/product/thread-wait-chain-inspector/.

This help manual is available in Compiled HTML Help (Windows Help files), PDF, and online.

Windows Help | https://www.softwareverify.com/documentation/chm/threadWaitChainInspector.chm
PDF | https://www.softwareverify.com/documentation/pdfs/threadWaitChainInspector.pdf
Online | https://www.softwareverify.com/documentation/html/threadWaitChainInspector/index.html

Whilst Thread Wait Chain Inspector is free for commercial use, Thread Wait Chain Inspector is copyrighted software and is not in the public domain.

You are free to use the software at your own risk.

You are not allowed to distribute the software in any form, or to sell the software, or to host the software on a website.

Contact

Contact Software Verify at:

Software Verify Limited

Suffolk Business Park

Eldo House

Kempson Way

Bury Saint Edmunds

IP32 7AR

United Kingdom

email | sales@softwareverify.com
web | https://www.softwareverify.com
blog | https://www.softwareverify.com/blog
twitter | http://twitter.com/softwareverify

Visit our blog to read our articles on debugging techniques and tools.

Follow us on twitter to keep track of the latest software tools and updates.

Versions

There are two versions of Thread Wait Chain Inspector:

·A version for 32 bit operating systems: threadWaitChainInspector.exe

·A version for 64 bit operating systems: threadWaitChainInspector_x64.exe.

The 32 bit version will run on 64 bit operating systems but will only show information about 32 bit processes.

The 64 bit version will only run on 64 bit operating systems and will only show information about 64 bit processes.

Both versions are installed if you are using a 64 bit operating system.


What does Thread Wait Chain Inspector do?

What does Thread Wait Chain Inspector do?

 Return to chapter overview

Thread Wait Chain Inspector allows you to inspect information about each running thread in an application.

The display shows wait chain data in the the lower window for the process that is selected in the upper window.

For any selected thread, that thread and related threads are shown with a yellow background.

Any deadlocked threads have their wait chains shown in red.

Information that is displayed about each thread:

Thread id

This is the numeric identifer assigned to the thread by the Windows operating system.

Thread Name

This is the name of the thread if the thread has been given a name using the SetThreadDescription() API. This is only available on Windows 10.

If a thread description is not available we attempt to provide a name for this thread by querying the thread's start address, and if successful we try to turn this start address into a useful symbolic name. Depending on the process and the operating system these operations may success, in which we display a name, or they may fail in which case we display nothing.

Thread Wait Chain

This is the wait chain for this thread. For each entry we show the process id and the thread id and if the object being waited upon has a name, we show that too. If process names and thread names have been enabled we show these as well. Some wait chains rely on waiting for other processes, which are more readily identified by process name than process id. Any deadlocks that are detected are shown in red.

Wait Time

This is how long the thread has been waiting.

Context switches

This is the number of context switches this thread has been involved in.


Menu

Menu

The main menu contains four menus, File, Settings, Software Updates and Help.


File

Navigation: Menu >

File

 Return to chapter overview

The File menu allows you to close the program.

File menu instructionStep Monitor a Process... instructionStep displays the process chooser to allow you to choose which process to monitor.

File menu instructionStep Stop Monitoring instructionStep stops monitoring the process and clears the display.

File menu instructionStep Load Wait Chain Information... instructionStep loads wait chain information from a file and displays it.

File menu instructionStep Save Wait Chain Information... instructionStep save wait chain information to a file.

This can be useful for saving wait chain information for diagnosis at a later time, and for diagnosis by a colleague.

File menu instructionStep Exit instructionStep closes Thread Wait Chain Inspector


Settings

Navigation: Menu >

Settings

 Return to chapter overview

The Settings menu allows you to modify the behaviour of Thread Wait Chain Inspector.

File menu instructionStep Edit Settings... instructionStep displays the settings dialog.

File menu instructionStep Start Logging instructionStep starts logging wait chains.

File menu instructionStep Stops Logging instructionStep stops logging wait chains.

File menu instructionStep View Logged Wait Chains... instructionStep opens the log file in the registered application for .txt files (notepad.exe on most computers).


Software Updates

Navigation: Menu >

Software Updates

 Return to chapter overview

The Software Updates menu controls how often software updates are downloaded.

If you've been notified of a new software release to Thread Wait Chain Inspector or just want to see if there's a new version, this feature makes it easy to update.

menu Software Updates menu instructionStep Check for software updates instructionStep checks for updates and shows the software update dialog if any exist

An internet connection is needed to be able to make contact with our servers.

note Before updating the software, close the help manual, and end any active session by closing target programs.

If no updates are available, you'll just see this message:

Software Update dialog

If a software update is available for Thread Wait Chain Inspector you'll see the software update dialog.

·Download and install instructionStep downloads the update, showing progress

Once the update has downloaded, Thread Wait Chain Inspector will close, run the installer, and restart.

You can stop the download at any time, if necessary.

·Don't download... instructionStep Doesn't download, but you'll be prompted for it again next time you start Thread Wait Chain Inspector

·Skip this version... instructionStep Doesn't download the update and doesn't bother you again until there's an even newer update

·Software update options... instructionStep edit the software update schedule

Problems downloading or installing?

If for whatever reason, automatic download and installation fails to complete:

·Download the latest installer manually from the software verify website.

Make some checks for possible scenarios where files may be locked by Thread Wait Chain Inspector as follows:

·Ensure Thread Wait Chain Inspector and its help manual is also closed

·Ensure any error dialogs from the previous installation are closed

You should now be ready to run the new version.

Software update schedule

Thread Wait Chain Inspector can automatically check to see if a new version of Thread Wait Chain Inspector is available for downloading.

menu Software Updates menu instructionStep Configure software updates instructionStep shows the software update schedule dialog

The update options are:

·never check for updates

·check daily (the default)

·check weekly

·check monthly

The most recent check for updates is shown at the bottom.

Software update directory

It’s important to be able to specify where software updates are downloaded to because of potential security risks that may arise from allowing the TMP directory to be executable. For example, to counteract security threats it's possible that account ownership permissions or antivirus software blocks program execution directly from the TMP directory.

The TMP directory is the default location but if for whatever reason you're not comfortable with that, you can specify your preferred download directory. This allows you to set permissions for TMP to deny execute privileges if you wish.

menu Software Updates menu instructionStep Set software update directory instructionStep shows the Software update download directory dialog

An invalid directory will show the path in red and will not be accepted until a valid folder is entered.

Example reasons for invalid directories include:

·the directory doesn't exist

·the directory doesn't have write privilege (update can't be downloaded)

·the directory doesn't have execute privilege (downloaded update can't be run)

note When modifying the download directory, you should ensure the directory will continue to be valid. Updates may no longer occur if the download location is later invalidated.

·Reset instructionStep reverts the download location to the user's TMP directory

The default location is c:\users\[username]\AppData\Local\Temp


Help

Navigation: Menu >

Help

 Return to chapter overview

The Help menu controls displaying this help document and displaying information about Thread Wait Chain Inspector.

Help menu instructionStep About Thread Wait Chain Inspector... instructionStep displays information about Thread Wait Chain Inspector.

Help menu instructionStep Readme and Version History... instructionStep displays the readme and version history.

Help menu instructionStep Help Topics... instructionStep displays this help file.

Help menu instructionStep Help PDF... instructionStep displays this help file in PDF format.

Help menu instructionStep Help on softwareverify.com... instructionStep display the Software Verify documentation web page where you can view online documentation or download compiled HTML Help and PDF help documents.

Help menu instructionStep Blog... instructionStep display the Software Verify blog.

Help menu instructionStep Library... instructionStep display the Software Verify library - our best blog articles grouped by related topics.

Help menu instructionStep Contact customer support... instructionStep displays the options for contacting customer support.

Click a link to contact customer support.

Help menu instructionStep How do I?... instructionStep displays the options for asking us how to do a particular task.


The user interface

The user interface

The Thread Wait Chain Inspector user interface displays the threads of the selected process:

Usage

You can sort the thread list by clicking the column header to select the column. Clicking the already selected column header again reverses the sort direction.

The values shown for each thread are described here. A graphical representation of these values is shown behind the numeric values where possible.

Thread Controls

Refresh

You can update the display manually by clicking the Refresh button. This is useful if you have disabled automatic updates via the the Update Interval control.

Update Interval

You can change how frequently the display is updated using the Update Interval control. The default is to update every one second.

Process Names

As well as showing the process id in the wait chain the process name is displayed. This is enabled by default.

Thread Names

As well as showing the thread id in the wait chain the thread name is displayed. This is enabled by default.

Context Menu

The grid has a context menu. Each row in the grid represents a thread in the selected process.

Name Thread...

Display the Name Thread dialog so that you can name an un-named thread or rename a thread to have a more useful name.

Create a Minidump...

This creates a minidump for the process that has been selected by the context menu (this may not be the process selected in the process list).

A create minidump dialog is displayed asking you where to save the minidump.

Copy Wait Chain Information as Text...

This copies the wait chain information that is displayed to the clipboard.

Example:

11104 (waitChainTester.exe) : 3216 : Blocked Wait Time: 48,823,605 Context Switches: 7,383
11104 (waitChainTester.exe) : 7300 (threadProcess2) : Blocked Wait Time: 48,820,804 Context Switches: 2
Process Wait : Owned
12436 (notepad.exe) : 0 : Pid Only
11104 (waitChainTester.exe) : 12588 : Running Wait Time: 48,822,522 Context Switches: 3
11104 (waitChainTester.exe) : 12812 : Running Wait Time: 48,822,522 Context Switches: 1


Create a minidump

Create a minidump

The Create Minidump dialog is provided to allow you to choose where to save your minidump.

A suggested filename will be provided in the edit field. You can edit this filename or choose a new filename using the Browse... button to display the system file chooser.

Open Folder... displays the contents of the folder identified by the filename. You can use this to browse any existing minidumps.

Create Minidump will create the minidump for the selected process.


Process chooser dialog

Process chooser dialog

The Attach to process dialog allows you to choose a user process, system process or service to attach to.

·System processes / Services / User processes instructionStep show either of system or services or user processes in the list, or both

·Full path instructionStep shows the full path to the process executable in the list

·Image Name instructionStep shows the short program name without path

·Refresh instructionStep update the list with currently running processes

·Attach instructionStep attach to the selected process and start collecting debug events

Clicking on the headers of the list will sort them by ID or by name using the full name or short name, depending on what's displayed.


Settings dialog

Settings dialog

The settings dialog allows you to modify the behaviour of Thread Wait Chain Inspector.

·Collect data about wait chains... instructionStep turn collect of wait chain logging on or off

·Logfile instructionStep the file when the wait chain log will be written

·Browse... instructionStep open a Windows file dialog to choose the log file name

·View... instructionStep opens the log file in the registered application for .txt files (notepad.exe on most computers)

·Open Folder... instructionStep opens Windows file explorer to show the directory that contains the log file

·Delete instructionStep deletes the log file

When logging is enabled the log file will be written when Thread Wait Chain Inspector is closed.


Command Line Interface

Command Line Interface

Thread Wait Chain Inspector can be used from the command line as well as with the GUI.


Alphabetic Reference

Navigation: Command Line Interface >

Alphabetic Reference

 Return to chapter overview

/logWaitChains

Turn wait chain logging on or off

/logWaitChains:On|Off

Example:

/logWaitChains:On

/logWaitChains:Off

/logWaitChainFileName

Specifies a file to write the wait chain log to. The wait chain log is written when Thread Wait Chain Inspector is closed.

/logWaitChainFileName filename

Example:

/logWaitChainFileName e:\tests\testWaitChain\waitChainLog.txt

/processId

Specify a process to monitor. The process must already be running.

/processId process-id

Example:

/processId 256

/process

Specify a process to monitor. The process must already be running.

/process process-name

Example:

/process test.exe

/process e:\om\c\testApps\native\test\debug\test.exe