Skip to content

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

@github-actions

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 Definition 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
1 4 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions