Skip to content

[ci-scan] Known Build Error: NullReferenceException in AsyncHelpers.RuntimeAsyncTask.HandleSuspended on NativeAOT x86 #127900

Closed

Description

@github-actions

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1410188
Build error leg or test failing: windows-x86 Release NativeAOT_Libs-System.Threading.Channels.Tests

Error Message

{
  "ErrorMessage": "at System.Runtime.CompilerServices.AsyncHelpers.RuntimeAsyncTask`1.HandleSuspended(AsyncHelpers.RuntimeAsyncAwaitState&)",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

System.Threading.Channels.Tests crashes in runtime-nativeaot-outerloop (def 265) on windows-x86 Release with NativeAOT compilation. An unhandled NullReferenceException is thrown at AsyncHelpers.RuntimeAsyncTask<T>.HandleSuspended(AsyncHelpers.RuntimeAsyncAwaitState&) in AsyncHelpers.CoreCLR.cs:476. This is an x86-specific NativeAOT runtime-async issue — the async state machine helper dereferences a null pointer when suspending an async task on the 32-bit NativeAOT runtime.

Affected pipelines (3 confirmed failing builds):

  • runtime-nativeaot-outerloop (def 265): windows-x86 Release NativeAOT_Libs — builds 1410188, 1408078, 1407254

Note: Build 1411078 (May 7, 2026) succeeded, indicating a possible recent fix. This KBE is filed to provide Build Analysis coverage for any recurrence.

Errors log:

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Runtime.CompilerServices.AsyncHelpers.RuntimeAsyncTask`1.HandleSuspended(AsyncHelpers.RuntimeAsyncAwaitState&)
      in AsyncHelpers.CoreCLR.cs:line 476
exit code -1073740791

First build it occurred: Build 1407254 (May 4, 2026) is the earliest in the scanned window. Occurrence count in window: 3.

Recommended action:

  • Owner: @dotnet/runtime-async (runtime-async area, @agocke, @stephentoub)
  • Root cause: RuntimeAsyncTask<T>.HandleSuspended dereferences a null reference at line 476 of AsyncHelpers.CoreCLR.cs. Investigate whether the NativeAOT x86 async state machine sets up the RuntimeAsyncAwaitState correctly before calling HandleSuspended.
  • File path: src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncHelpers.CoreCLR.cs
  • If the failure is confirmed fixed by a recent PR, close this issue with a reference to that PR.

Note

🤖 This issue was generated by the CI Outer-Loop Failure Scanner.

Note

🔒 Integrity filter blocked 1 item

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

  • #110173 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 · ● 16.2M · ◷

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1410188
Error message validated: [AsyncHelpers.RuntimeAsyncTask1.HandleSuspended`]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 5/7/2026 3:30:21 AM UTC

Report

Build Definition Test Pull Request
1410188 dotnet/runtime System.Threading.Channels.Tests.WorkItemExecution

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 1 1

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1410188
Error message validated: [AsyncHelpers.RuntimeAsyncTask1.HandleSuspended`]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 5/7/2026 3:30:21 AM UTC

Report

Build Repository Test Pull Request
1424404 dotnet/runtime System.Text.Json.SourceGeneration.Roslyn4.4.Tests.WorkItemExecution
1423942 dotnet/runtime System.Text.Json.SourceGeneration.Roslyn4.4.Tests.WorkItemExecution
1423513 dotnet/runtime System.Text.Json.SourceGeneration.Roslyn4.4.Tests.WorkItemExecution
1418798 dotnet/runtime System.Threading.Channels.Tests.WorkItemExecution #127762
1410188 dotnet/runtime System.Threading.Channels.Tests.WorkItemExecution

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 5

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1410188
Error message validated: [AsyncHelpers.RuntimeAsyncTask1.HandleSuspended`]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 5/7/2026 3:30:21 AM UTC

Activity

  1. added
    Known Build Error
    on May 7, 2026
  2. added
    untriaged
    on May 7, 2026
  3. added this to the 11.0.0 milestone on May 7, 2026
  4. removed
    untriaged
    on May 7, 2026
  5. dotnet-policy-service commented on May 7, 2026

    @dotnet-policy-service
    Contributor

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

  6. jakobbotsch commented on May 7, 2026

    @jakobbotsch
    Member

    Line 476 is in this code:

    // Skip to a nontransparent/user continuation. Such continuaton must exist.
    // Since we see a VTS notifier, something was directly or indirectly
    // awaiting an async thunk for a ValueTask-returning method.
    // That can only happen in nontransparent/user code.
    Continuation nextUserContinuation = headContinuation.Next!;
    while ((nextUserContinuation.Flags & continueFlags) == 0 && nextUserContinuation.Next != null)
    {
    nextUserContinuation = nextUserContinuation.Next;
    }

    @VSadov Do you want to take a look?

  7. self-assigned this
    on May 28, 2026
  8. locked and limited conversation to collaborators on Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Known Build Erroragentic-workflowsarea-VM-coreclrruntime-async

Type

No type

Projects

  • Status
    No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions