u/sreguerain r/programming • Recommends
On “Solving Concurrency Bugs Using Schedules and Imagination”
Property based testing and model checking are used for these kinds of problems. See for example My favourite bug! in the "Don't Write Tests" talk by John Hughes, or the Jepsen's Analysis techniques at the bottom.