runtime - Stack Overflow Exception in .NET System.Private.CoreLib.DLL

I have an ASP.NET Core 9 application running as a service. After the latest upgrades of nuget packages,

I have an ASP.NET Core 9 application running as a service. After the latest upgrades of nuget packages, the application crashes periodically with a StackOverflow exception:

I tried to reproduce it, but I couldn't. So I attached the Visual Studio debugger and let it run until it happened again.

The call stack does not touch any application code and looks confined into System.Private.CoreLib.DLL

[Managed to Native Transition]
System.Private.CoreLib.dll!Interop.Advapi32.EventWriteTransfer(long registrationHandle, System.Diagnostics.Tracing.EventDescriptor eventDescriptor, System.Guid* activityId, System.Guid* relatedActivityId, int userDataCount, System.Diagnostics.Tracing.EventProvider.EventData* userData) Line 3853
    at -\Interop.cs(3853)
System.Private.CoreLib.dll!System.Diagnostics.Tracing.EventSource.WriteEventWithRelatedActivityIdCore(int eventId, System.Guid* relatedActivityId, int eventDataCount, System.Diagnostics.Tracing.EventSource.EventData* data) Line 1126
    at System.Diagnostics.Tracing\EventSource.cs(1126)
System.Private.CoreLib.dll!System.Diagnostics.Tracing.EventSource.WriteEvent(int eventId, int arg1, int arg2) Line 681
    at System.Diagnostics.Tracing\EventSource.cs(681)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishStageTwo() Line 2154
    at System.Threading.Tasks\Task.cs(2154)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ProcessChildCompletion(System.Threading.Tasks.Task childTask) Line 2210
    at System.Threading.Tasks\Task.cs(2210)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishStageTwo() Line 2166
    at System.Threading.Tasks\Task.cs(2166)
[The 2 frame(s) above this were repeated 6033 times]
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ProcessChildCompletion(System.Threading.Tasks.Task childTask) Line 2210
    at System.Threading.Tasks\Task.cs(2210)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishStageTwo() Line 2166
    at System.Threading.Tasks\Task.cs(2166)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ProcessChildCompletion(System.Threading.Tasks.Task childTask) Line 2210
    at System.Threading.Tasks\Task.cs(2210)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishStageTwo() Line 2166
    at System.Threading.Tasks\Task.cs(2166)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ProcessChildCompletion(System.Threading.Tasks.Task childTask) Line 2210
    at System.Threading.Tasks\Task.cs(2210)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishStageTwo() Line 2166
    at System.Threading.Tasks\Task.cs(2166)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ProcessChildCompletion(System.Threading.Tasks.Task childTask) Line 2210
    at System.Threading.Tasks\Task.cs(2210)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishStageTwo() Line 2166
    at System.Threading.Tasks\Task.cs(2166)
.
.
.
.
.
.
.
.
    at System.Threading.Tasks\Task.cs(2210)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishStageTwo() Line 2166
    at System.Threading.Tasks\Task.cs(2166)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ProcessChildCompletion(System.Threading.Tasks.Task childTask) Line 2210
    at System.Threading.Tasks\Task.cs(2210)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishStageTwo() Line 2166
    at System.Threading.Tasks\Task.cs(2166)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ProcessChildCompletion(System.Threading.Tasks.Task childTask) Line 2210
    at System.Threading.Tasks\Task.cs(2210)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishStageTwo() Line 2166
    at System.Threading.Tasks\Task.cs(2166)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ProcessChildCompletion(System.Threading.Tasks.Task childTask) Line 2210
    at System.Threading.Tasks\Task.cs(2210)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishStageTwo() Line 2166
    at System.Threading.Tasks\Task.cs(2166)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishSlow(bool userDelegateExecute) Line 2098
    at System.Threading.Tasks\Task.cs(2098)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot, System.Threading.Thread threadPoolThread) Line 2328
    at System.Threading.Tasks\Task.cs(2328)
System.Private.CoreLib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Line 789
    at System.Threading\ThreadPoolWorkQueue.cs(789)
System.Private.CoreLib.dll!System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() Line 1175
    at System.Threading\PortableThreadPool.cs(1175)

This is the Visual studio screen when the error occurs:

A bug in github for this issue has been created, but I wish to replicate it here hoping to shorten the time of a solution, as it looks quite critical and concerning.

UPDATE

Waiting for someone on the .NET Team to have a look at this issue, I had to do something to avoid the crash ()

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744883296a4598969.html

相关推荐

  • runtime - Stack Overflow Exception in .NET System.Private.CoreLib.DLL

    I have an ASP.NET Core 9 application running as a service. After the latest upgrades of nuget packages,

    1天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信