Launch Crash in __report_gsfailure affecting .NET 6, .NET 9, and .NET Framework
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
### Description
I am escalating a critical launch-time crash issue confirmed through my end-users feedback.
On a Windows 10 19041 device, all applications targeting .NET 6, .NET 9, and .NET Framework exhibit identical immediate crash behavior upon launch. This issue is not isolated to custom-built apps—it also impacts system components relying on .NET Framework.
The unhandled core exception captured in dump file is:
> Unhandled exception at 0x6AE3D389 (coreclr.dll): Stack cookie detection code detected a stack-based buffer overflow.
The stack trace:
```
> coreclr.dll!__report_gsfailure(...) Line 220 C
[Inline] coreclr.dll!DoJITFailFast() Line 4431 C++
coreclr.dll!CrawlFrame::SetCurGSCookie(unsigned int * pGSCookie) Line 372 C++
coreclr.dll!StackFrameIterator::Init(Thread * pThread=0x04d36ad0, Frame * pFrame=0x00000000, REGDISPLAY * pRegDisp=0x0ab2ecc0, unsigned int flags=33) Line 1185 C++
coreclr.dll!Thread::StackWalkFramesEx(REGDISPLAY * pRD=0x0ab2ecc0, StackWalkAction(__stdcall*)(CrawlFrame *, void *) pCallback=0x6ae1d5d0, void * pData=0x0ab2eff4, unsigned int flags=33, Frame * pStartFrame=0x00000000) Line 907 C++
coreclr.dll!Thread::StackWalkFrames(StackWalkAction(__stdcall*)(CrawlFrame *, void *) pCallback=0x6ae1d5d0, void * pData=0x0ab2eff4, unsigned int flags=33, Frame * pStartFrame=0x00000000) Line 995 C++
coreclr.dll!SystemDomain::GetCallersModule(StackCrawlMark * stackMark=0x0ab2f158) Line 1785 C++
[Inline] coreclr.dll!SystemDomain::GetCallersAssembly(StackCrawlMark *) Line 1801 C++
coreclr.dll!RuntimeTypeHandle::GetTypeByName(const wchar_t * pwzClassName=0x06e9cb84, int bThrowOnError=1, int bIgnoreCase=0, QCall::StackCrawlMarkHandle pStackMark={...}, QCall::ObjectHandleOnStack pAssemblyLoadContext={...}, QCall::ObjectHandleOnStack retType={...}, QCall::ObjectHandleOnStack keepAlive={...}) Line 1460 C++
System.Private.CoreLib.dll!6a508a51() Unknown
[Miss System.Private.CoreLib.dll Symbol]
System.Private.CoreLib.dll!6a508af2() Unknown
System.Private.CoreLib.dll!6a50ae0a() Unknown
System.Private.CoreLib.dll!6a51aa98() Unknown
System.Configuration.ConfigurationManager.dll!69236aa3() Unknown
System.Configuration.ConfigurationManager.dll!69231d69() Unknown
System.Configuration.ConfigurationManager.dll!6923905c() Unknown
System.Configuration.ConfigurationManager.dll!6922b3fa() Unknown
System.Configuration.ConfigurationManager.dll!69202f90() Unknown
System.Configuration.ConfigurationManager.dll!69201ab4() Unknown
System.Configuration.ConfigurationManager.dll!6920b270() Unknown
System.Configuration.ConfigurationManager.dll!692195be() Unknown
System.Configuration.ConfigurationManager.dll!69219242() Unknown
0d742c9b() Unknown
coreclr.dll!_CallDescrWorkerInternal@4() Unknown
[Inline] coreclr.dll!CallDescrWorkerWithHandler(CallDescrData *) Line 67 C++
coreclr.dll!DispatchCallDebuggerWrapper(CallDescrData * pCallDescrData, int fCriticalCall=0) Line 155 C++
coreclr.dll!DispatchCallSimple(unsigned long * pSrc=0x0ab2f3e8, unsigned long numStackSlotsToCopy=0, unsigned long pTargetAddress=192594800, unsigned long dwDispatchCallSimpleFlags=2) Line 224 C++
coreclr.dll!MethodTable::RunClassInitEx(Object * * pThrowable=0x0ab2f4bc) Line 3181 C++
coreclr.dll!MethodTable::DoRunClassInitThrowing() Line 3369 C++
coreclr.dll!MethodTable::CheckRunClassInitThrowing() Line 3510 C++
coreclr.dll!JIT_GetSharedNonGCStaticBase_Helper(DomainLocalModule * pLocalModule=0x0b5a9098, unsigned long dwClassDomainID=321) Line 1415 C++
04b1337f() Unknown
0d741e12() Unknown
0d741bc0() Unknown
0a5fc07a() Unknown
System.Private.CoreLib.dll!6a603d15() Unknown
System.Private.CoreLib.dll!6a607edd() Unknown
System.Private.CoreLib.dll!6a5efc58() Unknown
System.Private.CoreLib.dll!6a603aa3() Unknown
System.Private.CoreLib.dll!6a6039db() Unknown
System.Private.CoreLib.dll!6a5f7a46() Unknown
System.Private.CoreLib.dll!6a5ff2bc() Unknown
System.Private.CoreLib.dll!6a5e6595() Unknown
coreclr.dll!_CallDescrWorkerInternal@4() Unknown
coreclr.dll!CallDescrWorkerWithHandler(CallDescrData * pCallDescrData=0x0ab2fcb8, int fCriticalCall=115817356) Line 69 C++
coreclr.dll!DispatchCallSimple(unsigned long * pSrc=0x0ab2fcf8, unsigned long numStackSlotsToCopy=0, unsigned long pTargetAddress=167941208, unsigned long dwDispatchCallSimpleFlags=0) Line 220 C++
coreclr.dll!ThreadNative::KickOffThread_Worker(void * ptr=0x0ab2fe04) Line 158 C++
[Inline] coreclr.dll!ManagedThreadBase_DispatchInner(ManagedThreadCallState *) Line 7321 C++
coreclr.dll!ManagedThreadBase_DispatchMiddle(ManagedThreadCallState * pCallState=0x0ab2fdf8) Line 7365 C++
coreclr.dll!ManagedThreadBase_DispatchOuter(ManagedThreadCallState * pCallState) Line 7543 C++
[Inline] coreclr.dll!ManagedThreadBase_FullTransition(void(__stdcall*)(void *)) Line 7569 C++
[Inline] coreclr.dll!ManagedThreadBase::KickOff(void(__stdcall*)(void *)) Line 7604 C++
coreclr.dll!ThreadNative::KickOffThread(void * pass=0x04d36ad0) Line 230 C++
kernel32.dll!7750fcc9() Unknown
ntdll.dll!77d27c6e() Unknown
ntdll.dll!77d27c3e() Unknown
```
The above stack trace is the .NET 6 application. And it seems that crash in `coreclr.dll!RuntimeTypeHandle::GetTypeByName`:
https://github.com/dotnet/runtime/blob/f1dd57165bfd91875761329ac3a8b17f6606ad18/src/coreclr/vm/runtimehandles.cpp#L1461
To confirm the root cause is runtime-related, I tested the system’s .NET Framework-based PowerShell (launched via right-click Start Menu on the same Win10 19041 device). It also crashed immediately, and dump analysis revealed a parallel stack trace:
```
// .NET Framework PowerShell
> clr.dll!__report_gsfailure() Unknown
clr.dll!CrawlFrame::SetCurGSCookie(unsigned __int64 *) Unknown
clr.dll!ExceptionTracker::ProcessOSExceptionNotification() Unknown
clr.dll!ProcessCLRException() Unknown
ntdll.dll!RtlpExecuteHandlerForException() Unknown
ntdll.dll!RtlDispatchException() Unknown
ntdll.dll!KiUserExceptionDispatch() Unknown
KERNELBASE.dll!00007ff9a78fcf19() Unknown
clr.dll!RaiseTheExceptionInternalOnly() Unknown
clr.dll!IL_Throw() Unknown
mscorlib.ni.dll!00007ff9394e66ec() Unknown
mscorlib.ni.dll!00007ff939a9aa3b() Unknown
System.ni.dll!00007ff9383cc203() Unknown
System.ni.dll!00007ff9383ccb43() Unknown
System.ni.dll!00007ff9383d11b5() Unknown
System.ni.dll!00007ff9383d17c5() Unknown
System.ni.dll!00007ff9383cda87() Unknown
00007ff8dab5e169() Unknown
00007ff8dab5ca3c() Unknown
00007ff8dab5139f() Unknown
00007ff8dab3ee59() Unknown
00007ff8dab3e780() Unknown
00007ff8dab3e65f() Unknown
mscorlib.ni.dll!00007ff938d1d0c7() Unknown
mscorlib.ni.dll!00007ff938cb00b2() Unknown
mscorlib.ni.dll!00007ff938caff35() Unknown
mscorlib.ni.dll!00007ff938d1d381() Unknown
mscorlib.ni.dll!00007ff938d1ca61() Unknown
mscorlib.ni.dll!00007ff938c7ae46() Unknown
clr.dll!CallDescrWorkerInternal() Unknown
clr.dll!CallDescrWorkerWithHandler() Unknown
clr.dll!MethodDescCallSite::CallTargetWorker() Unknown
clr.dll!QueueUserWorkItemManagedCallback(void *) Unknown
clr.dll!ManagedThreadBase_DispatchInner() Unknown
clr.dll!ManagedThreadBase_DispatchMiddle() Unknown
clr.dll!ManagedThreadBase_DispatchOuter() Unknown
clr.dll!ManagedThreadBase_FullTransitionWithAD() Unknown
clr.dll!ManagedPerAppDomainTPCount::DispatchWorkItem() Unknown
clr.dll!ThreadpoolMgr::ExecuteWorkRequest() Unknown
clr.dll!ThreadpoolMgr::WorkerThreadStart() Unknown
clr.dll!Thread::intermediateThreadProc(void *) Unknown
kernel32.dll!00007ff9aa007344() Unknown
ntdll.dll!RtlUserThreadStart() Unknown
```
### Reproduction Steps
Just lauch any .NET application.
### Expected behavior
The application can run.
### Actual behavior
Launch Crash
### Regression?
_No response_
### Known Workarounds
_No response_
### Configuration
_No response_
### Other information
To be honest, I don't think this is a .NET issue. I'm reporting this here not expecting it to be resolved, as the information I can provide is quite limited. My sole reason for posting this is simply to make it discoverable for other developers who might run into the same problem.
I try run `sfc /scannow` and `dism /online /Cleanup-Image /RestoreHealth`, and update the system to install the patch. But I can not fix this issues.
Reference:
- https://github.com/dotnet/runtime/issues/89309
- https://github.com/dotnet/runtime/issues/91665
Contributor guide
Assessment
This issue has not been assessed yet.