Skip to content

Test failure: profiler/handles/handles/handles.cmd #127367

Open

Description

@VincentBu

Failed in: runtime-coreclr outerloop 20260423.3

Failed tests:

R2R-CG2 linux x64 Checked @ AzureLinux.3.Amd64.Open
- profiler/handles/handles/handles.cmd

Error message:

ASSERT FAILED
	Expression: pRD->_pThread->IsExecutingOnAltStack() || PTR_VOID(pRD->SP) < pRD->_pThread->GetCachedStackBase()
	Location:   /__w/1/s/src/coreclr/vm/threads.cpp:5634
	Function:   CheckRegDisplaySP
	Process:    39840
waitpid() returned successfully (wstatus 00000085) WEXITSTATUS 0 WTERMSIG 5
Unhandled exception. System.Exception: Profilee returned exit code 139 instead of expected exit code 100.
   at Profiler.Tests.ProfilerTestRunner.FailFastWithMessage(String error)
   at Profiler.Tests.ProfilerTestRunner.Run(String profileePath, String testName, Guid profilerClsid, String profileeArguments, ProfileeOptions profileeOptions, Dictionary`2 envVars, String reverseServerName, Boolean loadAsNotification, Int32 notificationCopies, String envVarProfilerPrefix)
   at Profiler.Tests.HandlesTests.Main(String[] args)
   at System.Environment.CallEntryPoint(IntPtr entryPoint, String[]* pArgument, Int32* pReturnValue, Boolean captureException, Exception* pException)
waitpid() returned successfully (wstatus 00000000) WEXITSTATUS 0 WTERMSIG 0
/datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/profiler/../handles/handles/handles.sh: line 439: 39821 Aborted                 (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"

Return code:      1
Raw output file:      /datadisks/disk1/work/99FF08A0/w/B72C0A36/uploads/handles/handles/output.txt
Raw output:
BEGIN EXECUTION
in takeLock
/datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/IL-CG2/eventpipe_common.dll
20:57:17
Response file: /datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/eventpipe_common.dll.rsp
/datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/IL-CG2/eventpipe_common.dll
-o:/datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/eventpipe_common.dll
-O
--targetarch:x64
--targetos:linux
--verify-type-and-field-layout
--method-layout:random
-r:/datadisks/disk1/work/99FF08A0/p/System.*.dll
-r:/datadisks/disk1/work/99FF08A0/p/Microsoft.*.dll
-r:/datadisks/disk1/work/99FF08A0/p/xunit.*.dll
-r:/datadisks/disk1/work/99FF08A0/p/mscorlib.dll
-r:/datadisks/disk1/work/99FF08A0/p/netstandard.dll
Running CrossGen2:  /datadisks/disk1/work/99FF08A0/p/crossgen2/crossgen2 @/datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/eventpipe_common.dll.rsp   -r:/datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/IL-CG2/*.dll
Emitting R2R PE file: /datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/eventpipe_common.dll
Running R2RDump:  dotnet /datadisks/disk1/work/99FF08A0/p/R2RDump/R2RDump.dll --header --sc --in /datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/eventpipe_common.dll --out /datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/eventpipe_common.dll.r2rdump --val --rp /datadisks/disk1/work/99FF08A0/p
20:57:18
/datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/IL-CG2/handles.dll
20:57:18
Response file: /datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/handles.dll.rsp
/datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/IL-CG2/handles.dll
-o:/datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/handles.dll
-O
--targetarch:x64
--targetos:linux
--verify-type-and-field-layout
--method-layout:random
-r:/datadisks/disk1/work/99FF08A0/p/System.*.dll
-r:/datadisks/disk1/work/99FF08A0/p/Microsoft.*.dll
-r:/datadisks/disk1/work/99FF08A0/p/xunit.*.dll
-r:/datadisks/disk1/work/99FF08A0/p/mscorlib.dll
-r:/datadisks/disk1/work/99FF08A0/p/netstandard.dll
Running CrossGen2:  /datadisks/disk1/work/99FF08A0/p/crossgen2/crossgen2 @/datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/handles.dll.rsp   -r:/datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/IL-CG2/*.dll
Emitting R2R PE file: /datadisks/disk1/work/99FF08A0/w/B72C0A36/e/profiler/handles/handles/handles.dll
Running R2RDump:  dotnet /datadisks/disk1/work/99FF08A0/p/R2RDump/R

Stack trace:

   at Xunit.Assert.True(Nullable`1 condition, String userMessage) in /_/src/arcade/src/Microsoft.DotNet.XUnitAssert/src/BooleanAsserts.cs:line 135
   at TestLibrary.OutOfProcessTest.RunOutOfProcessTest(String assemblyPath, String testPathPrefix)
   at Program.<<Main>$>g__TestExecutor18|0_19(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)

