|
|
Subscribe / Log in / New account

Improved Linux debugging with Chronicle

Last December, as examined in a previous LWN article, Robert O'Callahan discussed the need for better debugging tools under Linux:

One of the painful truths about Linux development is that debugging sucks. Specifically, gdb on Linux sucks. Basic functionality simply does not work reliably. The details of the brokenness vary depending on the version, but the general suckiness seems to hold up across versions. Since it fails on the basics, we need not even discuss the lack of modern features or its appalling usability. This is a big problem for Linux because it is driving developers away from the platform. Here's a deeper and less widely understood truth: all debuggers suck.

The article suggested that a big problem with most debuggers was the inability to move backward through buggy code (reverse execution). O'Callahan produced a paper on the topic entitled Efficient Collection And Storage Of Indexed Program Traces [PDF] and introduced the Amber project.

Amber started out with a patent liability problem due to O'Callahan's employment by Novell. Fortunately, that issue was resolved early on: "Novell has generously granted permission to release Amber as open source."

Amber underwent a name change, and is now known as the chronicle-recorder project. "Chronicle records every memory and register write in the execution of a Linux process, using Valgrind to instrument execution at the machine code and system call level. These events are indexed and compressed; from the resulting database the Chronicle query tool can efficiently reconstruct the state of memory and/or registers at any point during the execution. Additional queries such as "when was the last write to location X before time T" and "when was location X executed between times T1 and T2" are also supported."

On the topic of licensing, the Chronicle README file says: Valgrind is under the GPL. The Valgrind 'chronicle' tool's main.c file is also under the GPL. The tool's headers --- arch.h, log_stream.h, and effects.h --- use an X11 license, so they can be included by anyone. The Chronicle 'indexer' and 'query' components are GPLed. They rely on a 'base' component whose files have an X11 license (including a simple C JSON library). The intent is that the individual Chronicle components are GPLed but since they run in separate processes communicating via clearly defined interfaces, non-GPLed code can communicate with them. In particular, debugger front ends can use any license."

O'Callahan discussed the new project with his Chronicle Released article, and discussed some new debugging capabilities that Chronicle brings with a followup article on History Based Stack Reconstruction. The code is currently in an early state, the user interface is still in the planning stages and tests are limited.

For more information on Chronicle's author, Robert O'Callahan was featured in a February, 2007 Computerworld NZ interview. (Thanks to Danny O'Brien for pointing out the latest Chronicle developments).



to post comments

Improved Linux debugging with Chronicle

Posted May 3, 2007 7:40 UTC (Thu) by MisterIO (guest, #36192) [Link] (1 responses)

Isn't this similar to the odb? :
http://www.lambdacs.com/debugger/

Improved Linux debugging with Chronicle

Posted May 10, 2007 19:13 UTC (Thu) by moltonel (subscriber, #45207) [Link]

The odb is Java-only; Chronicle works with compiled code.

I don't know much about Java, but I suppose it doesn't go near the wacky
stack optimisations that make debugging compiled programs so much "fun".

Improved Linux debugging with Chronicle

Posted May 3, 2007 12:37 UTC (Thu) by farnz (subscriber, #17727) [Link] (1 responses)

How does this compare to UndoDB (besides being Free Software)?

Improved Linux debugging with Chronicle

Posted May 10, 2007 19:10 UTC (Thu) by moltonel (subscriber, #45207) [Link]

UndoDB seems to integrate into gdb directly, and not to be based on
valgrind. Knowing valgrind, I really wonder what the performance of
Chronicle VS UndoDB would be. I expect the valgrind-based solution to be
much slower but more robust than the gdb-based one.

UndoDB comes with a gratis licence for non-comercial use, so we could give
it a try.

Check out VMware Workstation 6's record/replay feature

Posted May 15, 2007 23:06 UTC (Tue) by rrdharan (subscriber, #41452) [Link]

See description/instructions here:
http://stackframe.blogspot.com/

And a higher-level description here:
http://blogs.vmware.com/sherrod/2007/04/the_amazing_vm_.html

You can take a recording of what's happening in the virtual machine, then replay that recording as many times as you want, with gdb attached, and set breakpoints, examine state etc. as you wish.

In my very biased opinion, it's a very attractive approach to the debugging and instrumentation game.


Copyright © 2007, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds