Flashback: a lightweight extension for rollback and deterministic replay for software debugging

Sudarshan Srinivasan, Srikanth Kandula, Christopher R. Andrews, Yuanyuan Zhou

USENIX Annual Technical Conference · 2004 · 300 citations · 66 references

TL;DR

Software robustness critically affects system availability, yet bug detection is difficult because many bugs are hard to reproduce, and existing rollback/replay solutions are too heavyweight for fine‑grained debugging. The paper proposes Flashback, a lightweight OS extension that enables fine‑grained rollback of a crashed program to a prior execution point and deterministic replay of the buggy region. Flashback achieves this by employing shadow processes to roll back in‑memory state and lightweight logging of system calls, all designed for efficient debugging. A Linux prototype demonstrates that Flashback incurs minimal overhead while rapidly rolling back a debugged program and deterministically replaying from that point.

Abstract

Software robustness has significant impact on system availability. Unfortunately, finding software bugs is a very challenging task because many bugs are hard to reproduce. While debugging a program, it would be very useful to rollback a crashed program to a previous execution point and deterministically re-execute the buggy code region. However, most previous work on rollback and replay support was designed to survive hardware or operating system failures, and is therefore too heavyweight for the fine-grained rollback and replay needed for software debugging. This paper presents Flashback, a lightweight OS extension that provides fine-grained rollback and replay to help debug software. Flashback uses shadow processes to efficiently roll back in-memory state of a process, and logs a process' interactions with the system to support deterministic replay. Both shadow processes and logging of system calls are implemented in a lightweight fashion specifically designed for the purpose of software debugging. We have implemented a prototype of Flashback in the Linux operating system. Our experimental results with micro-benchmarks and real applications show that Flashback adds little overhead and can quickly roll back a debugged program to a previous execution point and deterministically replay from that point.

References

66