Skip to content

sentry-cli uploading PDBs fails when symbols embedded #2073

Closed

Description

@bruno-garcia

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.

Activity

  1. vaind commented on Dec 6, 2022

    @vaind
    Contributor

    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)

  2. changed the title [-]sentry-cli uploading PDBs fail on `Sentry`[/-] [+]sentry-cli uploading PDBs fails when symbols embedded[/+] on Jan 6, 2023
  3. mattjohnsonpint commented on Jan 6, 2023

    @mattjohnsonpint
    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.

  4. mattjohnsonpint commented on Jan 6, 2023

    @mattjohnsonpint
    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.

  5. vaind commented on Jan 9, 2023

    @vaind
    Contributor

    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.

  6. self-assigned this
    on Jan 9, 2023
  7. mattjohnsonpint commented on Jan 10, 2023

    @mattjohnsonpint
    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>

  8. mattjohnsonpint commented on Jan 10, 2023

    @mattjohnsonpint
    Contributor

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

  9. mattjohnsonpint commented on Jan 10, 2023

    @mattjohnsonpint
    Contributor

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

  10. mattjohnsonpint commented on Jan 30, 2023

    @mattjohnsonpint
    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

  11. mattjohnsonpint commented on Jan 30, 2023

    @mattjohnsonpint
    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.

  12. mattjohnsonpint commented on Feb 8, 2023

    @mattjohnsonpint
    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.

  13. vaind commented on Feb 8, 2023

    @vaind
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

FeatureNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions