Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sentry-cli uploading PDBs fails when symbols embedded #2073

Closed
bruno-garcia opened this issue Dec 5, 2022 · 12 comments
Closed

sentry-cli uploading PDBs fails when symbols embedded #2073

bruno-garcia opened this issue Dec 5, 2022 · 12 comments
Assignees
Labels
Feature New feature or request

Comments

@bruno-garcia
Copy link
Member

In the Portable PDB PR: #2050

An error happens on the Sentry.dll because of missing pdb. Even though it's possible some DLLs won't have PDBs, it doesn't mean debug info isn't available.

In the case of Sentry.dll, the debug information is embedded in the DLL itself:

<DebugType>embedded</DebugType>

We need to be able to read the debug info from the DLL and upload that to Sentry to support line numbers/paths.

@vaind
Copy link
Collaborator

vaind commented Dec 5, 2022

@vaind
Copy link
Collaborator

vaind commented Dec 6, 2022

While I'm on board with supporting this in CLI, maybe we should additionally consider switching to portable PDB at some point. Here's what it does to the android sample app:

WIth embedded debug info in build.props

image

With portable PDB in build.props

image

So single-target builds are about 75 KiB smaller (APK has all the architectures that's why the diff is larger)

@mattjohnsonpint mattjohnsonpint changed the title sentry-cli uploading PDBs fail on Sentry sentry-cli uploading PDBs fails when symbols embedded Jan 6, 2023
@mattjohnsonpint
Copy link
Contributor

It's not just Sentry.dll, but customers will see this too when symbols are embedded. Though they might still get stack trace info in such cases - unless it's later trimmed out.

It would be good to get this fixed in sentry-cli itself.

@mattjohnsonpint
Copy link
Contributor

But yes, also I think we can stop embedding symbols in our own dlls. Instead, we should make sure we publish symbols packages (.snupkg) with our nugets so customers will still get sources with Source Link.

@vaind
Copy link
Collaborator

vaind commented Jan 9, 2023

Embedded symbols should be supported with the next release of CLI (assuming it gets the latest symbolic included). I'm keeping track of that so I'll assign this issue to myself too.

@vaind vaind self-assigned this Jan 9, 2023
@mattjohnsonpint
Copy link
Contributor

Is there any benefit though? If the symbols are embedded, won't we always get line numbers in the actual stack trace - thus making symbolication a no-op?

Note to self - If that's not the case, then when we bump the CLI we should also remove And '$(DebugType)' != 'embedded' from this line:

<SentryUploadSymbols Condition="'$(SentryUploadSymbols)' == '' And '$(Configuration)' == 'Release' And '$(DebugType)' != 'embedded'">true</SentryUploadSymbols>

@mattjohnsonpint
Copy link
Contributor

Also, is there an issue tracking this in sentry-cli? I couldn't find one. Thanks.

@mattjohnsonpint
Copy link
Contributor

Nevermind, found it in Symbolic getsentry/symbolic#734. Thanks

@mattjohnsonpint
Copy link
Contributor

Latest Sentry CLI (2.12.0) doesn't address this. We do get embedded sources when they are part of the pdb file, but we do not get embedded sources or symbols when they are embedded in the dll. See getsentry/symbolic#750

@mattjohnsonpint
Copy link
Contributor

Is there any benefit though? If the symbols are embedded...

Just to answer myself here, the benefit is largely to have embedded sources, but also I have seen at least one case where even though the symbols were originally embedded, .NET did not include filenames/line-numbers in the stack trace. This was on an Android app, so I suspect the embedded symbols in the library were stripped out when the app was built.

@mattjohnsonpint
Copy link
Contributor

Note, with #2166 this issue no longer affects the Sentry .NET SDKs. However, it could still affect a user if they are embedding symbols in their own project, so we should keep this issue open until we have an updated Symbolic + Sentry CLI that handles it.

@vaind
Copy link
Collaborator

vaind commented Feb 8, 2023

closed via getsentry/sentry-cli#1463 and will be available in the next CLI release

@vaind vaind closed this as completed Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
Archived in project
Development

No branches or pull requests

3 participants