Skip to content

[ci-scan] Vector3Interop_r crash (SIGSEGV) under GCStress=0xC JitStress=2 (gcstress-extra pipeline) #127827

Closed

Description

@github-actions

Reasoning

JIT/SIMD/Vector3Interop_r/Vector3Interop_r.cmd consistently crashes with a native SIGSEGV (App Exit Code 22) when run under DOTNET_GCStress=0xC DOTNET_JitStress=2 DOTNET_TieredCompilation=0 (the gcstress-extra pipeline configuration). The crash occurs in the PAL signal handler stack, indicating an unhandled memory access fault inside the JIT-compiled code while GC stress is active. This has been reproduced on linux-x64, osx-arm64, and linux-arm64 in at least two consecutive pipeline runs. It is not a test-infrastructure issue — Vector3Interop_r exercises Vector3 P/Invoke interop and Vector SIMD operations which are sensitive to the GC moving objects during JIT codegen stress.

Impact on platforms

  • linux-x64 · pipeline 113 (gcstress-extra) · build 1406727 · work item JIT.SIMD.0.1 · Helix job 3565d1f5 · queue azurelinux.3.amd64.open.rt · exit code 22 · signal 11 (SIGSEGV)
  • osx-arm64 · pipeline 113 · build 1406727 · work item JIT.SIMD.0.1 · Helix job 4bc8d02d · queue osx.15.arm64.open · exit code 22 · signal 11 (SIGSEGV)
  • linux-arm64 · pipeline 113 · build 1406727 · work item JIT.SIMD.0.1 · Helix job 5bb4c8cb · exit code 22 · signal 11 (SIGSEGV)
  • Confirmed recurring: same JIT.SIMD.0.1 failure in build 1406299 (2026-05-02)

Errors log

22:17:28.190 Running test: JIT/SIMD/Vector3Interop_r/Vector3Interop_r.cmd
[createdump] Gathering state for process ... dotnet
[createdump] Crashing thread f43a signal 11 (000b)
[createdump] Written 149319680 bytes to core file
App Exit Code: 22
END EXECUTION - FAILED
common_signal_handler(int, siginfo_t*, void*, int, ...) at src/coreclr/pal/src/exception/signal.cpp:1167:9
sigsegv_handler(int, siginfo_t*, void*) at src/coreclr/pal/src/exception/signal.cpp:762:1
```

Stress mode env:
```
DOTNET_TieredCompilation=0
DOTNET_GCStress=0xC
DOTNET_JitStress=2
DOTNET_DbgEnableMiniDump=1

First build it occurred

First seen in this scan window: build 1406299, finished 2026-05-02T22:30:29Z. Confirmed in subsequent build 1406727, finished 2026-05-04T01:11:48Z. Scanned window only — true origin may be earlier. Occurrences in window: 2+ builds, 3 platforms.

Recommended action

  1. Triage: Run Vector3Interop_r locally with DOTNET_GCStress=0xC DOTNET_JitStress=2 DOTNET_TieredCompilation=0 to reproduce. Examine the crash dump for the faulting instruction and the managed/native call stack to determine whether the fault is in JIT-emitted code (bad code gen under stress), in the GC compaction path, or in the P/Invoke stub for Vector3.
  2. JIT owners (@dotnet/area-infrastructure-coreclr-jit): Check whether the Vector3Interop test exercises a code path that is sensitive to the combination of GCStress=0xC (both 0x4 mark-phase and 0x8 compaction) and JitStress=2.
  3. GC owners (@dotnet/area-gc): Verify whether the crash is triggered by a moving GC during a P/Invoke that holds a reference to a Vector3 value on the stack.
  4. Short-term muting: If the crash is confirmed to be environment-specific (stress-only), add [ActiveIssue("https://github.com/dotnet/runtime/issues/<this>", typeof(TestLibrary.PlatformDetection), nameof(TestLibrary.PlatformDetection.IsStressTest))] to the Vector3Interop_r test.
  5. Files to investigate: src/tests/JIT/SIMD/Vector3Interop/Vector3Interop.cs, src/coreclr/jit/lsra*.cpp (SIMD register allocation), src/coreclr/gc/gc.cpp (compaction + interop).

