InvalidProgramException in 1.9.0 on .NET Core 2.2
See original GitHub issueDescribe the bug API throws an exception rather than completing request
To Reproduce Steps to reproduce the behavior:
- Do lots of API requests, and eventually there will be a period of time where many of them throw this exception
Expected behavior Exception is not thrown, and API requests completes normally.
Runtime environment (please complete the following information):
- Instrumentation mode: manual with NuGet package
- Tracer version: 1.9.0
- OS: docker image
microsoft/dotnet:2.2-aspnetcore-runtime
in EKS kubernetes cluster - CLR: .Net Core 2.2
Additional context Stack trace:
System.InvalidProgramException: Common Language Runtime detected an invalid program.
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultFilters()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
at Rethrow(Object )
at Datadog.Trace.ClrProfiler.Integrations.AspNetCoreMvc2Integration.Rethrow(Object context, Int32 opCode, Int32 mdToken, Int64 moduleVersionPtr)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Elmah.Io.AspNetCore.ElmahIoMiddleware.Invoke(HttpContext context)
Packages related to Elmah:
<ItemGroup>
<PackageReference Include="Elmah.Io.AspNetCore" Version="3.7.82" />
<PackageReference Include="Elmah.Io.Client" Version="3.6.73" />
</ItemGroup>
Mentioned this in #541 after I upgraded to 1.9.0 hoping this issue was fixed. We currently have DataDog tracing disabled in our production API until the issue no longer happens in QA. Maybe related to #564
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
InvalidProgramException in 1.9.0 in .NET Core 2.2 / Fargate
Today I spot again "System.InvalidProgramException: Common Language Runtime detected an invalid program" errors in our logs. To Reproduce
Read more >InvalidProgramException Class (System)
Initializes a new instance of the InvalidProgramException class with a specified error message and a reference to the inner exception that is the...
Read more >Angular application does not start under dotnet core / IIS
The problem looks like a bug in how Visual studio handles the startup of the angular server in debug mode: app.UseSpa(spa => {...
Read more >Common Language Runtime detected an invalid program
It currently seems that solution found from .Net Core Clr issue 18323 has helped to solve this issue for us, but this cannot...
Read more >Untitled
Common language runtime detected an invalid program .net core ... C# code to insert a block or text - CodeProject InvalidProgramException in 1.9.0...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I haven’t had this issue since forcing the docker image to use 2.2.8 instead of whatever 2.2 version it had cached. I tried that after seeing comments in #564.
Hey all - we expect this issue to be resolved in later versions of the tracer. We’re going to close this issue but please do reach out again if you run into any problems!