Activity

  1. added
    blocking-outerloop
    on Apr 24, 2026
  2. VincentBu commented on Apr 24, 2026

    @VincentBu
    ContributorAuthor

    Feel free to close it if it's a dup of #117918

  3. added
    untriaged
    on Apr 24, 2026
  4. added and removed
    area-crossgen2-coreclr
    on Apr 27, 2026
  5. janvorli commented on Apr 30, 2026

    @janvorli
    Member

    The assert above comes from the createdump tool, not from the actual binary:

    * thread #1, name = 'createdump', stop reason = signal SIGTRAP
      * frame #0: 0x0000735b302dc301 libmscordaccore.so`DBG_DebugBreak at debugbreak.S:9
        frame #1: 0x0000735b30299db3 libmscordaccore.so`::DebugBreak() at debug.cpp:415:9 [opt]
        frame #2: 0x0000735b301fc16f libmscordaccore.so`ClrDataStackWalk::Init(this=0x00005c76f5e6d9a0) at stack.cpp:478:15 [opt]
        frame #3: 0x0000735b301e73ce libmscordaccore.so`ClrDataTask::CreateStackWalk(this=0x00005c76f5e689b0, flags=15, stackWalk=0x00007ffdb0eab320) at task.cpp:334:39 [opt]
        frame #4: 0x00005c76ee4caf24 createdump`ThreadInfo::UnwindThread(this=0x00005c76f5e54b50, pClrDataProcess=<unavailable>, pSos=0x00005c76f5e629e0) at threadinfo.cpp:157:20 [opt]
        frame #5: 0x00005c76ee4c7360 createdump`CrashInfo::UnwindAllThreads(this=0x00005c76f5e496c0) at crashinfo.cpp:517:26 [opt]
        frame #6: 0x00005c76ee4c65fb createdump`CrashInfo::GatherCrashInfo(this=0x00005c76f5e496c0, dumpType=Heap) at crashinfo.cpp:208:10 [opt]
        frame #7: 0x00005c76ee4c15fa createdump`CreateDump(options=0x00007ffdb0eb0230) at createdumpunix.cpp:57:21 [opt]
        frame #8: 0x00005c76ee4c08a8 createdump`createdump_main(argc=<unavailable>, argv=0x00007ffdb0eb0460) at createdumpmain.cpp:221:9 [opt]
        frame #9: 0x00005c76ee4bf8eb createdump`main(argc=<unavailable>, argv=<unavailable>) at main.cpp:20:20 [opt]
        frame #10: 0x0000735b30427efb
        frame #11: 0x0000735b30427fbb
        frame #12: 0x00005c76ee4bf7fa createdump`_start + 42
    (lldb)
    
  6. janvorli commented on Apr 30, 2026

    @janvorli
    Member

    Besides the createdump crash, it is a dup of the #117918

  7. janvorli commented on Apr 30, 2026

    @janvorli
    Member

    @dotnet/dotnet-diag for the createdump crash - the test crashed on a secondary thread when the runtime was shutting down. Createdump tool has some issue with unwinding one of the stacks (I haven't investigated which one)

  8. added and removed
    untriaged
    on Apr 30, 2026
  9. dotnet-policy-service commented on Apr 30, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
    See info in area-owners.md if you want to be subscribed.

  10. mangod9 commented on May 3, 2026

    @mangod9
    Member

    some analysis:

    Root Cause Analysis: profiler/handles/handles.cmd Crash (#127367 / #117918)

    Symptoms

    • Assert (Checked builds): pRD->_pThread->IsExecutingOnAltStack() || PTR_VOID(pRD->SP) < pRD->_pThread->GetCachedStackBase() at threads.cpp:5634
    • Crash (all builds): SIGSEGV at NULL (fault address 0x0) inside libProfiler.so
    • Behavior: Test passes (prints PROFILER TEST PASSES) then crashes during process exit
    • Frequency: Intermittent, recurring since July 2025 across linux-x64, linux-arm64, osx-arm64
    • Pipelines affected: R2R, outerloop, jitstress — all Checked builds on Linux/macOS

    Dump Analysis

    Core dump core.39829 (profilee process, 163 MB) was recovered from Helix job c2168375-703d-4964-a956-f512da88897c.

    Note: Checked build symbols (build-id 9a894649f00c9f9a3eed227145e1de54bc985ad9) are not indexed on the public symbol server, so function names were resolved via module base address offsets.

    Module load addresses (from ELF NT_FILE note):

    Module Base Address
    libcoreclr.so 0x73a486000000
    libProfiler.so 0x73a486f94000
    corerun 0x5f0bae8fb000

    Crashing thread (#1) — registers:

    rip = 0x73a486fe09f4  (libProfiler.so+0x4C9F4)
    rdi = 0x0000000000000000   ← NULL pointer being dereferenced
    rsp = 0x73a004f70ee0
    rbp = 0x73a004f718b0
    

    Faulting instruction: movq (%rdi), %r10 — dereference of rdi=NULL.

    Crashing thread stack (9 threads total, thread #1 crashed):

    frame  0: libProfiler.so+0x4C9F4    ← NULL deref (GetClassIDName internals)
    frame  1: libProfiler.so+0x3FF4E    ← ObjectAllocated → GetClassIDName
    frame  2: libcoreclr.so+0x6BB9B4    ← EEToProfInterfaceImpl::ObjectAllocated
    frame  3: libcoreclr.so+0x75677D    ← ProfControlBlock::ObjectAllocated dispatch
    frame  4: libcoreclr.so+0x75668F    ← ProfControlBlock callback iteration
    frame  5: libcoreclr.so+0x6D25D2    ← ProfilerObjectAllocatedCallback
    frame  6: libcoreclr.so+0x6C83FB    ← PublishObjectAndNotify / allocation path
    frame  7: libcoreclr.so+0x6D4452    ← FrozenObjectHeapManager::TryAllocateObject
    frame  8: libcoreclr.so+0x794BB9    ← AllocateString
    frame  9: libcoreclr.so+0x79414E    ← GlobalStringLiteralMap::AddStringLiteral
    frame 10: libcoreclr.so+0x792CD8    ← ModuleBase::ResolveStringRef
    frame 11: libcoreclr.so+0x47A3C1    ← CEECodeGenInfo::constructStringLiteral
    frame 12: libcoreclr.so+0x547FC6    ← JIT compilation (fgMorphConst)
      ... frames 13-26: JIT/managed code (tiered recompilation) ...
    frame 27: libcoreclr.so+0x54C824    ← invokeCompileMethod
    frame 28: libcoreclr.so+0x54C107    ← UnsafeJitFunctionWorker
      ... frames 29-37: MethodDesc::PrepareILBasedCode → TieredCompilationManager ...
    frame 38: libcoreclr.so+0x5EEEA5    ← TieredCompilationManager::BackgroundWorkerStart
    frame 39: libcoreclr.so+0x5F69F2    ← CPalThread::ThreadEntry
    

    Other notable threads at time of crash:

    • Threads 3, 5, 8, 9: Blocked on pthread_cond_wait/pthread_cond_timedwait (idle runtime threads)
    • Thread 4: In poll() (I/O wait)
    • Thread 7: In poll() (EventPipe/diagnostics)
    • No thread is in EEShutDownHelper — shutdown has already completed by the time the crash occurs

    The Race Condition

    The crash occurs because the tiered compilation (TC) background thread fires a profiler ObjectAllocated callback after the profiler's Shutdown() has completed and resources have been freed.

    Timeline

    Main Thread (Shutdown)                    TC Background Thread
    ─────────────────────                     ────────────────────
    EEShutDownHelper() starts
      g_fEEShutDown = ShutDown_Start
      ...
      g_profControlBlock.Shutdown()
        → Profiler::Shutdown()
          → WaitForInProgressHooks()
            s_preventHooks = true              (still JIT-compiling a method)
            s_hooksInProgress == 0 ✓ ←──────── ObjectAllocated has no SHUTDOWNGUARD,
            (returns immediately)               so s_hooksInProgress was never incremented
          → pCorProfilerInfo->Release()
          → pCorProfilerInfo = nullptr
      ...
      (shutdown continues/completes)           fgMorphConst → constructStringLiteral
                                                 → AllocateString (frozen heap)
                                                 → ProfilerObjectAllocatedCallback
                                                   CORProfilerTrackAllocations() → TRUE
                                                   (event mask never cleared!)
                                                 → HandlesProfiler::ObjectAllocated()
                                                   (NO SHUTDOWNGUARD — enters freely)
                                                 → GetClassIDName(classId)
                                                   → pCorProfilerInfo->GetClassIDInfo2()
                                                   → pCorProfilerInfo is NULL
                                                   → SIGSEGV ← CRASH
    

    Why WaitForInProgressHooks() doesn't help

    The ShutdownGuard pattern works correctly for callbacks that use SHUTDOWNGUARD():

    // profiler.h:73-78
    #define SHUTDOWNGUARD()
        ShutdownGuard shutdownGuard;                // ++s_hooksInProgress
        if (ShutdownGuard::HasShutdownStarted())    // checks s_preventHooks
            return S_OK;                            // early exit
    • GarbageCollectionStarted — has SHUTDOWNGUARD() ✅
    • GarbageCollectionFinished — has SHUTDOWNGUARD() ✅
    • ObjectAllocated — missing SHUTDOWNGUARD() ❌

    Without SHUTDOWNGUARD(), the callback never increments s_hooksInProgress, so WaitForInProgressHooks() sees zero immediately and proceeds with teardown while the TC thread is about to (or already has) enter ObjectAllocated.


    Two Issues Found

    Issue 1: Test Profiler Bug — Missing SHUTDOWNGUARD() (Direct Cause)

    File: src/tests/profiler/native/handlesprofiler/handlesprofiler.cpp:84

    HandlesProfiler::ObjectAllocated does not have SHUTDOWNGUARD(), unlike every other callback in the profiler. This allows the TC background thread to enter the callback after Shutdown() completes, accessing freed pCorProfilerInfo.

    Fix:

     HRESULT HandlesProfiler::ObjectAllocated(ObjectID objectId, ClassID classId)
     {
    +    SHUTDOWNGUARD();
    +
         // Create handles for TestClassForWeakHandle, TestClassForStrongHandle and TestClassForPinnedHandle instances
         String typeName = GetClassIDName(classId);

    Issue 2: Runtime — TC Thread Continues Allocating After Shutdown (Contributing Factor)

    The runtime has a documented but unfixed design gap:

    1. ceemain.cpp:1317-1320 (comment in the source):

      "We haven't stopped other threads at this point and nothing is stopping callbacks from coming into the profiler even after Shutdown() has been called. See Profiler use after release on process exit #11885."

    2. tieredcompilation.cpp:471-560: The TC BackgroundWorkerStart() loop has no g_fEEShutDown check — it continues JIT-compiling methods and allocating string literals on the frozen object heap after shutdown starts.

    3. Event mask not cleared: After Profiler::Shutdown() is called, COR_PRF_MONITOR_OBJECT_ALLOCATED remains set in g_profControlBlock.globalEventMask, so BEGIN_PROFILER_CALLBACK(CORProfilerTrackAllocations()) keeps dispatching to the (now-defunct) profiler.

    4. BEGIN_PROFILER_CALLBACK (profilepriv.inl:2157) is just a dirty-read if with no synchronization against shutdown:

      #define BEGIN_PROFILER_CALLBACK(condition) \
          if (condition) {

    Potential runtime-side mitigations (not strictly required if all profilers guard their callbacks):

    • Clear profiler event masks during EEShutDown before calling Profiler::Shutdown()
    • Add g_fEEShutDown check in TC's DoBackgroundWork() loop to stop allocating after shutdown
    • Add a post-shutdown flag in ProfControlBlock that BEGIN_PROFILER_CALLBACK checks

    Recommendation

    The immediate fix is adding SHUTDOWNGUARD() to HandlesProfiler::ObjectAllocated (Issue 1). This resolves the crash for this specific test.

    However, Issue 2 means any profiler that doesn't guard every single callback is vulnerable to the same race. The runtime knowingly allows callbacks after Shutdown(), relying on profilers to protect themselves. A runtime-side fix (clearing event masks or stopping TC allocations) would prevent this class of bugs entirely.

  11. VincentBu commented on May 12, 2026

    @VincentBu
    ContributorAuthor

    Failed in: runtime-coreclr outerloop 20260511.3

    Failed tests:

    coreclr linux arm64 Checked @ (Alpine.323.Arm64.Open)[email protected]/dotnet-buildtools/prereqs:alpine-3.23-helix-arm64v8@sha256:ede25506b331984c7f64a2961e5f5ca6222f237a929c2ad2a4c4f4a5af652504
    - profiler/handles/handles/handles.cmd
    
    

    Error message:

    ASSERT FAILED
    	Expression: pRD->_pThread->IsExecutingOnAltStack() || PTR_VOID(pRD->SP) < pRD->_pThread->GetCachedStackBase()
    	Location:   /__w/1/s/src/coreclr/vm/threads.cpp:5621
    	Function:   CheckRegDisplaySP
    	Process:    401
    waitpid() returned successfully (wstatus 00000085) WEXITSTATUS 0 WTERMSIG 5
    Unhandled exception. System.Exception: Profilee returned exit code 139 instead of expected exit code 100.
       at Profiler.Tests.ProfilerTestRunner.FailFastWithMessage(String error)
       at Profiler.Tests.ProfilerTestRunner.Run(String profileePath, String testName, Guid profilerClsid, String profileeArguments, ProfileeOptions profileeOptions, Dictionary`2 envVars, String reverseServerName, Boolean loadAsNotification, Int32 notificationCopies, String envVarProfilerPrefix)
       at Profiler.Tests.HandlesTests.Main(String[] args)
    waitpid() returned successfully (wstatus 00000000) WEXITSTATUS 0 WTERMSIG 0
    /root/helix/work/workitem/e/profiler/profiler/../handles/handles/handles.sh: line 439:   380 Aborted                    (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"
    
    Return code:      1
    Raw output file:      /root/helix/work/workitem/uploads/handles/handles/output.txt
    Raw output:
    BEGIN EXECUTION
    /root/helix/work/correlation/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true handles.dll ''
    Profiler path: /root/helix/work/workitem/e/profiler/handles/handles/libProfiler.so
    Profilee STDOUT: Profiler.dll!DllGetClassObject
    Profilee STDOUT: Profiler.dll!Profiler::Initialize
    Profilee STDOUT: Handles started. Control-C to exit
    Profilee STDOUT: Allocating Weak
    Profilee STDOUT: Worker thread started
    Profilee STDOUT: Allocating Strong
    Profilee STDOUT: Allocating Pinned
    Profilee STDOUT: weak = 1-W
    Profilee STDOUT: strong = 2-S
    Profilee STDOUT: weak = 3-P
    Profilee STDOUT: Collection #1
    Profilee STDOUT: HandlesProfiler::ObjectAllocated: weak handle created.
    Profilee STDOUT: HandlesProfiler::ObjectAllocated: strong handle created.
    Profilee STDOUT: HandlesProfiler::ObjectAllocated: pinned handle created.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(weak): object not alive as expected.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(strong): object alive as expected (Profiler.Tests.TestClassForStrongHandle)
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(pinned): object alive as expected (Profiler.Tests.TestClassForPinnedHandle)
    Profilee STDOUT: Collection #2
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#1): pinned handle object address did not changed as expected.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(strong): object alive as expected (Profiler.Tests.TestClassForStrongHandle)
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(pinned): object alive as expected (Profiler.Tests.TestClassForPinnedHandle)
    Profilee STDOUT: Collection #3
    Profilee STDOUT: Test Passed
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#2): strong handle destroyed.
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#2): pinned handle destroyed.
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#3): Checking handles:
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(strong): object not alive as expected.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(pinned): object not alive as expected.
    Profilee STDOUT: Profiler.dll!Profiler::Shutdown
    Profilee STDOUT: PROFILER TEST PASSES
    Profilee STDOUT: [createdump] Gathering state for process 389 corerun
    Profilee STDOUT: [createdump] Crashing thread 018e signal 11 (000b)
    Test failed: Profilee returned exit code 139 instead of expected exit code 100.
    [createdump] Gathering state for process 380 corerun
    [createdump] Crashing thread 017c signal 6 (0006)
    [createdump] Writing crash report to file /datadisks/disk1/dumps/coredump.380.dmp.crashreport.json
    [createdump] Crash report successfully written
    [createdump] Writing minidump with heap to file /datadisks/disk1/dumps/coredump.380.dmp
    [c
    

    Stack trace:

       at TestLibrary.OutOfProcessTest.RunOutOfProcessTest(String assemblyPath, String testPathPrefix)
       at Program.<<Main>$>g__TestExecutor18|0_19(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)
    
  12. VincentBu commented on May 25, 2026

    @VincentBu
    ContributorAuthor

    Failed in: runtime-coreclr jitstress 20260522.1

    Failed tests:

    coreclr linux arm64 Checked jitstress2_tiered @ AzureLinux.3.Arm64.Open
    - profiler/handles/handles/handles.cmd
    
    

    Error message:

    ASSERT FAILED
    	Expression: pRD->_pThread->IsExecutingOnAltStack() || PTR_VOID(pRD->SP) < pRD->_pThread->GetCachedStackBase()
    	Location:   /__w/1/s/src/coreclr/vm/threads.cpp:5621
    	Function:   CheckRegDisplaySP
    	Process:    64821
    waitpid() returned successfully (wstatus 00000085) WEXITSTATUS 0 WTERMSIG 5
    Unhandled exception. System.Exception: Profilee returned exit code 139 instead of expected exit code 100.
       at Profiler.Tests.ProfilerTestRunner.FailFastWithMessage(String error)
       at Profiler.Tests.ProfilerTestRunner.Run(String profileePath, String testName, Guid profilerClsid, String profileeArguments, ProfileeOptions profileeOptions, Dictionary`2 envVars, String reverseServerName, Boolean loadAsNotification, Int32 notificationCopies, String envVarProfilerPrefix)
       at Profiler.Tests.HandlesTests.Main(String[] args)
    apply_reg_state: ip and cfa unchanged; stopping here (ip=0xfdc261946e78)
    apply_reg_state: ip and cfa unchanged; stopping here (ip=0xfdc261946e78)
    waitpid() returned successfully (wstatus 00000000) WEXITSTATUS 0 WTERMSIG 0
    /datadisks/disk1/work/B9D40A5E/w/AA630969/e/profiler/profiler/../handles/handles/handles.sh: line 448: 64783 Aborted                 (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"
    
    Return code:      1
    Raw output file:      /datadisks/disk1/work/B9D40A5E/w/AA630969/uploads/handles/handles/output.txt
    Raw output:
    BEGIN EXECUTION
    /datadisks/disk1/work/B9D40A5E/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true handles.dll ''
    Profiler path: /datadisks/disk1/work/B9D40A5E/w/AA630969/e/profiler/handles/handles/libProfiler.so
    Profilee STDOUT: Profiler.dll!DllGetClassObject
    Profilee STDOUT: Profiler.dll!Profiler::Initialize
    Profilee STDOUT: Handles started. Control-C to exit
    Profilee STDOUT: Allocating Weak
    Profilee STDOUT: Worker thread started
    Profilee STDOUT: Allocating Strong
    Profilee STDOUT: Allocating Pinned
    Profilee STDOUT: weak = 1-W
    Profilee STDOUT: strong = 2-S
    Profilee STDOUT: weak = 3-P
    Profilee STDOUT: Collection #1
    Profilee STDOUT: HandlesProfiler::ObjectAllocated: weak handle created.
    Profilee STDOUT: HandlesProfiler::ObjectAllocated: strong handle created.
    Profilee STDOUT: HandlesProfiler::ObjectAllocated: pinned handle created.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(weak): object not alive as expected.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(strong): object alive as expected (Profiler.Tests.TestClassForStrongHandle)
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(pinned): object alive as expected (Profiler.Tests.TestClassForPinnedHandle)
    Profilee STDOUT: Collection #2
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#1): pinned handle object address did not changed as expected.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(strong): object alive as expected (Profiler.Tests.TestClassForStrongHandle)
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(pinned): object alive as expected (Profiler.Tests.TestClassForPinnedHandle)
    Profilee STDOUT: Collection #3
    Profilee STDOUT: Test Passed
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#2): strong handle destroyed.
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#2): pinned handle destroyed.
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#3): Checking handles:
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(strong): object not alive as expected.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(pinned): object not alive as expected.
    Profilee STDOUT: Profiler.dll!Profiler::Shutdown
    Profilee STDOUT: PROFILER TEST PASSES
    Profilee STDOUT: [createdump] Gathering state for process 64802 corerun
    Profilee STDOUT: [createdump] Crashing thread fd2a signal 11 (000b)
    Test failed: Profilee returned exit code 139 instead of expected exit code 100.
    [createdump] Gathering state for process 64783 corerun
    [createdump] Crashing thread fd0f signal 6 (0006)
    [createdump] Writing crash report t
    

    Stack trace:

       at Xunit.Assert.True(Nullable`1 condition, String userMessage) in /_/src/arcade/src/Microsoft.DotNet.XUnitAssert/src/BooleanAsserts.cs:line 135
       at TestLibrary.OutOfProcessTest.RunOutOfProcessTest(String assemblyPath, String testPathPrefix)
       at Program.<<Main>$>g__TestExecutor18|0_19(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)
    
  13. VincentBu commented on Jun 5, 2026

    @VincentBu
    ContributorAuthor

    Failed in: runtime-coreclr jitstress 20260603.1

    Failed tests:

    coreclr linux x64 Checked jitstress2_tiered @ AzureLinux.3.Amd64.Open
    - profiler/handles/handles/handles.cmd
    
    

    Error message:

    ASSERT FAILED
    	Expression: pRD->_pThread->IsExecutingOnAltStack() || PTR_VOID(pRD->SP) < pRD->_pThread->GetCachedStackBase()
    	Location:   /__w/1/s/src/coreclr/vm/threads.cpp:5617
    	Function:   CheckRegDisplaySP
    	Process:    7483
    waitpid() returned successfully (wstatus 00000085) WEXITSTATUS 0 WTERMSIG 5
    Unhandled exception. System.Exception: Profilee returned exit code 139 instead of expected exit code 100.
       at Profiler.Tests.ProfilerTestRunner.FailFastWithMessage(String error)
       at Profiler.Tests.ProfilerTestRunner.Run(String profileePath, String testName, Guid profilerClsid, String profileeArguments, ProfileeOptions profileeOptions, Dictionary`2 envVars, String reverseServerName, Boolean loadAsNotification, Int32 notificationCopies, String envVarProfilerPrefix)
       at Profiler.Tests.HandlesTests.Main(String[] args)
    waitpid() returned successfully (wstatus 00000000) WEXITSTATUS 0 WTERMSIG 0
    /datadisks/disk1/work/B64609CF/w/AA76097D/e/profiler/profiler/../handles/handles/handles.sh: line 448:  7465 Aborted                 (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"
    
    Return code:      1
    Raw output file:      /datadisks/disk1/work/B64609CF/w/AA76097D/uploads/handles/handles/output.txt
    Raw output:
    BEGIN EXECUTION
    /datadisks/disk1/work/B64609CF/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true handles.dll ''
    Profiler path: /datadisks/disk1/work/B64609CF/w/AA76097D/e/profiler/handles/handles/libProfiler.so
    Profilee STDOUT: Profiler.dll!DllGetClassObject
    Profilee STDOUT: Profiler.dll!Profiler::Initialize
    Profilee STDOUT: Handles started. Control-C to exit
    Profilee STDOUT: Worker thread started
    Profilee STDOUT: Allocating Weak
    Profilee STDOUT: Allocating Strong
    Profilee STDOUT: Allocating Pinned
    Profilee STDOUT: weak = 1-W
    Profilee STDOUT: strong = 2-S
    Profilee STDOUT: weak = 3-P
    Profilee STDOUT: Collection #1
    Profilee STDOUT: HandlesProfiler::ObjectAllocated: weak handle created.
    Profilee STDOUT: HandlesProfiler::ObjectAllocated: strong handle created.
    Profilee STDOUT: HandlesProfiler::ObjectAllocated: pinned handle created.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(weak): object not alive as expected.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(strong): object alive as expected (Profiler.Tests.TestClassForStrongHandle)
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(pinned): object alive as expected (Profiler.Tests.TestClassForPinnedHandle)
    Profilee STDOUT: Collection #2
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#1): pinned handle object address did not changed as expected.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(strong): object alive as expected (Profiler.Tests.TestClassForStrongHandle)
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(pinned): object alive as expected (Profiler.Tests.TestClassForPinnedHandle)
    Profilee STDOUT: Collection #3
    Profilee STDOUT: Test Passed
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#2): strong handle destroyed.
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#2): pinned handle destroyed.
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#3): Checking handles:
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(strong): object not alive as expected.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(pinned): object not alive as expected.
    Profilee STDOUT: Profiler.dll!Profiler::Shutdown
    Profilee STDOUT: PROFILER TEST PASSES
    Profilee STDOUT: [createdump] Gathering state for process 7472 corerun
    Profilee STDOUT: [createdump] Crashing thread 1d37 signal 11 (000b)
    Test failed: Profilee returned exit code 139 instead of expected exit code 100.
    [createdump] Gathering state for process 7465 corerun
    [createdump] Crashing thread 1d29 signal 6 (0006)
    [createdump] Writing crash report to file /datadisks/disk1/dumps/coredump.7465.dmp.crashreport.json
    [createdump] Crash report successfully written
    [createdump] Writing minidump with he
    

    Stack trace:

       at Xunit.Assert.True(Nullable`1 condition, String userMessage) in /_/src/arcade/src/Microsoft.DotNet.XUnitAssert/src/BooleanAsserts.cs:line 135
       at TestLibrary.OutOfProcessTest.RunOutOfProcessTest(String assemblyPath, String testPathPrefix)
       at Program.<<Main>$>g__TestExecutor18|0_19(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)
    
  14. added
    blocking-clean-ci-optional
    on Jun 17, 2026
  15. added this to the 11.0.0 milestone on Jul 2, 2026
  16. VincentBu commented on Jul 3, 2026

    @VincentBu
    ContributorAuthor

    Failed in: runtime-coreclr pgo 20260702.1

    Failed tests:

    coreclr linux x64 Checked defaultpgo @ AzureLinux.3.Amd64.Open
    - profiler/handles/handles/handles.cmd
    
    

    Error message:

    Unhandled exception. System.Exception: Profilee returned exit code 139 instead of expected exit code 100.
       at Profiler.Tests.ProfilerTestRunner.FailFastWithMessage(String error)
       at Profiler.Tests.ProfilerTestRunner.Run(String profileePath, String testName, Guid profilerClsid, String profileeArguments, ProfileeOptions profileeOptions, Dictionary`2 envVars, String reverseServerName, Boolean loadAsNotification, Int32 notificationCopies, String envVarProfilerPrefix)
       at Profiler.Tests.HandlesTests.Main(String[] args)
    waitpid() returned successfully (wstatus 00000000) WEXITSTATUS 0 WTERMSIG 0
    /datadisks/disk1/work/A37408B0/w/B72809D1/e/profiler/profiler/../handles/handles/handles.sh: line 453: 15761 Aborted                 (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"
    
    Return code:      1
    Raw output file:      /datadisks/disk1/work/A37408B0/w/B72809D1/uploads/handles/handles/output.txt
    Raw output:
    BEGIN EXECUTION
    /datadisks/disk1/work/A37408B0/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true handles.dll ''
    Profiler path: /datadisks/disk1/work/A37408B0/w/B72809D1/e/profiler/handles/handles/libProfiler.so
    Profilee STDOUT: Profiler.dll!DllGetClassObject
    Profilee STDOUT: Profiler.dll!Profiler::Initialize
    Profilee STDOUT: Handles started. Control-C to exit
    Profilee STDOUT: Worker thread started
    Profilee STDOUT: Allocating Weak
    Profilee STDOUT: Allocating Strong
    Profilee STDOUT: Allocating Pinned
    Profilee STDOUT: weak = 1-W
    Profilee STDOUT: strong = 2-S
    Profilee STDOUT: weak = 3-P
    Profilee STDOUT: Collection #1
    Profilee STDOUT: HandlesProfiler::ObjectAllocated: weak handle created.
    Profilee STDOUT: HandlesProfiler::ObjectAllocated: strong handle created.
    Profilee STDOUT: HandlesProfiler::ObjectAllocated: pinned handle created.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(weak): object not alive as expected.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(strong): object alive as expected (Profiler.Tests.TestClassForStrongHandle)
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(pinned): object alive as expected (Profiler.Tests.TestClassForPinnedHandle)
    Profilee STDOUT: Collection #2
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#1): pinned handle object address did not changed as expected.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(strong): object alive as expected (Profiler.Tests.TestClassForStrongHandle)
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(pinned): object alive as expected (Profiler.Tests.TestClassForPinnedHandle)
    Profilee STDOUT: Collection #3
    Profilee STDOUT: Test Passed
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#2): strong handle destroyed.
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#2): pinned handle destroyed.
    Profilee STDOUT: HandlesProfiler::GarbageCollectionFinished(#3): Checking handles:
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(strong): object not alive as expected.
    Profilee STDOUT: HandlesProfiler::CheckIfAlive(pinned): object not alive as expected.
    Profilee STDOUT: Profiler.dll!Profiler::Shutdown
    Profilee STDOUT: PROFILER TEST PASSES
    Profilee STDOUT: [createdump] Gathering state for process 15768 corerun
    Profilee STDOUT: [createdump] Crashing thread 3d9e signal 11 (000b)
    Test failed: Profilee returned exit code 139 instead of expected exit code 100.
    [createdump] Gathering state for process 15761 corerun
    [createdump] Crashing thread 3d91 signal 6 (0006)
    [createdump] Writing crash report to file /datadisks/disk1/dumps/coredump.15761.dmp.crashreport.json
    [createdump] Crash report successfully written
    [createdump] Writing minidump with heap to file /datadisks/disk1/dumps/coredump.15761.dmp
    [createdump] Written 81965056 bytes (20011 pages) to core file
    [createdump] Target process is alive
    [createdump] Dump successfully written in 562ms
    Expected: 100
    Actual: 134
    END EXECUTION - FAILED
    Test Harness Exitcode is : 1
    To run the test:
    Set u
    

    Stack trace:

       at TestLibrary.OutOfProcessTest.RunOutOfProcessTest(String assemblyPath, String testPathPrefix)
       at Program.<<Main>$>g__TestExecutor18|0_19(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)
    
  17. modified the milestones: 11.0.0, 12.0.0 on Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-Diagnostics-coreclrblocking-clean-ci-optionalblocking-outerloop

Type

No type

Projects

  • Status
    No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions