Service to get symbols for gdb stack trace from Breakpad symbol DB

RESOLVED WONTFIX

Status

task
RESOLVED WONTFIX
12 years ago
7 years ago

People

(Reporter: matt, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

There are times that it would be useful for a tester using a nightly build to be able to generate a stack trace for a bug.  This would be particularly useful for performance bugs where Minefield is slow or frozen, since you can use gdb to figure out where it's stuck.  The problem is that the nightlies are stripped, so the stack traces have either missing or incorrect info.  I *can* build a debug build, but on my old machine it's *slow*, and most of the time I'm not going to be willing to recompile a debug build just for the sake of a single performance bug.

I'm not sure if it's feasible, or even possible, but maybe there could be a web service where you could paste a gdb stack trace into a text area, paste the build ID into a text area, hit submit, and the web server will look up symbols in the Breakpad symbol db and give back a stack trace as it would have looked if you'd used gdb on a debug build.
For some of what you say, it seems like the existing Mozilla symbol server would work for you (http://developer.mozilla.org/en/docs/Using_the_Mozilla_symbol_server)...
Thanks, but that's only for Windows users, and I'm running Linux.  But since the server can be remotely accessed, I should probably change this to a request for a command line tool for non-Windows testers that can be downloaded and used locally.  Should I change the product for this request to Toolkit or Other Applications?
This sounds like a Socorro bug, no? You should move it to Webtools::Socorro, if so.
This isn't something serverops can provide.  Moving it to Socorro.
Assignee: server-ops → nobody
Component: Server Operations → Socorro
Product: mozilla.org → Webtools
QA Contact: justin → socorro
I don't think we're ever going to provide this in Socorro, but someone could probably write a client-side script to do this.  You need to hash the contents of the binary using this algorithm:
http://google-breakpad.googlecode.com/svn/trunk/src/common/linux/file_id.cc

Then you can look up the symbols on our symbol server (in Breakpad's text format):
http://symbols.mozilla.org/firefox/firefox-bin/308D76976D804CE81C53E8D39C1D7ED50/firefox-bin.sym

Then you'd have to parse them, Breakpad's code to do that is here:
http://google-breakpad.googlecode.com/svn/trunk/src/processor/basic_source_line_resolver.cc

It's non-trivial, but if all you want is an address->function+source map, it's not that hard to parse.  Breakpad does some extra work because it needs to walk the stack itself.

You can sort of cheat on the hashing if you know the version/build id, because we have index files:
http://symbols.mozilla.org/firefox/firefox-3.0b3pre-Linux-2008011804-symbols.txt

But yeah, I don't see us doing this.  It would make a great student project though!
Anyway, yeah.  Socorro doesn't actually have the code to do this, we use Breakpad as a black box pretty much.  I'd love to see someone do it.  I've talked about getting someone to implement symbol server support in gdb, because that would be awesome.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Component: Socorro → General
Product: Webtools → Socorro
You need to log in before you can comment on or make changes to this bug.