Open Bug 1429869 Opened 6 years ago Updated 2 years ago

Allow uploading symbol files with different paths: <hex>/<filename>

Categories

(Tecken :: Upload, task, P3)

Tracking

(Not tracked)

People

(Reporter: ted, Unassigned)

References

(Blocks 1 open bug)

Details

I'd like to add the Firefox binaries to the symbols.zip on non-Windows platforms (we already add them on Windows), but I'd like to store them with a simpler path, just `<hex string>/<filename>`. "hex string" in this case will either be a UUID or a sha-1 hash, and "filename" will be arbitrary but likely to be things like "libxul.so.gz".

peterbe suggests we would need to change the symbol filter here:
https://github.com/mozilla-services/tecken/blob/35914343e05e6fe9978802ad774bba16597613e0/tecken/upload/views.py#L50
Blocks: 1429871
When filing bug 1429871, I realized that it would also be useful if I could upload files with a path consisting *solely* of a hex string. This is a little weird, but Apple's debugger has support for running scripts to locate symbol files:
http://lldb.llvm.org/symbols.html

But scripts are only given the UUID: 'The shell script will be invoked with a single UUID string value like "23516BE4-29BE-350C-91C9-F36E7999F0F1"', so we'd need to be able to just GET https://symbols.mozilla.org/<UUID> (I'd probably get rid of the dashes.)
So at, for example, https://symbols.mozilla.org/<UUID> you'd get the actual file? No file extension? 
UUIDs usually have a predictable length (including the hyphens). Perhaps we can leverage that to avoid outer routes within Tecken.
Moving Tecken service bugs to Tecken component.
Component: Symbols → Tecken Integration

Moving bugs to Tecken product.

Component: Tecken → Upload
Product: Socorro → Tecken

I don't understand what's involved here and Ted's moved on, so maybe it's not something that needs doing anymore.

I'm going to make it a P3 for now. If nothing happens between now and when I triage again, I'll close it out.

Priority: -- → P3

I think whether it "needs doing" is a question of whether bug 1429871 is worth doing.

Microsoft has a spec called "SSQP" for extending their symbol server to serve binaries and debug info from other platforms:
https://github.com/dotnet/symstore/blob/master/docs/specs/SSQP_Key_Conventions.md

Sentry supports SSQP for fetching files from upstream symbol servers:
https://docs.sentry.io/workflow/debug-files/

If you were going to implement something here it'd make sense to follow the SSQP conventions. And yes, the ultimate goal was to be able to enable the workflow that currently exists on Windows on other platforms:

  • Download an arbitrary minidump from crash-stats
  • Your debugger fetches the matching binaries + symbol files from symbols.mo
  • Your debugger fetches the matching source files from hg.mo
  • You can debug a user's crash in a straightforward way

debuginfod is a server with a REST API that allows fetching binaries/symbols/source files while debugging on Linux. It's functionally very similar to the Microsoft Symbol Server API. It would be nice if Tecken supported this API because support for it has already been integrated into a number of tools including gdb, so this would actually result in benefits to developers when they are using suitably up-to-date tools that have support.

The REST API is pretty simple, AFAICT it's just 4 endpoints:

  • /buildid/BUILDID/debuginfo - This is basically the equivalent of /foo.pdb/<uuid>/foo.pdb for Microsoft symbols. Currently native debug symbols on Linux are uploaded to paths like libxul.so/18EA7B05F750E0EE427A441D1D39253B0/libxul.so.dbg.gz (taken from this build), and that UUID is not the actual Build ID so that wouldn't work directly. The Firefox build could be changed to put things in a different path, the only thing that might break is people using my GDB symbol server script, but that could be easily fixed to cope.
  • /buildid/BUILDID/executable - This is the equivalent of /foo.dll/<hex>/foo.dll. This would need work on the Firefox build side (bug 1429871).
  • /buildid/BUILDID/source/SOURCE/FILE - supporting this would require a bunch of extra work, it seems like something that could be put off to a later date.
  • /metrics - this is probably not important.

The Sentry folks added support for fetching symbols from debuginfod servers recently, that might be interesting to look at.

Symbolicator has come a long way in the last year. I think it's time we look into replacing Tecken with it. I'll write up another bug for that.

You need to log in before you can comment on or make changes to this bug.