from Hacker News

Back to the Futu-Rr-e: Deterministic Debugging with Rr

by mnemonik on 11/2/15, 4:14 PM with 9 comments

  • by kragen on 11/2/15, 4:53 PM

    Michael Elizabeth Chastain became the maintainer of the Linux ioctl list in the early days because he wanted his mec-replay tool to be able to work, and ioctls were a fly in the ointment — each ioctl has its own idea of how to interpret the arguments, and may end up accessing user memory in some complicated way. Record-and-replay tools like mec-replay, rr, https://github.com/moyix/panda, and http://velvetpulse.com/2012/11/27/scribe-the-deterministic-t... need to be able to intercept that access in order to record the relevant data.

    Edit: of course, I should have mentioned that doesn't apply to PANDA — by recording events at a non-system-call interface, PANDA avoids the problems of system-call emulation and instead has the problems of hardware emulation. I imagine PANDA will be a heck of a lot more useful for debugging new bare-metal operating systems. The publisher regrets the error.

    Time-travel debugging and deterministic replay is such a fundamentally important feature, and it can expand our capabilities in many different ways that we're only starting to explore. Debugging is just one possible application; consider also exhaustive testing of error conditions, re-execution of optimistic transactions that hit a write conflict, temporal backtracking search over executions, data prevalence (though it doesn't solve the schema upgrade problem), and deterministic building. And remember that the hardest problem for reverse-mode automatic differentiation is figuring out how to "run the program backwards" in order to find the gradient of the output; deterministic replay strategies are directly applicable to this problem and therefore to generalized gradient descent.

    It's a shame that mec-replay fell by the wayside 20 years ago. Surely we won't let that happen this time. http://www.boutell.com/lsm/lsmbyid.cgi/001191 https://static.lwn.net/1999/0121/a/mec.html

    Much to my surprise, you can still download mec-replay 0.3 from 1995, although you'd probably need to build a Linux 1.3 kernel to run it with: ftp://ftp.shout.net/pub/users/mec/misc/mec-0.3.tar.gz

  • by Ygg2 on 11/2/15, 7:39 PM

    Are there any non-Java IDEs that implement Deterministic debugging?
  • by chris_wot on 11/2/15, 10:43 PM

    I'm wondering: if people run something like an unstable Fedora or Ubuntu distribution, could they have an option to automatically run rr for certain software?
  • by baldfat on 11/2/15, 5:49 PM

    Thank you Mozilla!!! As someone that programs in R. By making a it called rr R is now the second hardest to find stuff on Google. They really are going to hate looking for help when all the R searches come up.