News for hackers. Stuff that matters.

MarkUndo

Re:rr: lightweight recording and deterministic debugging on Wednesday November 07, 2018 @07:36AM (#18398693)
I think GDB's built-in record/replay mode does roughly what you describe.

Tracking the effects of every instruction does is likely to give you a simpler implementation (since you just repeatedly say "next instruction, now what did that do?") but it's quite slow and can be hungry on memory, since you have to log every change.

More sophisticated record/replay/reversing tools like rr provide a more sophisticated backend that doesn't need to track state per instruction. They can be much faster - and consume less memory - but more coding is required to make sure you're tracking the right state, efficiently.

Re:rr: lightweight recording and deterministic debugging on Wednesday November 07, 2018 @07:32AM (#18398683)
Interestingly, hypervisor-level logging of this stuff is both harder (because it has the constraints of kernel-level code) and simpler (because the non-deterministic behaviours are fewer and better-documented at the hardware level than the Linux API level!)

I think it's very likely that, overall, recording a single process is substantially more complex to implement than recording a whole VM. (With significant caveats - recording a whole VM with good performance is going to be hard and making it really useful probably is a whole load of extra code)

Re:rr: lightweight recording and deterministic debugging on Wednesday November 07, 2018 @07:27AM (#18398658)
VMware used to support record / replay of VMs in their commercial product, which was quite cool:

https://pubs.vmware.com/ws71_ace27/wwhelp/wwhimpl/js/html/ww...

Re:rr: lightweight recording and deterministic debugging on Tuesday November 06, 2018 @12:59PM (#18393305)
Actually, I think rr supports shared memory operations under some circumstances... (I'd love to have my beliefs confirmed / corrected by somebody more knowledgeable)

My understanding is that rr has some handling for read-only shared memory and for arbitrary sharing within a tree of recorded processes.

Undo's shared memory is different because it doesn't need the other process to be recorded, so you can do read/write sharing with arbitrary processes or devices.

(disclaimer: current Undo engineer)