Please enable JavaScript to view this site.

Thread Validator Help


The deadlock and potential deadlock settings allow Thread Validator to regularly scan for various error conditions using the same data collected by the options on the Collect settings tab.


If your application has many threads, you may prefer to disable these options to prevent Thread Validator from using too much processor time.


However, at run time you can force Thread Validator to check for deadlocks or potential deadlocks in the application under test.



Forcing a deadlock check


If deadlock detection is off by default, you can manually trigger a deadlock check:


menu Query menu instructionStep choose Deadlock detection instructionStep runs a deadlock check updating displays accordingly


This menu option will be disabled if the Deadlocks option on the Detect settings tab is enabled.





The example application can be used to demonstrate the deadlock checking:


1. Turn off the Deadlocks option on the Detect settings tab and


2. Launch the example application.


3. Use some of the built in tests to create a deadlock, for example the 3 thread deadlock.


4. Notice that Thread Validator does not register the deadlocks including for example, in the following three displays.


In the Errors panel of the Summary tab:




In the snapshots view of the Threads tab




Or in the All Locks tab:




5. Force a deadlock check as described above, and each of these displays will update to show the deadlocks found


In the Errors panel of the Summary tab, where the red bar indicates 3 deadlocked locks:




noteNote these options are disabled, reflecting the disabled general deadlock detection setting which prevents interactive exploration of the deadlock data. Enable the setting to explore further.


In the snapshots view of the Threads tab, where the thread snapshots now starts to register the threads as locked (red)




Or in the All Locks tab, where the locked threads are also now highlighted in red: