Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GC stackwalking crashing on calli with generics #99253

Closed
jkotas opened this issue Mar 4, 2024 · 1 comment · Fixed by #99257
Closed

GC stackwalking crashing on calli with generics #99253

jkotas opened this issue Mar 4, 2024 · 1 comment · Fixed by #99257

Comments

@jkotas
Copy link
Member

jkotas commented Mar 4, 2024

From #95565 (comment)

Running RunGenericFunctionPointerTest...
Testing GenericCalli with int as the return type

Assert failure(PID 4248 [0x00001098], Thread: 1976 [0x07b8]): CONTRACT VIOLATION by operator new at "D:\a\_work\1\s\src\coreclr\utilcode\clrhost_nodependencies.cpp":301

THROWS called in a NOTHROW region.

VIOLATED-->  CONTRACT in MetaSig::GetElemSize at "D:\a\_work\1\s\src\coreclr\vm\siginfo.cpp":2598
                        FAULT_FORBID in ScanStackRoots at "D:\a\_work\1\s\src\coreclr\vm\gcenv.ee.cpp":128
                        GCX_NOTRIGGER in ScanStackRoots at "D:\a\_work\1\s\src\coreclr\vm\gcenv.ee.cpp":128
                        CANNOTTHROW in ScanStackRoots at "D:\a\_work\1\s\src\coreclr\vm\gcenv.ee.cpp":128
                        CONTRACT in GetILStubForCalli at "D:\a\_work\1\s\src\coreclr\vm\dllimport.cpp":5991
                        CONTRACT in MethodDescCallSite::CallTargetWorker at "D:\a\_work\1\s\src\coreclr\vm\callhelpers.cpp":280
                        GCX_COOP in Assembly::ExecuteMainMethod at "D:\a\_work\1\s\src\coreclr\vm\assembly.cpp":1409
                        CONTRACT in Assembly::ExecuteMainMethod at "D:\a\_work\1\s\src\coreclr\vm\assembly.cpp":1395
                        GCX_COOP in CorHost2::ExecuteAssembly at "D:\a\_work\1\s\src\coreclr\vm\corhost.cpp":329
                        CONTRACT in CorHost2::ExecuteAssembly at "D:\a\_work\1\s\src\coreclr\vm\corhost.cpp":269


000000b8`0a5769e0 00007ffb`29614f4c KERNELBASE!RaiseFailFastException+0xae
000000b8`0a576fb0 00007ffb`296147f5 coreclr!_DbgBreakCheck+0x2ec
000000b8`0a578120 00007ffb`296149ff coreclr!_DbgBreakCheckNoThrow+0x55
000000b8`0a5781d0 00007ffb`28df3810 coreclr!DbgAssertDialog+0x1af
000000b8`0a5782f0 00007ffb`295d16ae coreclr!CONTRACT_ASSERT+0x320
(Inline Function) --------`-------- coreclr!ClrDebugState::CheckOkayToThrow+0x40
(Inline Function) --------`-------- coreclr!RealCLRThrowsExceptionWorker+0x81
000000b8`0a57b9c0 00007ffb`295d839e coreclr!operator new+0x9e
000000b8`0a57ba10 00007ffb`29096670 coreclr!ThrowHR+0x7e
000000b8`0a57ba90 00007ffb`28e038b1 coreclr!MetaSig::GetElemSize+0x220
000000b8`0a57bb60 00007ffb`28f5a41c coreclr!ArgIteratorTemplate<ArgIteratorBase>::GetNextOffset+0x141
000000b8`0a57bb90 00007ffb`28f56dfa coreclr!TransitionFrame::PromoteCallerStackHelper+0x1ac
(Inline Function) --------`-------- coreclr!`::PromoteCallerStack+0xdb
000000b8`0a57bc40 00007ffb`291dfe01 coreclr!PInvokeCalliFrame::GcScanRoots+0xfa
000000b8`0a57bd10 00007ffb`290a7354 coreclr!GcStackCrawlCallBack+0x471
(Inline Function) --------`-------- coreclr!Thread::MakeStackwalkerCallback+0x72
000000b8`0a57bf10 00007ffb`290a703f coreclr!Thread::StackWalkFramesEx+0x274
000000b8`0a57c320 00007ffb`291de7a4 coreclr!Thread::StackWalkFrames+0x17f
000000b8`0a57d450 00007ffb`291dbff7 coreclr!ScanStackRoots+0x254
000000b8`0a57d620 00007ffb`2955d2ca coreclr!GCToEEInterface::GcScanRoots+0x197
000000b8`0a57d670 00007ffb`29552888 coreclr!WKS::gc_heap::mark_phase+0x48a
000000b8`0a57d750 00007ffb`295525fa coreclr!WKS::gc_heap::gc1+0x228
000000b8`0a57d810 00007ffb`29538463 coreclr!WKS::gc_heap::garbage_collect+0x73a
000000b8`0a57d8c0 00007ffb`29537f06 coreclr!WKS::GCHeap::GarbageCollectGeneration+0x4e3
(Inline Function) --------`-------- coreclr!WKS::GCHeap::GarbageCollectTry+0x63
000000b8`0a57d920 00007ffb`2953bbd8 coreclr!WKS::GCHeap::GarbageCollect+0x1f6
000000b8`0a57d980 00007ffb`291954aa coreclr!WKS::GCHeap::StressHeap+0x718
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Mar 4, 2024
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Mar 4, 2024
@jkotas
Copy link
Member Author

jkotas commented Mar 4, 2024

Introduced by #97079

cc @hez2010

@jkotas jkotas added area-Interop-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Mar 4, 2024
jkotas added a commit to jkotas/runtime that referenced this issue Mar 4, 2024
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Mar 4, 2024
@AaronRobinsonMSFT AaronRobinsonMSFT removed the untriaged New issue has not been triaged by the area owner label Mar 4, 2024
@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 9.0.0 milestone Mar 4, 2024
jkotas added a commit to jkotas/runtime that referenced this issue Mar 4, 2024
jkotas added a commit that referenced this issue Mar 5, 2024
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Mar 5, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants