Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Assert failure: Consistency check failed: FAILED: pThread->PreemptiveGCDisabled() #114638

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

Open
BruceForstall opened this issue Apr 14, 2025 · 11 comments
Assignees
Labels
arch-arm64 area-VM-coreclr blocking-clean-ci-optional Blocking optional rolling runs JitStress CLR JIT issues involving JIT internal stress modes os-windows
Milestone

Comments

@BruceForstall
Copy link
Member

pipeline: runtime-coreclr libraries-jitstress2-jitstressregs
job: net10.0-windows-Release-arm64-jitstress2_jitstressregs0x10-Windows.11.Arm64.Open
test: System.Runtime.Tests Work Item

https://dev.azure.com/dnceng-public/public/_build/results?buildId=1014411&view=ms.vss-test-web.build-test-results-tab&runId=27132632&resultId=209019&paneView=debug

C:\h\w\CD600AF1\w\9F3508C7\e>set DOTNET 
DOTNET_JitStress=2
DOTNET_JitStressRegs=0x10
DOTNET_TieredCompilation=0

C:\h\w\CD600AF1\w\9F3508C7\e>call RunTests.cmd --runtime-path C:\h\w\CD600AF1\p 
========================= Begin custom configuration settings ==============================
set __IsXUnitLogCheckerSupported=1
set XUNIT_HIDE_PASSING_OUTPUT_DIAGNOSTICS=1
========================== End custom configuration settings ===============================
----- start Sat 04/12/2025 10:11:09.14 ===============  To repro directly: =====================================================
pushd C:\h\w\CD600AF1\w\9F3508C7\e\
"C:\h\w\CD600AF1\p\dotnet.exe" exec --runtimeconfig System.Runtime.Tests.runtimeconfig.json --depsfile System.Runtime.Tests.deps.json xunit.console.dll System.Runtime.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=AdditionalTimezoneChecks -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing 
popd
===========================================================================================================

C:\h\w\CD600AF1\w\9F3508C7\e>"C:\h\w\CD600AF1\p\dotnet.exe" exec --runtimeconfig System.Runtime.Tests.runtimeconfig.json --depsfile System.Runtime.Tests.deps.json xunit.console.dll System.Runtime.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=AdditionalTimezoneChecks -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing  
  Discovering: System.Runtime.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Runtime.Tests (found 9396 of 9442 test cases)
  Starting:    System.Runtime.Tests (parallel test collections = on [2 threads], stop on fail = off)
    System.Tests.DateTimeOffsetTests.ToLocalTime_MaxValue [SKIP]
      Condition(s) not met: "IsMaxValuePositiveLocalOffset"
    System.Text.Tests.RuneTests.Casing_Invariant [SKIP]
      Condition(s) not met: "IsNlsGlobalization"
    System.Text.Tests.RuneTests.Casing_CultureAware [SKIP]
      Condition(s) not met: "IsNlsGlobalization"
    System.Tests.DateTimeOffsetTests.ToLocalTime_MinValue [SKIP]
      Condition(s) not met: "IsMinValueNegativeLocalOffset"
    System.Tests.DateTimeOffsetTests.ToLocalTime_Ambiguous [SKIP]
      Condition(s) not met: "IsPacificTime"
    System.Runtime.Tests.JitInfoTests.JitInfoIsNotPopulated [SKIP]
      Condition(s) not met: "IsMonoAOT"
    System.Tests.ArgIteratorTests.ArgIterator_Throws_PlatformNotSupportedException [SKIP]
      Condition(s) not met: "IsArgIteratorNotSupported"

Assert failure(PID 18240 [0x00004740], Thread: 728 [0x02d8]): Consistency check failed: 
FAILED: pThread->PreemptiveGCDisabled()

CORECLR! CHECK::Trigger + 0x1C4 (0x00007ffc`3fab0fec)
CORECLR! HijackHandler + 0x2EC (0x00007ffc`3f9ccbbc)
NTDLL! chkstk + 0x84 (0x00007ffc`724fee24)
NTDLL! RtlPcToFileHeader + 0xF60 (0x00007ffc`723e3900)
<no module>! <no symbol> + 0x0 (0x8d42fffc`723e2714)
    File: D:\a\_work\1\s\src\coreclr\vm\exceptionhandling.cpp:1886
    Image: C:\h\w\CD600AF1\p\dotnet.exe

----- end Sat 04/12/2025 10:11:57.57 ----- exit code -1073740286 ----------------------------------------------------------

Also fails in:
pipeline: runtime-coreclr libraries-jitstressregs
job: net10.0-windows-Release-arm64-jitstressregs4-Windows.11.Arm64.Open
test: System.Runtime.Tests Work Item

https://dev.azure.com/dnceng-public/public/_build/results?buildId=1014770&view=ms.vss-test-web.build-test-results-tab&runId=27147930&paneView=debug&resultId=209018

@BruceForstall BruceForstall added blocking-clean-ci-optional Blocking optional rolling runs JitStress CLR JIT issues involving JIT internal stress modes labels Apr 14, 2025
@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 Apr 14, 2025
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Apr 14, 2025
@BruceForstall
Copy link
Member Author

Also:
pipeline: runtime-coreclr libraries-jitstress
job: net10.0-windows-Release-arm64-jitstress1_tiered-Windows.11.Arm64.Open

https://dev.azure.com/dnceng-public/public/_build/results?buildId=1015271&view=ms.vss-test-web.build-test-results-tab&runId=27163132&paneView=debug

@jeffschwMSFT jeffschwMSFT added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 15, 2025
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@JulieLeeMSFT JulieLeeMSFT added this to the 10.0.0 milestone Apr 15, 2025
@JulieLeeMSFT JulieLeeMSFT removed untriaged New issue has not been triaged by the area owner needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Apr 15, 2025
@JulieLeeMSFT
Copy link
Member

@kunalspathak, PTAL.

@BruceForstall
Copy link
Member Author

@jkotas
Copy link
Member

jkotas commented Apr 25, 2025

Stacktrace of the failure:

coreclr!CHECK::Trigger+0x1c4 [D:\a\_work\1\s\src\coreclr\utilcode\check.cpp @ 137] 
coreclr!HijackHandler+0x2ec [D:\a\_work\1\s\src\coreclr\vm\exceptionhandling.cpp @ 1886] 
ntdll!RtlpExecuteHandlerForException+0x14 [minkernel\ntos\rtl\arm64\xcptmisc.asm @ 142] 
ntdll!RtlDispatchException+0x2e8 [minkernel\ntos\rtl\arm64\exdsptch.c @ 725] 
ntdll!RtlRaiseException+0xf4 [minkernel\ntos\rtl\arm64\raise.c @ 127] 
KERNELBASE!RaiseException+0x58 [minkernel\kernelbase\xcpt.c @ 954] 
coreclr!SfiNext+0x374 [D:\a\_work\1\s\src\coreclr\vm\exceptionhandling.cpp @ 4021] 
System_Private_CoreLib!System.Runtime.EH.DispatchEx(System.Runtime.StackFrameIterator ByRef, ExInfo ByRef)+0x6c4 [/_/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs @ 885] 
System_Private_CoreLib!System.Runtime.EH.RhThrowEx(System.Object, ExInfo ByRef)+0x38 [/_/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs @ 666] 
coreclr!CallDescrWorkerInternal+0x84 [D:\a\_work\1\s\artifacts\obj\coreclr\windows.arm64.Checked\vm\wks\CallDescrWorkerARM64.asm @ 5815] 
coreclr!CallDescrWorkerWithHandler+0x120 [D:\a\_work\1\s\src\coreclr\vm\callhelpers.cpp @ 59] 
coreclr!DispatchCallSimple+0xf8 [D:\a\_work\1\s\src\coreclr\vm\callhelpers.cpp @ 239] 
coreclr!DispatchManagedException+0x238 [D:\a\_work\1\s\src\coreclr\vm\exceptionhandling.cpp @ 1646] 
coreclr!ThrowControlForThread+0x1e4 [D:\a\_work\1\s\src\coreclr\vm\threadsuspend.cpp @ 3795] 
coreclr!RedirectForThreadAbort2+0x1c [D:\a\_work\1\s\artifacts\obj\coreclr\windows.arm64.Checked\vm\wks\asmhelpers.asm @ 6577] 
coreclr!RedirectForThreadAbort+0x30 [D:\a\_work\1\s\artifacts\obj\coreclr\windows.arm64.Checked\vm\wks\asmhelpers.asm @ 6581] 
System_Private_CoreLib!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Runtime.CompilerServices.IAsyncStateMachineBox, Boolean)+0x7c [/_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskContinuation.cs @ 753] 
System_Private_CoreLib!System.Threading.Tasks.Task.RunContinuations(System.Object)+0xfc [/_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs @ 3600] 
System_Private_CoreLib!System.Threading.Tasks.Task`1[[System.__Canon, System.Private.CoreLib]].TrySetResult(System.__Canon)+0xffffffff`ffcfe434 [/_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs @ 388] 
System_Private_CoreLib!System.Threading.Tasks.Task+CancellationPromise`1[[System.Boolean, System.Private.CoreLib]].System.Threading.Tasks.ITaskCompletionAction.Invoke(System.Threading.Tasks.Task)+0x168 [/_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs @ 2924] 
System_Private_CoreLib!System.Threading.ThreadPoolWorkQueue.Dispatch()+0x498 [/_/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs @ 1154] 
System_Private_CoreLib!System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()+0x164 [/_/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WorkerThread.cs @ 127] 
System_Private_CoreLib!System.Threading.Thread.StartCallback()+0x108 [/_/src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs @ 109] 
coreclr!CallDescrWorkerInternal+0x84 [D:\a\_work\1\s\artifacts\obj\coreclr\windows.arm64.Checked\vm\wks\CallDescrWorkerARM64.asm @ 5815] 
coreclr!CallDescrWorkerWithHandler+0x120 [D:\a\_work\1\s\src\coreclr\vm\callhelpers.cpp @ 59] 
coreclr!DispatchCallSimple+0xf8 [D:\a\_work\1\s\src\coreclr\vm\callhelpers.cpp @ 239] 
coreclr!KickOffThread_Worker+0x120 [D:\a\_work\1\s\src\coreclr\vm\comsynchronizable.cpp @ 137] 
coreclr!ManagedThreadBase_DispatchInner+0x18 [D:\a\_work\1\s\src\coreclr\vm\threads.cpp @ 6930] 
coreclr!ManagedThreadBase_DispatchMiddle+0x128 [D:\a\_work\1\s\src\coreclr\vm\threads.cpp @ 6974] 
coreclr!ManagedThreadBase_DispatchOuter::__l11::__Body::Run::__l5::__Body::Run+0x8 [D:\a\_work\1\s\src\coreclr\vm\threads.cpp @ 7132] 
coreclr!`ManagedThreadBase_DispatchOuter'::`11'::__Body::Run+0x28 [D:\a\_work\1\s\src\coreclr\vm\threads.cpp @ 7134] 
coreclr!ManagedThreadBase_DispatchOuter+0xa8 [D:\a\_work\1\s\src\coreclr\vm\threads.cpp @ 7156] 
coreclr!ManagedThreadBase::KickOff+0x14 [D:\a\_work\1\s\src\coreclr\vm\threads.cpp @ 7172] 
coreclr!KickOffThread+0x180 [D:\a\_work\1\s\src\coreclr\vm\comsynchronizable.cpp @ 206] 

@jkotas
Copy link
Member

jkotas commented Apr 25, 2025

This looks related to #113980 cc @janvorli

@janvorli
Copy link
Member

I don't think it is related to #113980. This is the same issue that @AndyAyersMS had in the CI on his PR #112998, well before my change got in. Like in Andy's case, the ThreadAbortException goes unhandled, which should never happen. Let me investigate

@kunalspathak
Copy link
Member

@janvorli - I am assigning this to you. In case you find out it is JIT related, feel free to direct it to me.

@kunalspathak kunalspathak removed the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 28, 2025
Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@janvorli
Copy link
Member

Unfortunately like in Andy's case, I am unable to repro it locally. To get some sense on why the ThreadAbort goes unhandled, I'd need the output of the LOG macros with LF_EH. The stresslog ones don't provide sufficient information. I'll probably temporarily add a change with more stresslog logs to help me pinpoint the culprit so that the stresslog from a CI run dump can give me more insight.

@kunalspathak
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-arm64 area-VM-coreclr blocking-clean-ci-optional Blocking optional rolling runs JitStress CLR JIT issues involving JIT internal stress modes os-windows
Projects
None yet
Development

No branches or pull requests

6 participants