3 ms·
Why isn't it good for concurrency bugs? rr doesn't record the entire state up to the race condition?
by i_am_a_peasant 2y ago
Why isn't it good for concurrency bugs? rr doesn't record the entire state up to the race condition?
- adgjlsfhk1 2y agoit serializes your problem because you can't atomically snapshot memory when there are multiple threads writing to it
- pm215 2y agoThis is true, but for at least some race conditions the rr "chaos mode" can help in tracking them down. Chaos mode basically randomly adjusts its thread scheduling so that it sometimes doesn't run a thread at all for a few seconds, so you run it a bunch of times until it hits the timing window for the race condition; and then when it does you debug the recording. IME it works at least sometimes but it does require that the thing you're testing doesn't take too long to fall over, since you need to do multiple recordings of it. https://robert.ocallahan.org/2016/02/introducing-rr-chaos-mode.html https://robert.ocallahan.org/2016/02/introducing-rr-chaos-mo...
- nemetroid 2y agoRR supports recording multithreaded programs, but only runs one thread at a time, so it cannot trigger data race bugs. It can find higher level concurrency bugs though, and has a "chaos mode" that schedules threads in an unfair random manner.