getsentry/symbolic

Embedded symbols/sources not found

mattjohnsonpint opened this issue · 9 comments

Environment

Sentry-CLI 2.12.0

Steps to Reproduce

  1. Using .NET 6 or .NET 7 SDK, create a new class library
dotnet new classlib -n MyLib
cd MyLib
  1. Modify MyLib.csproj and add the following to the existing property group, which tells the compiler to embed debug info into the dll/exe itself. Reference here.
<DebugType>embedded</DebugType>
  1. Build in release configuration:
dotnet build -c Release
  1. Check the resulting file with Sentry CLI:
sentry-cli dif check bin/Release/net7.0/MyLib.dll

Expected Result

Should have found debug symbols and sources. This works if we build without embedded sources and check the pdb file, but not when we use embedded sources and check the dll.

Actual Result

Nothing found in the dll.

Debug Info File Check
  Type: pe library
  Contained debug identifiers:
    > Debug ID: 940225b8-316b-46cd-b6c5-4e6a5a6613d7-1
      Code ID:  8be87e768000
      Arch:     x86
  Contained debug information:
    > none
  Usable: no (missing debug or unwind information)

Doesn't work with dif upload either.

I presume this is a symbolic issue, not specifically sentry-cli. But let me know. Thanks.

vaind commented

Duplicate of getsentry/sentry-dotnet#2073 though that's in the dotnet repo

There is a bunch of PRs that I never finished to read the "correct" deterministic debug id from the dll, as well as provide access to the underlying .NET metadata from the dll: #658 and #659
I believe if we finish those up, we should be able to use the dll directly, instead of requiring a pdb. Might be some work though.
Can you provide us with a small fixture to test against?

vaind commented

I'll have a look if I can pick those up @Swatinem

vaind commented

FYI, some of the PRs are merged now but this issue is not resolved yet. I'm currently jumping through the hoops to get DLL-with-PPDB picked up by the CLI properly (or just extract the PPDB) and also get it processed in the symbolicator afterwards. While trying to avoid having to decompressed the PPDB on each function call...

I believe sentry-cli should pick up a DLL just like any other? Or does it reject .NET dlls?

vaind commented

I believe sentry-cli should pick up a DLL just like any other? Or does it reject .NET dlls?

It skips these DLLs because they don't have any of the looked-for "features". It's actually also pasted in the original issue description above, in Actual Result

Ohhhh, I understand. Well, I would just say "debug info: true" if it has an embedded ppdb. because that is quite literally the debug info.