getsentry / symbolicator

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

Mistaken download of HTML file from dev.azure.com during C# symbolication #1457

Open loewenheim opened 1 month ago

loewenheim commented 1 month ago

We have seen cases of portable pdb files with source links to dev.azure.com/path/to/source/file. Trying to fetch such a file results in a login page being downloaded and used to apply source context, which is clearly nonsensical.

The page in question can be found by running

❯ curl -L 'https://dev.azure.com/foo/bar.cs'

The best thing to do would be to download the file and use it, but failing that, it would be better to apply no source context. It's currently unclear to me if downloading such a source file is even possible in principle. We already have this comment that seems apposite: https://github.com/getsentry/symbolicator/blob/5499fff962b4abe4295907622c3213f2a4ed57d3/crates/symbolicator-native/src/symbolication/module_lookup.rs#L411-L412

klemmchr commented 1 month ago

We are having the same issue. I don't have insights on how symbolicator works internally but I find it a bit strange that it attempts to download external code instead of using the source code provided. We are using the MSBuild integration which has a flag to also upload sources. My assumption would be that these source files would be used when displaying in-app stacktrace sources.

loewenheim commented 1 month ago

It should already work like that—the source should only be downloaded if it's not available. Are you self-hosting? Do you have an event you can link to that exhibits this problem?

klemmchr commented 1 month ago

No, we are not self-hosting. I've already created a support ticket for this issue and got redirected here. It seems that no source files are uploaded in the first place when looking at the build log:

Found 108 debug information files (108 with embedded sources) Resolved source code for 0 debug information files Prepared debug information files for upload Uploaded 66 missing debug information files

Unfortunately I cannot link an event for compliance reasons.