You’re multi-threaded software is running OK, but there are some long pauses, and you’re wondering what’s causing those pauses. Or occasionally the software deadlocks. What’s causing that? Why does that happen?
A good starting point is to look at the wait chains in the software. A wait chain is the list of locks that are held and waits that your software is performing as it performs its work.
Analysing wait chains can let you see which threads are involved in a deadlock, or which threads are waiting for a handle to close or for an event to become signalled.
Thread Wait Chain Inspector is a software tool that allows you to analyze the wait chains of each thread in your software – also known as thread wait chain traversal.
Thread Wait Chain Inspector is a non-invasive tool, causing no side effects while monitoring your software.
Simply select the process you wish to monitor from the File menu. The thread wait chain information is shown in the main display.
Want to save the wait chain information so that a colleague can analyse it as part of a support incident? We can do that. The File menu provides options for saving and loading wait chain information.
Each column can be sorted by clicking on the column name.
Thread names are provided by reading the data set using SetThreadDescription() on Windows 10.
If you wish to debug a particular wait chain, you can create a minidump for that process.
All 64 bit (x64) and 32 bit (x86) Windows operating systems from Windows 11 to Windows Vista are supported.
Example 1 Monitor a running process’s wait chains.
threadWaitChainInspector.exe /processId 1344
Example 2 Monitor a running process’s wait chains and write a log of them to a log file.
threadWaitChainInspector.exe /processId 1344 /logWaitChains /logWaitChainFileName e:\tests\testWaitChain\waitChainLog.txt
We have some additional threading tools to help you identify and fix threading problems. Thread Validator is a full blown threading analysis and deadlock detection tool, with a more detailed thread wait chain inspector.