Skip to content

System.Formats.Nrbf.Tests.EdgeCaseTests.CanReadArrayOfAnySize times out on checked coreclr #125994

Description

@lewing

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1348315
Leg Name: Libraries Test Run checked coreclr windows x64 Release

Error Message

{
    "ErrorMessage": ["CanReadArrayOfAnySize", "timed out"],
    "BuildRetry": false,
    "ExcludeConsoleLog": false
}

Description

System.Formats.Nrbf.Tests.EdgeCaseTests.CanReadArrayOfAnySize times out after 14+ minutes on the checked coreclr windows x64 Release leg. The test runs as a long-running test until the Helix work item is killed.

Helix log: https://helix.dot.net/api/2019-06-17/jobs/c6faf158-7c28-4acb-bec6-ddcc415ba5e5/workitems/System.Formats.Nrbf.Tests/console

Previous occurrence: #110285 (closed December 2024)

Pull request where observed: #125961 (codeflow update, unrelated to the failure)

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1348315
Error message validated: [CanReadArrayOfAnySize timed out]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 3/23/2026 11:03:41 PM UTC

Report

Build Definition Test Pull Request
1348938 dotnet/runtime System.Formats.Nrbf.Tests.WorkItemExecution #125881
1348882 dotnet/runtime System.Formats.Nrbf.Tests.WorkItemExecution #125174
1348844 dotnet/runtime System.Formats.Nrbf.Tests.WorkItemExecution #125129
1348773 dotnet/runtime System.Formats.Nrbf.Tests.WorkItemExecution #125983
1348315 dotnet/runtime System.Formats.Nrbf.Tests.WorkItemExecution #125961
1348754 dotnet/runtime System.Formats.Nrbf.Tests.WorkItemExecution #125981
1348752 dotnet/runtime System.Formats.Nrbf.Tests.WorkItemExecution #125083
1348706 dotnet/runtime System.Formats.Nrbf.Tests.WorkItemExecution #125439
1348612 dotnet/runtime System.Formats.Nrbf.Tests.WorkItemExecution #125973
1348585 dotnet/runtime System.Formats.Nrbf.Tests.WorkItemExecution #125835
1348578 dotnet/runtime System.Formats.Nrbf.Tests.WorkItemExecution #125491

Summary

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

Activity

  1. added
    Known Build Error
    on Mar 23, 2026
  2. added
    untriaged
    on Mar 23, 2026
  3. lewing commented on Mar 23, 2026

    @lewing
    MemberAuthor
  4. danmoseley commented on Mar 24, 2026

    @danmoseley
    Contributor

    Note

    This analysis was performed by Copilot.

    The test has these [InlineData] cases:

    [InlineData(100)]
    [InlineData(64_001)]
    [InlineData(127_000)]
    #if RELEASE && NET
    [InlineData(2147483591)] // Array.MaxLength
    #endif

    The 2 GB case (Array.MaxLength = 2,147,483,591) only runs in RELEASE + NET builds. The failing leg is Libraries Test Run checked coreclr windows x64 Release — so the test libraries are built as Release (the #if RELEASE is active), but it runs on checked coreclr (debug assertions enabled in the runtime).

    The test allocates a 2 GB byte[], fills it with random data, serializes via BinaryFormatter to a temp file, then deserializes with NrbfDecoder.Decode() and calls Assert.Equal on the entire array. On checked coreclr, the runtime's debug assertions and extra validation massively slow down operations on huge arrays. The Helix log shows the test running for 14+ minutes with xUnit flagging it as [Long Running Test] at 2-minute intervals until the work item is killed at ~15.5 min.

    This only manifests on checked coreclr because:

    1. The #if RELEASE guard enables the 2 GB test case for Release library builds
    2. But the runtime is a checked build (with expensive assertions/validation)
    3. The combination of "test is enabled" + "runtime is slow" causes the timeout

    On release coreclr this test presumably completes in time. On Debug library builds, the 2 GB case is #if'd out.

  5. danmoseley commented on Mar 24, 2026

    @danmoseley
    Contributor

    The above doesn't explain why this suddenly started happening as the code/tests didn't change for this library.

    We should probably try adding [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.Is64BitProcess), nameof(PlatformDetection.IsReleaseRuntime))]

  6. added a commit that references this issue on Mar 27, 2026
    8204c34
  7. removed
    untriaged
    on Mar 27, 2026
  8. added
    untriaged
    on Mar 27, 2026
  9. removed
    untriaged
    on Mar 27, 2026
  10. locked and limited conversation to collaborators on Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Known Build Errorarea-System.Formats.Nrbf

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions