7 ms·
I made a little project called Concurrency Runner a while ago to attempt to test these kinds of scenarios: https://github.com/weinberg/concurrencyRunner https:/
by defaultcompany 3y ago
I made a little project called Concurrency Runner a while ago to attempt to test these kinds of scenarios: https://github.com/weinberg/concurrencyRunner https://github.com/weinberg/concurrencyRunner. It does so by running multiple copies of your process in debug mode with breakpoints set to allow specific interleaved execution paths to be explored. This allows you to trigger concurrency scenarios which are difficult to analyze because they otherwise would rely on random timing. That repo has examples which demonstrate "read skew", "write skew" and "read modify write" concurrency scenarios. I was hoping I could make it into something you could run in CI to actively test for these things. Ultimately it was more of a research project than anything else but maybe someone will find it useful or interesting.
- amw-zero 3y agoThat’s really cool. It reminds me of Meta’s hermit, which intercepts system calls and records them so that they can be replayed back deterministically. Non-determinism is the name of all testing. Anything that we can do to improve it is extremely important.