16

Are there any tools that can help find race conditions when testing multi-threaded .net code? I'm looking for something with similar capabilities to IBM's ConTest tool for Java.

4 Answers 4

3

Typemock Racer might be what you're looking for but I haven't used it - I just remembered something about deadlocks :)

Or this: Deadlock Detector

Sign up to request clarification or add additional context in comments.

Comments

2

This announcement from Microsoft Research sounds like they have a tool that does exactly what I want. Unfortunately there's no .net version yet, but there is one planned. To quote the site:

CHESS is an automated tool for finding errors in multithreaded software by systematic exploration of thread schedules. It finds errors, such as data-races, deadlocks, hangs, and data-corruption induced access violations, that are extremely hard to find with current testing tools. Once CHESS locates an error, it provides a fully repeatable execution of the program leading to the error, thus greatly aiding the debugging process. In addition, CHESS provides a valuable and novel notion of test coverage suitable for multithreaded programs. CHESS can use existing concurrent test cases and is therefore easy to deploy. Both developers and testers should find CHESS useful.

2 Comments

Microsoft's tool is not available yet (and might be for some time).
It's available now, but not for VS2010 or VS2012 yet.
1

Have you seen Debug Inspector (www.debuginspector.com) ?

It does managed and unmanaged deadlocks and covers both WaitForSingleObject and WaitForMultipleObjects and works for XP and Vista

Comments

1

There’s a great windbg extension, written by Steve Johnson, called sosex which has a deadlock finding command. You can find it at http://www.stevestechspot.com/downloads/sosex_32.zip and you can read more about it here: http://www.stevestechspot.com/SOSEXANewDebuggingExtensionForManagedCode.aspx and here: http://www.stevestechspot.com/SOSEXUpdatedV11Available.aspx.

1 Comment

It just finds runtime deadlocks which are simple to find anyway; because if you have one your program stops completely and you just have a look at all stacks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.