Skip to content

[ci-scan] Test failure: GC/API/Refresh/Refresh/Refresh.cmd assertion Expected 100 Actual 101 #130828

Closed

Description

@github-actions

Caution

agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

Details

The threat detection results could not be parsed.

Review the workflow run logs for details.

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1505077
Build error leg or test failing: coreclr Pri1 Runtime Tests Run GCStandAlone linux x64 checked - GC/API/Refresh/Refresh/Refresh.cmd

This standalone-GC regression test fails deterministically across all GCStandAlone / GCStandAloneServer legs (linux x64, linux arm64, windows x64, windows arm64) on every recent gc-standalone (definition 146) run. Reproduced in build 1505077 and again in the later build 1508088.

Tracking: #127667 (existing area-team tracker, not a Known Build Error, so Build Analysis does not match it).

Error Details

13:58:11.446 Running test: GC/API/Refresh/Refresh/Refresh.cmd
Fail
Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
Expected: 100
Actual:   101
   at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/arcade/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 102
   at __GeneratedMainWrapper.Main()
END EXECUTION - FAILED

Persistent across the entire scanned window (100% failure rate in the ~10-build sample); true origin predates 2026-07-08 and has been tracked since #127667 (opened 2026-05-01).

Error Message

{
  "ErrorMessage": [
    "GC/API/Refresh/Refresh/Refresh.cmd",
    "Assert.Equal() Failure: Values differ",
    "Actual:   101"
  ],
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Filed by ci-failure-scan (detection only). ci-failure-fix walks open [ci-scan] KBEs and either opens a small fix PR or comments here to loop in owners — it never disables the test.

Generated by CI Outer-Loop Failure Scanner · 546 AIC · ⊞ 19.5K · ◷

Report

Build Repository Test Pull Request
1542549 dotnet/runtime GC/API/GC/Collect_Aggressive_LargePages/Collect_Aggressive_LargePages.cmd
1539211 dotnet/runtime GC/API/GC/Collect_Aggressive_LargePages/Collect_Aggressive_LargePages.cmd
1536423 dotnet/runtime GC/API/Refresh/Refresh/Refresh.cmd
1533113 dotnet/runtime GC/API/Refresh/Refresh/Refresh.cmd
1529665 dotnet/runtime GC/API/GC/Collect_Aggressive_LargePages/Collect_Aggressive_LargePages.cmd
1527159 dotnet/runtime GC/API/GC/Collect_Aggressive_LargePages/Collect_Aggressive_LargePages.cmd
1523377 dotnet/runtime GC/API/Refresh/Refresh/Refresh.cmd
1519705 dotnet/runtime GC/API/GC/Collect_Aggressive_LargePages/Collect_Aggressive_LargePages.cmd
1516626 dotnet/runtime GC/API/Refresh/Refresh/Refresh.cmd
1512417 dotnet/runtime GC/API/GC/GetConfigurationVariables/GetConfigurationVariables.cmd

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
1 3 10

Activity

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

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @anicka-net, @dotnet/gc
    See info in area-owners.md if you want to be subscribed.

  2. removed
    untriagedNew issue has not been triaged by the area owner
    on Jul 17, 2026
  3. added this to the 11.0.0 milestone on Jul 17, 2026
  4. github-actions commented on Jul 18, 2026

    @github-actions
    ContributorAuthor

    Caution

    agentic threat detected
    Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

    Details

    The threat detection results could not be parsed.

    Review the workflow run logs for details.

    Workflow artifact: ci-fix
    Artifact kind: handoff
    Linked KBE: #130828

    Note

    AI/Copilot-generated triage note.

    This Known Build Error has no producible automated code change (a standalone-GC product behavior difference in GC.RefreshMemoryLimit() that must not be worked around in the test), so I am looping in the GC area owners to fix it forward rather than mute it.

    Root cause (best analysis)

    GC/API/Refresh/Refresh.cmd fails deterministically on every GCStandAlone / GCStandAloneServer leg (linux x64/arm64, windows x64/arm64) under gc-standalone (definition 146), returning exit code 101 instead of 100:

    Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
    Expected: 100
    Actual:   101
    

    The test (src/tests/GC/API/Refresh/Refresh.cs) sets GCHeapHardLimit via AppContext.SetData, calls GC.RefreshMemoryLimit(), then asserts GC.GetGCMemoryInfo().TotalAvailableMemoryBytes equals the newly-set limit:

    AppContext.SetData("GCHeapHardLimit", (ulong)hundred_mb);
    GC.RefreshMemoryLimit();
    if (GC.GetGCMemoryInfo().TotalAvailableMemoryBytes != hundred_mb)
        return 101; // first check already fails under the standalone GC

    The first check already fails under the standalone GC, so TotalAvailableMemoryBytes does not reflect the refreshed hard limit. This indicates the RefreshMemoryLimit / hard-limit refresh path is not wired the same way in the standalone GC build as in the in-proc GC. Because the failure is 100% reproducible only on the standalone-GC legs (and passes on the default GC), this is a GC product issue, not a test defect. Per this workflow's rules, GC product fixes are out of bounds for an automated PR, so this is a hand-off (never a test-disable).

    Evidence

    Suggested reviewers / area contacts

    • Area owners (area-GC-coreclr): @anicka-net, @dotnet/gc

    Note

    This root-cause hand-off was generated by an AI/Copilot agent. No code change was produced because the failure is a standalone-GC product behavior difference that must not be worked around in test code. Please verify before acting.

    Generated by CI Outer-Loop Failure Fixer · 386 AIC · ⊞ 18.2K · ◷

  5. VincentBu commented on Jul 28, 2026

    @VincentBu
    Contributor

    Failed in: gc-standalone 20260726.1

    Failed tests:

    coreclr linux x64 Checked gcstandalone @ AzureLinux.3.Amd64.Open
    - GC/API/Refresh/Refresh/Refresh.cmd
    coreclr linux arm64 Checked gcstandalone @ AzureLinux.3.Arm64.Open
    - GC/API/Refresh/Refresh/Refresh.cmd
    coreclr linux x64 Checked gcstandaloneserver @ AzureLinux.3.Amd64.Open
    - GC/API/Refresh/Refresh/Refresh.cmd
    coreclr linux arm64 Checked gcstandaloneserver @ AzureLinux.3.Arm64.Open
    - GC/API/Refresh/Refresh/Refresh.cmd
    coreclr windows arm64 Checked gcstandaloneserver @ Windows.11.Arm64.Open
    - GC/API/Refresh/Refresh/Refresh.cmd
    coreclr windows arm64 Checked gcstandalone @ Windows.11.Arm64.Open
    - GC/API/Refresh/Refresh/Refresh.cmd
    coreclr windows x64 Checked gcstandalone @ Windows.10.Amd64.Open
    - GC/API/Refresh/Refresh/Refresh.cmd
    coreclr windows x64 Checked gcstandaloneserver @ Windows.10.Amd64.Open
    - GC/API/Refresh/Refresh/Refresh.cmd
    
    

    Error message:

    
    Return code:      1
    Raw output file:      /datadisks/disk1/work/B2B109D7/w/AABF095C/uploads/API/Refresh/Refresh/output.txt
    Raw output:
    BEGIN EXECUTION
    /datadisks/disk1/work/B2B109D7/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true Refresh.dll ''
    Fail
    Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
    Expected: 100
    Actual:   101
       at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/arcade/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 102
       at __GeneratedMainWrapper.Main()
    Expected: 100
    Actual: 101
    END EXECUTION - FAILED
    Test Harness Exitcode is : 1
    To run the test:
    Set up CORE_ROOT and run.
    > /datadisks/disk1/work/B2B109D7/w/AABF095C/e/GC/GC/../API/Refresh/Refresh/Refresh.sh
    

    Stack trace:

       at Xunit.Assert.True(Nullable`1 condition, String userMessage) in /_/src/arcade/src/Microsoft.DotNet.XUnitAssert/src/BooleanAsserts.cs:line 135
       at Program.<<Main>$>g__TestExecutor37|0_38(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)
    
  6. janvorli commented on Aug 6, 2026

    @janvorli
    Member

    The test can never succeed with GC segments mode, because the the limits are not refreshed from the settings unless the USE_REGIONS is defined.
    See

    #ifdef USE_REGIONS
    GCConfig::RefreshHeapHardLimitSettings();
    if (!compute_hard_limit())
    {
    succeed = false;
    status = refresh_hard_limit_invalid;
    }
    hard_limit_config_p = heap_hard_limit != 0;
    #else
    size_t new_current_total_committed = 0;
    #endif //USE_REGIONS

  7. janvorli commented on Aug 6, 2026

    @janvorli
    Member

    There was even a PR that disabled the test for non-region platform and comment saying the test doesn't work on non-region platforms:
    #97437 (comment)

    So it was never meant to run with segments.

  8. added a commit that references this issue on Aug 7, 2026
    cb1b022
  9. added a commit that references this issue on Aug 11, 2026
    f0b12ff
  10. locked and limited conversation to collaborators on Sep 7, 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

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions