I've been working on a multithreaded program recently that has extraordinarily complex locking invariants. I was hoping to check that there are no deadlocks or races possible in the program, but a typical unit test might not show this because the thread timings might just happen to work out in a way that causes the test to pass even though an error exists in the code.
I was curious if there is a tool out there to mess with threes timings in ways that allows a test to be run multiple times, each time with different threads getting different time slices in different orders. Does such a tool exist? Or is there another good tool out there that could make debugging easier?
This program is written in C, but I'll take answers in any language since I'm mostly curious what's out there, even if it's not directly applicable here.
Definition of thread chaser : a multiple point tool used typically as one of a set of four in a die head for cutting a screw thread.
Check out Helgrind a tool built on Valgrind. It seems to be rather picky on which gcc versions it works with, but it's worth a look.
If you are using the Windows platform, then Microsoft Research has their CHESS project, which currently only supports VS2008.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With