Do you have any advices how to test a multithreaded application?
I know, threading errors are very difficult to catch and they may occur at anytime – or not at all. Tests are difficult and the results are never for sure. Certainly it is best to carefully design and program the concurrent modules.
Nevertheless – I do not want to leave out the test aspect. So running a lot of threads that are all working on the same items can invoke threading errors, sometimes.
Any ideas or best practices to get a high hit rate of hidden threading errors?
(I am using .Net/C#)
You can use some good tools to test all the threading issues like Data races, deadlocks, stalled threads etc.
intel-thread-checker is one such good tool.
You can also try, CHESS by Microsoft Research