A Partial-Multiverse Model of Time Travel for Debugging byBrock Wilcox
summary
Claim: implement time‑travel debugging by forking the process at each step and suspending children so earlier states can be resumed. Implementation uses Ruby, pry and a pry time travel plugin, relying on fork + SIGSTOP/SIGCONT, with snapshots stored as child processes that form an execution tree. Works well enough to reproduce and fix at least one Rails bug, but loses external state, drops threads, uses copy‑on‑write memory and spawns zombies and orphans if cleanup fails.
AI-written summary · about
chapters (34)
- 0:00Introduction
- 0:55Debuggers
- 1:34PrideDash
- 3:10Yard
- 4:53Hooks
- 5:22Pride Time Travel
- 7:13How it works
- 7:28Multiverse theory
- 7:58Multiverse example
- 8:39Fork
- 9:27clone
- 13:50signals
- 14:15sigterm
- 15:14signal
- 16:22unix lab
- 16:38sigstop
- 17:49snapshot
- 18:44restore
- 19:24Limitations
- 20:09Shared file handles
- 21:28Snapshots
- 22:22Threads
- 22:39Thread Hiding
- 23:36Managing Threads
- 24:08Wrap plugin
- 24:39The Problem
- 24:59The Trick
- 25:43Another Problem
- 26:30Why
- 27:14UM Zombies
- 28:12SelfSolving Problem
- 28:27Snapshot Tree
- 32:10Questions
- 33:11References
related talks
30mInvestigative Metaprogramming
38mSpelunking in Ruby
43mThe joy of Ruby debugging - Pry universe
38mDispelling the dark magic: Inside a Ruby debugger
28mTracing your way through Ruby
38mPractical Debugging
27mParallel testing with Ractors - Putting CPU's to work
25mVisualized multi-threaded simulators in Ruby
