SEHException from QuickPulseTelemetryModule.StateThreadWorker #1088
Description
When using Application Insights in .NET console application, sometimes the process crashes with below exception. Although the exception itself comes from .NET code, it looks like this code is called from QuickPulseTelemetryModule. Any ideas what might be causing this error?
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.SEHException
at System.Threading.Monitor.ObjWait(Boolean, Int32, System.Object)
at System.Threading.Monitor.Wait(System.Object, Int32, Boolean)
at System.Threading.Monitor.Wait(System.Object, Int32)
at System.Threading.ManualResetEventSlim.Wait(Int32, System.Threading.CancellationToken)
at System.Threading.Tasks.Task.SpinThenBlockingWait(Int32, System.Threading.CancellationToken)
at System.Threading.Tasks.Task.InternalWait(Int32, System.Threading.CancellationToken)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
at Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.StateThreadWorker(System.Threading.CancellationToken)
at Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.Implementation.QuickPulse.Helpers.QuickPulseThreadModuleScheduler+State.Worker(System.Object)
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart(System.Object)
Version Info
SDK Version : 2.7.2
.NET Version : 4.6.2
How Application was onboarded with SDK(VisualStudio/StatusMonitor/Azure Extension) : Visual Studio
OS : Windows 10
Hosting Info (IIS/Azure WebApps/ etc) : Azure App Service