Open Bug 977778 Opened 9 years ago Updated 2 years ago

Allow users to request get-minidump-instructions report on-demand


(Socorro :: Processor, task, P3)



(Not tracked)


(Reporter: benjamin, Unassigned)



Ted wrote a tool called get-minidump-instructions which will print out and disassemble the memory surrounding the instruction pointer. The JS team would like a way to run this tool on minidumps in an on-demand way.

This is similar to bug 818069 in that it's a report that we don't want to run on every minidump by default for storage and processor-time reasons.

Unlike bug 818069, however, this report can potentially contain PII and should only be requestable or viewable by people who have the "download raw minidumps" privilege.
Do you think this is PII? It's just the memory around the instruction pointer, which should just be code.
"we should treat it as PII for now" -bsmedberg
On second thought this makes sense--if you jump into random memory you will get whatever memory is around where things blow up.

So two quick thoughts:
1) We could just spit the raw bytes out in the stackwalker JSON. This would mean we'd have to eat that extra storage for each dump, and it'd also mean we'd have to do the disassembly in JS (emscripten objdump or something?)
2) If we do this server-side we need objdump installed to do the actual disassembly (get-minidump-instructions just shells out).
Here's a basic first step that adds this tool to the Socorro build:
Commits pushed to master at
bug 977778 - add get-minidump-instructions binary to Socorro
Merge pull request #2544 from luser/get-minidump-instructions

bug 977778 - add get-minidump-instructions binary to Socorro
The get-minidump-instructions tool takes the same command-line arguments as the stackwalker binary, but also requires one extra argument: --disassemble (if that's a problem I can change the code to make that the default).

A local invocation looks like this:
get-minidump-instructions --disassemble --symbols-url= --symbols-cache=/tmp/symbols ~/dumps/bug1202817-85785551-d76b-43e2-b245-77b312150908.dmp

attachment 8658472 [details] contains the output, it's currently just plain text, although if we made it JSON we could do nicer formatting on it (and better links to the source etc), but that's a nice-to-have followup.

As for a key to save it under in the JSON dump, doesn't particularly matter to me, maybe "crash_disassembly" ?

We will need to make sure whatever is going to run this tool (the processor?) has `objdump` installed, I don't know how hard that is.

It would also be great if we could run this on-demand on specific crashes, since that's the most pressing use case (bug 818069 wants that too).
Moving this into the Processor component so it's not lost in the shuffle.
Component: General → Processor
See Also: → 694601
See Also: → 705486

I've had several conversations about this sort of thing over the last few years. Making it a P3 to get to eventually.

Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.