Note

🔒 Integrity filter blocked 4 items

The following items were blocked because they don't meet the GitHub integrity level.

  • #125371 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #125825 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #55803 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #127128 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

Generated by CI Outer-Loop Failure Scanner · ● 19.3M · ◷

Activity

  1. added
    os-linux
    area-CodeGen-coreclr
    untriaged
    on May 5, 2026
  2. dotnet-policy-service commented on May 5, 2026

    @dotnet-policy-service
    Contributor

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

  3. added
    os-macos
    and removed on May 6, 2026
  4. added this to the Future milestone on May 7, 2026
  5. kg commented on May 7, 2026

    @kg
    Contributor
  6. removed this from the Future milestone on May 7, 2026
  7. 7 remaining items

  8. mangod9 commented on May 10, 2026

    @mangod9
    Member

    GCStress Crash in Vector3Interop_r — Runtime-Async Continuation GC Reporting Bug

    Symptoms

    • Test: JIT/SIMD/Vector3Interop_r/Vector3Interop_r.cmd crashes under gcstress-extra pipeline (def 113)
    • Stress config: DOTNET_GCStress=0xC DOTNET_JitStress=2 DOTNET_TieredCompilation=0
    • Platforms: linux-x64, osx-arm64, linux-arm64 — all 3 crash with SIGSEGV/SIGTRAP
    • Exit code: 22 (EINVAL from watchdog)
    • First failure: Build 1375378 (April 11, 2026)
    • Frequency: 100% — every gcstress-extra build since April 11 fails on this test
    • Cause of late filing: The CI scanner bot only recently started monitoring the gcstress-extra pipeline

    What the Dumps Show

    Three dumps were analyzed (one per platform). All show the same crash pattern:

    The crash is NOT in the Vector3Interop test itself. Vector3Interop runs as a child process. The crash is in the test wrapper process (corerun running the xunit harness), which spawns the child and reads its output via pipes. Vector3Interop_r is the only .cmd (out-of-process) test in the JIT.SIMD workitem — all other 112 tests are in-process .dll tests that don't use pipe I/O.

    Crashing thread (thread pool worker, all 3 dumps):

    System.IO.Pipes.PipeStream.ReadAsync(Memory<Byte>, CancellationToken)
    ILStubClass.IL_STUB_AsyncResume_ReadAsync_Optimized(Object, Byte ByRef)
    RuntimeAsyncTask<VoidTaskResult>.DispatchContinuations()      ← GC info bug is HERE
    Task.RunContinuations(Object)
    Task<Int32>.TrySetResult(Int32)
    RuntimeAsyncTask<Int32>.DispatchContinuations()
    ManualResetValueTaskSourceCore<Boolean>.SignalCompletion()
    SocketAsyncEventArgs.TransferCompletionCallbackCore(...)
    SocketAsyncEngine.Execute()
    ThreadPoolWorkQueue.Dispatch()
    

    Crash location (from linux-x64 symbolicated console log):

    Object::GetGCSafeMethodTable()    at object.h:365
      → Object::ValidateInner()       at object.cpp:544
    TGcInfoDecoder::ReportStackSlotToGC()  at gcinfodecoder.cpp:2269
      → ReportUntrackedSlots()        at gcinfodecoder.cpp
      → EnumerateLiveSlots()
    EECodeManager::EnumGcRefs()       at eetwain.cpp:1179
    GcStackCrawlCallBack()            at gcenv.ee.common.cpp:318
      ... stack walk ...
    mark_phase()
    GarbageCollectGeneration()
    StressHeap()
    DoGcStress()                      at gccover.cpp:1211
    OnGcCoverageInterrupt()
    

    linux-arm64 provides the clearest assert message:

    ASSERT FAILED
    Expression: !CREATE_CHECK_STRING(pMT && pMT->Validate())
    Location:   src/coreclr/vm/object.cpp:548
    Function:   ValidateInner
    

    Root Cause

    RuntimeAsyncTask<T>.DispatchContinuations() reports an untracked stack slot containing a runtime-async continuation pointer as a regular object reference.

    GC Info for RuntimeAsyncTask<VoidTaskResult>.DispatchContinuations()

    Entry point 0x7A56D18FF360, code size 485, frame pointer rbp:

    Untracked: +rbp-30 +rbp-38 +rbp-40 +rbp-48 +rbp-50 +rbp-58 +rbp-60 +rbp-68 +rbp-70 +rbp-78
    

    10 untracked stack slots reported as plain object references, always scanned by GC regardless of instruction pointer.

    Stack Slot Contents (from linux-x64 dump)

    Frame 30 (RuntimeAsyncTask<VoidTaskResult>.DispatchContinuations), rbp = 0x7A52C3FFE820:

    Slot Address Value Valid Object?
    rbp-78 0x7A52C3FFE7A8 0x7A52D8828498 NO — continuation
    rbp-70 0x7A52C3FFE7B0 0x0000000000000000 NULL (ok)
    rbp-68 0x7A52C3FFE7B8 0x0000000000000000 NULL (ok)
    rbp-60 0x7A52C3FFE7C0 0x0000000000000000 NULL (ok)
    ... ... 0x0000000000000000 NULL (ok)
    rbp-30 0x7A52C3FFE7F0 0x0000000000000000 NULL (ok)

    The value at rbp-78 (0x7A52D8828498) is 96 bytes before this (0x7A52D88284F8). The object at that address has a MethodTable with IsContinuation() = true:

    > dumpobj 0x00007a52d8828498
    ASSERT FAILED
    Expression: !IsContinuation()
    Location:   src/coreclr/vm/methodtable.h:988
    Function:   GetModule
    

    This is a runtime-async continuation object — a special type that uses an encoded MethodTable. The GC's Object::ValidateInner calls pMT->Validate() which doesn't handle the continuation encoding, causing the assert/SIGSEGV.

    Why It Only Fails Under GCStress

    The prolog of DispatchContinuations zero-initializes the stack slots:

    vxorps  ymm8, ymm8, ymm8
    vmovdqu [rbp-0x80], ymm8    ; zeros rbp-80 to rbp-60
    vmovdqu [rbp-0x60], ymm8    ; zeros rbp-60 to rbp-40
    vmovdqu [rbp-0x40], ymm8    ; zeros rbp-40 to rbp-20

    So all 10 slots start as NULL. During method execution, rbp-78 gets populated with a continuation pointer. Without GCStress, the GC would only scan at safepoints where the continuation is expected to be there. But GCStress triggers GC at every instruction, and Object::ValidateInner (Checked build) or Promote (Release) can't handle the continuation's special MethodTable encoding.

    Timeline

    Date Event
    Mar 18 Last passing gcstress-extra build (1340464)
    Mar 28 PR #125406: Enable runtime-async for shared framework (including System.IO.Pipes)
    Apr 11 First failing gcstress-extra build (1375378) — next scheduled run after PR merged
    May 5 CI scanner bot files issue #127827 (pipeline wasn't previously monitored)

    Proposed Fixes

    Option A — Don't report continuation pointers as GC object references:
    The JIT should not emit an untracked object reference slot for a local that holds a runtime-async continuation. Continuations are tracked separately by the runtime-async infrastructure and don't need GC promotion through the standard path.

    Option B — Teach GC validation to handle continuations:
    Object::ValidateInner (and Promote) should recognize IsContinuation() MethodTables and handle them appropriately — either skip validation or use the continuation-specific validation path.

  9. added
    disabled-test
    on May 11, 2026
  10. kg commented on May 11, 2026

    @kg
    Contributor
  11. kg commented on May 18, 2026

    @kg
    Contributor
  12. kg commented on May 22, 2026

    @kg
    Contributor
  13. dhartglassMSFT commented on Oct 14, 2026

    @dhartglassMSFT
    Contributor

    Bug is, jit reports a stack slot to GC for

    • untracked local
    • is not must-init (via optRemoveRedundantZeroInits)
    • is not live across awaits
    • whose store is before any resume points
    • in a method with a resume entry

    This is the same issue as what's fixed by #132326

  14. locked and limited conversation to collaborators on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

agentic-workflowsarch-arm64area-CodeGen-coreclrblocking-clean-ci-optionaldisabled-testgc-stressjit-stressos-linuxos-macos

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions