The process was terminated due to an internal error in the .NET Runtime
Closed this issue · 2 comments
Describe the bug
Running a .net core hosting bundle app in iis results in massive app crashes.
To Reproduce
Steps to reproduce the behavior:
- install datadog agent
- install datadog trace
- install .net core 8 app in iis
- See error
CoreCLR Version: 8.0.824.36612
.NET Version: 8.0.8
Description: The process was terminated due to an internal error in the .NET Runtime at IP 0x00007FFCFCA63104 (0x00007FFCFCA30000) with exit code 0x80131506.
Could not load type 'Datadog.Trace.ClrProfiler.AutoInstrumentation.AspNetCore.UserEvents.AuthenticationHttpContextExtensionsIntegration' from assembly 'Datadog.Trace, Version=3.3.1.0, Culture=neutral, PublicKeyToken=def86d061d0d2eeb'.
Expected behavior
Does not crash my app.
Runtime environment (please complete the following information):
- Tracer version: 3.3.1.0
- OS: Windows Server 2016
- CLR: .NET Core 8
Additional context
We tried to exclude the app pool in the iis checks, that does not help.
dd doc: https://docs.datadoghq.com/tracing/trace_collection/automatic_instrumentation/dd_libraries/dotnet-framework/?tab=windows
Thanks for the report. We're actively looking into it but this is a complex issue. Ultimately, Universal.Server.exe
somehow ends up loading the .NET Framework version of Datadog.Trace.dll (stored in the GAC when installing the tracer) despite being a .NET Core process. I have yet to understand how it happens. For now, the only mitigation I can suggest is disabling auto-instrumentation for Universal.Server.exe
(for instance, by setting DD_PROFILER_EXCLUDE_PROCESSES=Universal.Server.exe
).
Hi @Omzig this should be fixed in v3.4.0. Thanks!