Tip and tricks when bugs won’t reproduce

  • If the program is multi-threaded, try the Thread Fuzzing feature. This permutes the scheduling of threads in the program while it is being recorded, to make concurrency bugs more likely to be reproduced. Use the --thread-fuzzing option to live-record, or the UNDO_tf environment variable.

  • Run the test in a loop many times (tens, hundreds, or even thousands) and wait for it to fail. Configure LiveRecorder to save only on failure, to avoid generating lots of unnecessary recordings. Use the --save-on error option to live-record, or in the LiveRecorder API, call undolr_save_on_termination_cancel() if the test exits successfully.

  • Run the stress-ng program in another terminal to keep other CPUs busy. On Ubuntu, stress-ng can be installed using:

    $ apt install stress-ng

    For details on using stress-ng, see the stress-ng manual.