Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any concurrency debugging tools for C#.NET in VS2010

On the project I am working on at the moment we have an unknown number of flickering tests which fail at varying rates (anywhere from every-other run to once every 5000 runs) which has led us to believe we have some serious Heisenbugs to resolve. Most of the time including trace statements in the code change the timing enough to eliminate these errors, or at least make them occur less often, but obviously this is not a valid bug fix.

We are wondering if there are any tools similair to CHESS (http://research.microsoft.com/en-us/projects/chess/download.aspx) that work in/with Visual Studio 2010 to stress test applications and detect potential race conditions and deadlocks?

like image 430
Pete Martin Avatar asked Sep 15 '11 08:09

Pete Martin


2 Answers

Within Visual Studio 2010 (not sure which editions exactly) you can create a new profiling session with the "Concurrency" option. This should detect the deadlocks you're looking for. You can then profile a unit test to automate your many runs.

Couldn't find many images of the results but here's an example example
(source: microsoft.com)

like image 195
Ian Avatar answered Oct 06 '22 00:10

Ian


Another tool is from Microsoft Research only, you can download it from Codeplex - chesstool.codeplex.com. It supports .Net 4.0 libraries, next version of Chess, but I don't know you are able to use it.

like image 44
Anuraj Avatar answered Oct 06 '22 01:10

Anuraj