Reported excp source StackTrace line does not match actual excp source line
See original GitHub issuePackage
Sentry.AspNetCore
.NET Flavor
.NET Core
.NET Version
3.1.416
OS
Linux
SDK Version
3.30.0
Self-Hosted Sentry Version
No response
Steps to Reproduce
Hi.
We enabled uploading source and symbols using Portable PDB netcoreapp31 (publish in docker), and we are observing non-matching src stacktrace line with actual excp line. Example in screenshot, line highlighted is a return statement which has nothing with the Exception that is thrown:
We do the build inside docker like:
ENV SENTRY_LOG_LEVEL=info
RUN dotnet publish -c release -o /app -r $PLATFORM -p:UseSentryCLI=true -p:SentryOrg=$ORGNAME \
-p:SentryProject=$PROJNAME -p:SentryUploadSymbols=true -p:SentryUploadSources=true \
--self-contained true --no-restore -p:PublishReadyToRun=true -p:DebugType=Portable -p:DebugSymbols=true
Should changing to DebugType=Full
be of any help?
If it helps:
ISSUE ID: 3894189831 PROJECT ID: 5239187
We are NOT self-hosted you can reach me out private to give out subdomain ID.
We upgraded from 3.13 SDK and did not have issues in showing the exact correct matching line where the exception occurs. We did not used PDB and source upload, we only had stacktrace info but it was correct.
Expected Result
Highlighted line should be showing the throw CreateMyException()
L763.
Actual Result
The actual exception is explicitly thrown 13 lines after in L763. The highlighted code is not relevant to the exception.
part of logs with our exe REST WEB API being built and reported with Sentry in docker:
#33 60.34 RedactedProjectName -> /source/RedactedProjectName/bin/linux-musl-x64/release/netcoreapp3.1/linux-musl-x64/RedactedProjectName.dll
#33 60.44 INFO 2023-04-21 11:42:22.049859105 +00:00 sentry-cli was invoked with the following command line: "/root/.nuget/packages/sentry/3.30.0/tools/sentry-cli-Linux-x86_64" "info" "--no-defaults"
#33 162.3 Some ReadyToRun compilations emitted warnings, indicating potential missing dependencies. Missing dependencies could potentially cause runtime failures. To show the warnings, set the PublishReadyToRunShowWarnings property to true.
#33 166.9 RedactedProjectName -> /app/
#33 166.9 Preparing to upload debug symbols and sources to Sentry for RedactedProjectName (release/netcoreapp3.1)
#33 166.9 INFO 2023-04-21 11:44:08.525740235 +00:00 sentry-cli was invoked with the following command line: "/root/.nuget/packages/sentry/3.30.0/tools/sentry-cli-Linux-x86_64" "dif" "upload" "--org" "RedactedProjectName" "--project" "RedactedProjectName-api" "--include-sources" "obj/linux-musl-x64/release/netcoreapp3.1/linux-musl-x64/"
#33 166.9 INFO 2023-04-21 11:44:08.526156313 +00:00 Issuing a command for Organization: RedactedProjectName Project: RedactedProjectName-api
#33 167.5 > Found 9 debug information files (4 with embedded sources)
#33 167.6 > Resolved source code for 1 debug information file
#33 167.6 > Prepared debug information files for upload
#33 168.3 > Uploaded 2 missing debug information files
#33 168.5 > File upload complete:
#33 168.5
#33 168.5 PENDING 6de92202-c49f-4a5b-a2da-6f8285d2c8f2-df7452e3 (RedactedProjectName.pdb; unknown debug companion)
#33 168.5 PENDING 6de92202-c49f-4a5b-a2da-6f8285d2c8f2-df7452e3 (RedactedProjectName.pdb; unknown sources)
part of logs with our lib used by exe REST WEB API where the mismatch occurs:
#33 37.15 RedactedProjectNameLib -> /source/RedactedProjectNameLib/bin/linux-musl-x64/release/netstandard2.0/RedactedProjectNameLib.dll
#33 37.21 INFO 2023-04-21 11:41:58.818782460 +00:00 sentry-cli was invoked with the following command line: "/root/.nuget/packages/sentry/3.30.0/tools/sentry-cli-Linux-x86_64" "info" "--no-defaults"
#33 37.81 Preparing to upload debug symbols and sources to Sentry for RedactedProjectNameLib (release/netstandard2.0)
#33 37.82 INFO 2023-04-21 11:41:59.428935237 +00:00 sentry-cli was invoked with the following command line: "/root/.nuget/packages/sentry/3.30.0/tools/sentry-cli-Linux-x86_64" "dif" "upload" "--org" "RedactedProjectName" "--project" "RedactedProjectName-api" "--include-sources" "obj/linux-musl-x64/release/netstandard2.0/"
#33 37.82 INFO 2023-04-21 11:41:59.429024215 +00:00 Issuing a command for Organization: RedactedProjectName Project: RedactedProjectName-api
#33 38.36 > Found 1 debug information file
#33 38.42 > Resolved source code for 1 debug information file
#33 38.42 > Prepared debug information files for upload
#33 39.16 > Uploaded 2 missing debug information files
#33 39.34 > File upload complete:
#33 39.34
#33 39.34 PENDING 9fb191da-e926-43fd-8823-ce5bc7b5795b-8a378395 (RedactedProjectNameLib.pdb; unknown sources)
#33 39.34 PENDING 9fb191da-e926-43fd-8823-ce5bc7b5795b-8a378395 (RedactedProjectNameLib.pdb; unknown debug companion)
Issue Analytics
- State:
- Created 5 months ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
Thanks for coming back at me Matt.
Unfortunately I am not in a position to provide a min repro. What I can tell you is this does not occur often, it is more of an exception and I’d safely say not up to you guys but dotnet itself per related issue you linked before.
What I can tell you, if its worth having open this issue, is that we are just testing an upgrade of project from netcoreapp3.1 to net7 and I will see we get issues reported there with this problem. Maybe best close the issue also and I can come back at you with more info later as this could take up to 10 days or more for a confirmation.
(We are not opting to the new trimming feature also… that’s a different kind of beast with newer dotnet!)
We still have to address warnings also.
It could also possibly be related to https://github.com/dotnet/runtime/issues/44986 or another similar issue.