Faster crash analysis with stack-blame

When a new crash appears, we often want to know whether any code on the stack changed recently. Historically, this has required opening each source link in a new tab and waiting for hgweb to generate megabytes of HTML. Even if you only look at the top 10 frames of each stack, this gets boring quickly.

I created stack-blame to make this easier. It shows 5 lines of context around each line of the stack trace, and highlights fresh lines in green. In the stack-blame output for this crash report, it's easy to see that of the cairo functions on the stack, only _cairo_quartz_surface_finish was touched recently.

6 Responses to “Faster crash analysis with stack-blame”

  1. Ted Mielczarek Says:

    This is slick! I find the presentation a little hard to read (the highlighting makes it hard for me to see which line was the active line in the stack), but it’s a really neat concept. I wonder how hard it’d be to integrate something like this into Socorro?

    I feel like there might also be room for a report based on this, looking at crash stacks and finding lines in the stack that are from very recent changes, perhaps even trying to correlate the push date of the change with the onset of the crash signature.

  2. Danny Moules Says:

    Really, wonderfully, good idea. I might have to work this concept into my debug process for other projects.

  3. Robert Kaiser Says:

    Thanks a lot! At the last all-hands, we have been talking about getting one step in that direction in Socorro itself – having this around is surely helpful!
    It might even make sense to really integrate this to do on-demand stack-blame generation from within Socorro ;-)

  4. Andrew McCreight Says:

    This is really cool!

    Does it do anything with inline functions? For instance, if you have A calls B calls C, but B is inlined, then the call stack will just show A calls C. If B was what changed, then it won’t show up with this, I would think. Probably too tricky to solve without some clever analysis of the code itself.

  5. Kyle Huey Says:

    Sweet. Nice to see this come together so quickly.

  6. Gus Benson Says:

    Nice piece of code. I’m guessing you save a lot of mindless bug search with this.