-
Notifications
You must be signed in to change notification settings - Fork 140
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
Crash in ILRewriter for a .NET 6 app in w3wp #5799
Comments
Hello 🙂 Sorry for the crash and thanks for the thorough preliminary investigation. It would really help if you could send us the memory dump so I can look at the method being rewritten. Any chance you could open a support ticket, to have a private channel to send the dump? |
Reported as https://help.datadoghq.com/hc/requests/1782753 Spotted something very curious in the logs right before the crash:
|
I was able to repro on 2.55 again this morning with a fresh set of eyes, so I've attached a crash dump to the support ticket for that as well. :) |
Thanks for the dumps. We're unclear on the root cause (though running both .NET Framework and .NET Core in the same pool is known to mess up with our instrumentation, so that could be it), but we've identified the logic error that caused the tracer to crash instead of handling the error condition gracefully. We're working on a fix. |
## Summary of changes Fix error checking when emitting the CallTargetBubbleUpException code. As a bonus, add synchronization when creating the metadata tokens. ## Reason for change If for some reason we fail to create the metadata tokens, we could create an invalid EH clause, which causes an access violation later on. ## Implementation details Converted the calltarget_tokens mutex to a recursive mutex, because the `EnsureBaseCalltargetTokens` methods call each other. ## Test coverage Hard to test, but coincidentally I discovered that the the added synchronization fixes a crash when running powershell with SentinelOne activated. ## Other details Fixes #5799
## Summary of changes Fix error checking when emitting the CallTargetBubbleUpException code. As a bonus, add synchronization when creating the metadata tokens. ## Reason for change If for some reason we fail to create the metadata tokens, we could create an invalid EH clause, which causes an access violation later on. ## Implementation details Converted the calltarget_tokens mutex to a recursive mutex, because the `EnsureBaseCalltargetTokens` methods call each other. ## Test coverage Hard to test, but coincidentally I discovered that the the added synchronization fixes a crash when running powershell with SentinelOne activated. ## Other details Fixes #5799 Backport of #5836 to v2.
Describe the bug
We are observing a crash in the datadog .net tracer when updating from 2.20 to 2.55. 2.49 is also impacted. Unfortunately we are only able to repro this on one of our internal apps so I don't have a repo to share on this public issue, although I can provide a full crash dump and logs through a private channel if that would be helpful.
The code in question uses the
Datadog.Trace.Annotations
library, and the[Trace]
attribute is on the method that is present in the stack when the crash occurs.The method is an overload:
When the crash occurs, we see this in the Application logs:
Capturing a full process dump and loading in visual studio, we see:
The full stack with symbols loaded (2.49)
To Reproduce
procdump64 -ma -e 1 -l -f c0000005 -g <pid>
to capture the dump when the crash happensScreenshots
Runtime environment (please complete the following information):
Additional context
We have several apps using 2.49 in production and have only observed this issue on .NET 6 in this one test environment.
Unfortunately, later in the day when we went to capture a process dump for 2.55, we discovered that the crash was no longer reproducible. We only captured a process dump with the 2.49 tracer in memory. We'll keep an eye out for the crash with 2.55 installed again, and capture a process dump when that occurs.
The text was updated successfully, but these errors were encountered: