DataDog / datadog-aas-extension

Datadog Azure App Services Site Extension
Apache License 2.0
9 stars 12 forks source link

Common Language Runtime detected an invalid program #119

Open mjromka opened 2 years ago

mjromka commented 2 years ago

I have two Azure app services with the same .NET Framework 4.8 app. The first has .NET Datadog APM extension v. 1.6.0 installed and works fine for a while, on the second I've just installed the latest version 2.6.0 and I could not get the site working anymore getting the following exception on each request:

System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.InvalidProgramException: Common Language Runtime detected an invalid program.
   at EFCache.CachingCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
   at System.Data.Entity.Internal.InterceptableDbCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
   --- End of inner exception stack trace ---
   at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
   at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__5()
   at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
   at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)

When I installed v. 1.6.0 on the second app service it started working fine.

andrewlock commented 2 years ago

Hi @MJRomka, really sorry to hear that, thanks for raising the issue!

Would it be possible to share the tracer log files for your application? These can be found in the Kudu dashboard (From your AAS application choose Advanced Tools -> Go).

If you view the Debug Console (either CMD or powershell), you can find the Log files in LogFiles/Datadog. If you could send those to us then we can dig in and find out what's going on.

Additionally, could you please create a support ticket by contacting support@datadoghq.com and referencing this GitHub issue, and we'll look into it ASAP. Thank you!

mjromka commented 2 years ago

v2_6_000.zip Thank you for a quick response, @andrewlock Please, find logs attached. I will create a ticket later, if possible

andrewlock commented 2 years ago

Hi @MJRomka, unfortunately those logs don't include any of the details we'll need to pin point the problem 🙁

To make sure I don't waste your time, it would be best to create a support ticket so we can collect all the details we need at once and get to the bottom of this. Thanks again.

mjromka commented 2 years ago

The ticket has been submitted: https://help.datadoghq.com/hc/en-us/requests/790370