CHESS is a tool from Microsoft Research that helps you better test concurrent programs. You can use CHESS to systematically drive your programs into different thread interleavings, flushing out a lot of bugs in this process. Once a bug is found, CHESS can reproduce the interleaving for tremendously improving the debugging experience.