Save time debugging: ignore single threaded lock inversions

| 0 Comments
In the previous tutorials I showed how LID and LIA, our deadlock detection tools, could be used to pinpoint lock inversions, show you deadlocks which are lurking in your code and save you hours of debugging time. The examples used so far are very simple and all of the locks are acquired on the same thread. The tools recognise that although these are lock inversions they're benign as only one thread ever acquires the locks in each sequence and a single thread cannot deadlock itself (unless it's using locks which are not re-entrant!).

To help reduce potential clutter from the output you can suppress single threaded lock inversions using the -skipSingleThread command line switch.

Personally I prefer to remove ALL lock order inversions but if you want to ignore single threaded inversions then you can.

Leave a comment

About this Entry

Finding deadlocks fast: data reduction helps pinpoint errors was the previous entry in this blog.

New release of deadlock detection tools is the next entry in this blog.

This is where we write about the development of Lock Explorer, a suite of tools for locating lock inversions, finding deadlocks before they happen and investigating lock usage, contention and performance in multi-threaded code.

Find recent content on the main index or look in the archives to find all content.