Temporal Debugging: Automating Time Travel Debugging with URDB
Ana-Maria Visan, Artem Y. Polyakov, X. Dong, Kapil Arya, Tyler Denniston, Praveen S. Solanki, Gene D. Cooperman · 2010
This work addresses two classical problems in debugging. First, while some excellent reversible debuggers have been built for C, C++, Java, Standard ML, other languages including MATLAB, Python and Perl lack such reversible debuggers. To solve this, this work contributes a new temporal debugging approach and a new software package, URDB (Universal Reversible DeBugger), which can extend the native debuggers of these three languages into reversible debuggers. URDB also supports reversibility of the traditional gdb debugger for C and C++. Reversibility can be added to the native debugger of a new language in less than a day. URDB uses a checkpoint-restart procedure based on DMTCP (Distributed MultiThreaded CheckPointing). The second classical debugging problem concerns long-running computations. Such computations are often difficult to debu g because the initial fault may occur much earlier than the resul ting error. In a long-running computation, it is important that t he application execute at full native speed, with little or no slo wdown due to logging of events, interpretation of code within a debugger, etc. Moreover, in the case of logging, there is an issue both of time to log many events, and also of storage to hold many events over a long process lifetime. The solution, and another contribution of this work, is that of temporal debugging. A binary search is performed over the process lifetime to find the event or point in t ime representing the initial fault that eventually generated t he visible error. The abilities of URDB and DMTCP/ptrace are demonstrated on a real-world C++ program designed using the Booch (Unified ) methodology and currently extending to 750,000 lines: Geant4. Since long-running computations like Geant4 often use C or C++ for efficiency, it was also necessary to extend a debugger for these languages. Gdb was the natural debugger of choice for C and C++. However, since gdb is based on ptrace, it was necessary to extend