What I do at Undo

In October, I started working for Undo and, now that I understand our technology better, it’s time to explain what I do.

Undo produces a (closed source) technology which allows to record, rewind and replay Linux programs (on x86 and ARM).
One of our products using this technology is UndoDB, a debugger built on top of gdb which allows you to do everything you do with gdb, but also to go back in time.

Example of reverse commands in UndoDB

Before joining Undo, I mainly used printfs or similar to debug my code. The main reason is that, when you read logs, it’s easy to jump between different parts of the log and proceed backwards from the point where the bug became apparent to the point where the bug was caused.
On the other hand, with standard gdb, once the bug happens it’s not possible to know what was going on earlier.

UndoDB fixes this problem by allowing the user to go backwards. Every command which moves the program forward has an equivalent reverse command. For instance, next has reverse-next (or rn for short) which moves to the previous line of code, continue has reverse-continue (or rc) which executes backwards until a breakpoint is hit or the start of the program is reached, and so on.

I should point out that UndoDB is not just some kind of fancy logging. You can really jump around in execution history, explore variables and registers at different points in time, bookmark interesting points in history, etc. What you cannot do is change history.

Finally, UndoDB is also useful when gdb wouldn’t be able to show any information. Have you ever seen anything like this in gdb?

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(udb) backtrace
#0  0x0000000000000000 in ?? ()
#1  0x0000000000000000 in ?? ()

Not very useful, is it?
With UndoDB you can step backwards until you reach a point before your program messed up its state:

(udb) backtrace
#0  foo () at program.c:75
#1  0x0000000000400557 in bar (n=42) at program.c:120
#2  0x000000000040056a in main () at program.c:420

In the next post I will give some details on how the technology actually works.

By the way, we are hiring software engineers in Cambridge (UK). If you are interested, contact me.

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.

Other Posts

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Reader Comments

So you’re basically rewriting a closed-source version of Mozilla’s RR? See https://github.com/mozilla/rr/ for details.

PS: Please add a TLS certificate to your website.

UndoDB was started years before rr and took different decisions which have different pros and cons.

I’d be interested in a blog post with details about what is different between RR and Undo. I used RR for the first time recently and it changed my life. However it has some limitations and cannot be used on every system. I’m curious if you can elaborate on comment #2.

rr uses performance counters which are only available on x86-64 (and often not on VMs), while UndoDB doesn’t so it runs on more architectures (32-bit x86, 64-bit x86-64 and arm).

UndoDB JITs the code which make it possible to detect more causes of non-determinism (see my next post, I will publish it on Monday). For instance, UndoDB works fine with shared memory.

[…] the previous post I described what UndoDB is, now I will describe how the technology […]

I think I saw rms glancing around a corner. Prepare, he’s got the Whip of Software Freedom ready.