Alex Rivera | Logout

Tips for debugging hard-to-reproduce concurrency bugs?

Asked 2011-04-28T13:54:30.850
11

What are some tips for debugging hard to reproduce concurrency bugs that only happen, say, once every thousand runs of a test? I have one of these and I have no idea how to go about debugging it. I can't put print statements or debugger watches all over the place to observe internal state, because that would change timings and produce overwhelming amounts of information when the bug is not successfully reproduced.

Edit
Report

1 Answer

3

This might not help you but will probably help someone seeing this question in the future.

If you're using a .Net language you can use the CHESS project from Microsoft research. It runs unit tests with every kind of thread interleaving and shows you which ones cause the bug to happen.

There may be a similar tool for the language you're using.

answered 2011-04-28T14:46:23.107

Your Answer