getsentry / symbolicator

Native Symbolication as a Service
https://getsentry.github.io/symbolicator/
MIT License
352 stars 45 forks source link

100% repro failure to resolve .exe in Unified Symbols store [PE] #1451

Closed jeffason closed 1 month ago

jeffason commented 1 month ago

Environment

self-hosted 24.3.0

Steps to Reproduce

  1. Open minidump in Visual Studio and attempt to resolve symbols for missing .exe
  2. Look at symbolicator log which provides no debug_id thus the .exe cannot be found even though it exists in the unified symbol store
    symbolicator-1  | 2024-05-01T21:33:53.37153524Z DEBUG symbolicator::endpoints::proxy: Searching for ObjectId { code_id: Some(CodeId(6631f8ea126ec000)), code_file: Some("TimelessClient.exe"), debug_id: None, debug_file: None, debug_checksum: None, object_type: Pe } ([Pe])

Expected Result

I expect the .exe to be found by providing the correct debug id. The log statement should look like this one where it successfully resolves the PDB for the same build:

symbolicator-1  | 2024-05-01T21:33:55.440354302Z DEBUG symbolicator::endpoints::proxy: Searching for ObjectId { code_id: None, code_file: None, debug_id: Some(DebugId { uuid: "cd94d328-4687-4e2d-8f95-d2baf3613459", appendix: 1 }), debug_file: Some("TimelessClient.pdb"), debug_checksum: None, object_type: Pe } ([Pdb])

Actual Result

.exe cannot be resolved from symbol store and we have to manually retrieve them via other means when debugging minidumps

loewenheim commented 1 month ago

Hi, can you upload the debug files (pdb and exe) somewhere or email them to me at sebastian.zivota@sentry.io?

jeffason commented 1 month ago

Hi, can you upload the debug files (pdb and exe) somewhere or email them to me at sebastian.zivota@sentry.io?

Emailed!

loewenheim commented 1 month ago

The root of the problem is in this bit: https://github.com/getsentry/symbolicator/blob/1c032a99500b82e9d6b9ebe78af5292acc44df32/crates/symbolicator-sources/src/paths.rs#L359-L365

In the unified layout, executables need to be looked up by debug id. But Symstore key conventions say it should be possible to look up an executable by timestamp + size. I believe this is currently a fundamental limitation of the unified layout. We'll have to ponder how we can improve this situation.

jeffason commented 1 month ago

The root of the problem is in this bit:

https://github.com/getsentry/symbolicator/blob/1c032a99500b82e9d6b9ebe78af5292acc44df32/crates/symbolicator-sources/src/paths.rs#L359-L365

In the unified layout, executables need to be looked up by debug id. But Symstore key conventions say it should be possible to look up an executable by timestamp + size. I believe this is currently a fundamental limitation of the unified layout. We'll have to ponder how we can improve this situation.

Great find!! In the meantime, it'd be helpful if the documentation reflected this limitation. If we would have known, we definitely would have chosen a different layout that supported this use-case as it's a primary use-case for our devs

loewenheim commented 1 month ago

Great find!! In the meantime, it'd be helpful if the documentation reflected this limitation. If we would have known, we definitely would have chosen a different layout that supported this use-case as it's a primary use-case for our devs

Yes, that is fair. I'll create an issue for updating the docs.