.Net Core 3.1 Based Stand alone Web API is crashing with stack overflow exception due to the KERNELBASE.dll

Mohammad Bhaji 1 Reputation point

I have a .Net Core 3.1 based Web API created as a standalone package MyApp.exe and installed in a windows based container. Only in certain container instances the WebAPI process MyApp.exe getting crashed randomly. From the application it is not logging any errors. But with the crash Dump got the below information. In the Web API, I am not using any recursive calls there is no possibility of stack overflow exception should occur. What could possibly be the reason for the crash?

Note: I am able to see some crashes of powershell.exe with the information of KERNELBASE.dll in the same container

The Dump file content Unhandled exception at 0x00007FFB2B4456CE (KERNELBASE.dll) in MyApp.exe.dmp: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x0000002E8983EF78).

KERNELBASE.dll!ConsoleCallServerGeneric() Unknown
KERNELBASE.dll!ConsoleCallServer() Unknown
KERNELBASE.dll!SetTEBLangID() Unknown
KERNELBASE.dll!_KernelBaseBaseDllInitialize() Unknown
KERNELBASE.dll!KernelBaseDllInitialize() Unknown
ntdll.dll!LdrpCallInitRoutine() Unknown
ntdll.dll!LdrpInitializeThread() Unknown
ntdll.dll!_LdrpInitialize() Unknown

Azure Service Fabric
Azure Service Fabric
An Azure service that is used to develop microservices and orchestrate containers on Windows and Linux.
235 questions
Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
576 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,078 questions
{count} votes