Skip to content

System.AccessViolationException in System.Threading.Tasks.Tests Work Item #130595

Closed

Description

@VincentBu

Failed in: runtime-coreclr libraries-jitstress2-jitstressregs 20260711.1

Failed tests:

net11.0-windows-Release-arm64-jitstress2_jitstressregs0x80-Windows.11.Arm64.Open
- System.Threading.Tasks.Tests Work Item

Error message:

Fatal error.

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Stack trace:

   at System.Threading.Tasks.Tests.AsyncProfilerTests+<>c__DisplayClass84_0.<CollectEventsAsync>b__0()

   at System.Runtime.CompilerServices.AsyncProfiler+ContinuationWrapper.Continuation_Wrapper_1(System.Runtime.CompilerServices.Continuation, Byte ByRef)

Repeated 2 times:

--------------------------------

   at System.Runtime.CompilerServices.AsyncHelpers+RuntimeAsyncTask`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].InstrumentedDispatchContinuations(Flags)

   at System.Runtime.CompilerServices.AsyncHelpers+RuntimeAsyncTask`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].DispatchContinuations()

   at System.Threading.Tasks.Task.RunContinuations(System.Object)

   at System.Threading.Tasks.Task`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TrySetResult(System.Threading.Tasks.VoidTaskResult)

--------------------------------

   at System.Runtime.CompilerServices.AsyncHelpers+RuntimeAsyncTask`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].InstrumentedDispatchContinuations(Flags)

   at System.Runtime.CompilerServices.AsyncHelpers+RuntimeAsyncTask`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].DispatchContinuations()

   at System.Threading.ThreadPoolWorkQueue.Dispatch()

   at System.Threading.PortableThreadPool+WorkerThread.WorkerDoWork(System.Threading.PortableThreadPool)

   at System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()

   at System.Threading.Thread.StartCallback(System.Threading.Thread*)

Activity

  1. dotnet-policy-service commented on Jul 13, 2026

    @dotnet-policy-service
    Contributor

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

  2. added
    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
    and removed on Jul 13, 2026
  3. dotnet-policy-service commented on Jul 13, 2026

    @dotnet-policy-service
    Contributor

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

  4. jakobbotsch commented on Jul 13, 2026

    @jakobbotsch
    Member

    I suspect this was fixed already via #130536.

  5. jakobbotsch commented on Jul 14, 2026

    @jakobbotsch
    Member

    Looked at the dump and the crash is right around the same code as in #130212:

    00007fff`2bbc4558 17ffffd0 b           System_Threading_Tasks_Tests!System.Threading.Tasks.Tests.AsyncProfilerTests+<>c__DisplayClass84_0.<CollectEventsAsync>b__0()+0xa0 (00007fff`2bbc4498)
    00007fff`2bbc455c f94077a3 ldr         x3,[fp,#0xE8]
    >>> 00007fff`2bbc4560 b9401064 ldr         w4,[x3,#0x10]
    00007fff`2bbc4564 35000184 cbnz        w4,System_Threading_Tasks_Tests!System.Threading.Tasks.Tests.AsyncProfilerTests+<>c__DisplayClass84_0.<CollectEventsAsync>b__0()+0x19c (00007fff`2bbc4594)
    00007fff`2bbc4568 d2824400 mov         x0,#0x1220
    00007fff`2bbc456c f2a22960 movk        x0,#0x114B,lsl #0x10
    00007fff`2bbc4570 f2c040c0 movk        x0,#0x206,lsl #0x20 ("The runtime should have initialized the thread id by now.")
    00007fff`2bbc4574 d2800101 mov         x1,#8
    

    Indeed I validated with Copilot that we CSE'd the thread base and reloaded it from the continuation.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    JitStressCLR JIT issues involving JIT internal stress modesarea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIblocking-clean-ci-optionalBlocking optional rolling runs

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions