Skip to content

Runtime hangs on exit on a spinlock #13564

Closed
@mikedn

Description

@mikedn

From time to time the jit diff tool hangs on exit:

ntdll.dll!NtDelayExecution()
KernelBase.dll!SleepEx()
coreclr.dll!SpinLock::SpinToAcquire() Line 270
coreclr.dll!CallCounter::IsCallCountingEnabled(MethodDesc * pMethodDesc) Line 56
coreclr.dll!TieredCompilationManager::GetInitialOptimizationTier(MethodDesc * pMethodDesc) Line 115
coreclr.dll!PrepareCodeConfig::GetJitOptimizationTier(PrepareCodeConfig * config, MethodDesc * methodDesc) Line 1215
coreclr.dll!ETW::MethodLog::SendMethodEvent(MethodDesc * pMethodDesc, unsigned long dwEventOptions, int bIsJit, SString * namespaceOrClassName, SString * methodName, SString * methodSignature, unsigned __int64 pNativeCodeStartAddress, PrepareCodeConfig * pConfig) Line 6402
coreclr.dll!ETW::MethodLog::SendEventsForJitMethodsHelper(LoaderAllocator * pLoaderAllocatorFilter, unsigned long dwEventOptions, int fLoadOrDCStart, int fUnloadOrDCEnd, int fSendMethodEvent, int fSendILToNativeMapEvent, int fGetCodeIds) Line 6889
coreclr.dll!ETW::MethodLog::SendEventsForJitMethods(BaseDomain * pDomainFilter, LoaderAllocator * pLoaderAllocatorFilter, unsigned long dwEventOptions) Line 7046
coreclr.dll!ETW::EnumerationLog::IterateDomain(BaseDomain * pDomain, unsigned long enumerationOptions) Line 7139
coreclr.dll!ETW::EnumerationLog::IterateAppDomain(AppDomain * pAppDomain, unsigned long enumerationOptions) Line 7096
coreclr.dll!ETW::EnumerationLog::EnumerationHelper(Module * moduleFilter, BaseDomain * enumerationOptions, unsigned long) Line 7412
coreclr.dll!ETW::EnumerationLog::ProcessShutdown() Line 5674
coreclr.dll!EEShutDownHelper(int fIsDllUnloading) Line 1327
coreclr.dll!EEShutDown(int fIsDllUnloading) Line 1803
coreclr.dll!EEDllMain(HINSTANCE__ * hInst, unsigned long dwReason, void * lpReserved) Line 1973
coreclr.dll!DllMain(void * hInstance, unsigned long dwReason, void * lpReserved) Line 156
coreclr.dll!CoreDllMain(void * hInstance, unsigned long dwReason, void * lpReserved) Line 107
ntdll.dll!LdrpCallInitRoutine()

This is the only remaining thread in the process and all it does it to spin there. Presumably the spinlock was abandoned by a terminated thread.

Known issue? Perhaps already fixed? The jit utils are using the released 3.0, not the current coreclr build.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions