Repository navigation
GC.GetGeneration test fails under R2R with JitStressRegs=2 #132291
Copy link
Copy link
Closed
Labels
Known Build ErrorUse this to report build issues in the .NET Helix tabUse this to report build issues in the .NET Helix tabarea-ReadyToRunblocking-clean-ci-optionalBlocking optional rolling runsBlocking optional rolling runs
Description
(from copilot):
GC.GetGeneration test fails under R2R with JitStressRegs=2
Build information
- Pipeline:
runtime-coreclr r2r-extra - Build:
20260809.1(1546038) - Test result:
GC/API/GC/GetGeneration/GetGeneration.dll - Helix console log: https://helix.dot.net/api/2019-06-17/jobs/9113bb5d-b1e4-4117-98bc-2a7821ca1231/workitems/GC/console
Configuration
- OS: Azure Linux 3
- Architecture: x64
- Runtime configuration: Checked
- ReadyToRun: Crossgen2 (
RunCrossGen2=1) - JIT stress mode:
DOTNET_JitStressRegs=2 - Test run:
R2R-CG2 linux x64 Checked jitstressregs2 @ AzureLinux.3.Amd64.Open
Failure
GC/API/GC/GetGeneration/GetGeneration.dll fails when run from the R2R-CG2 test suite with register stress enabled. The object test passes, but the array test observes generation 0 both before and after a full collection. The test expects the array's generation to increase.
Relevant Helix log:
+ export RunCrossGen2=1
+ RunCrossGen2=1
export DOTNET_JitStressRegs=2
03:34:03.426 Running test: GC/API/GC/GetGeneration/GetGeneration.dll
ObjectTest Passed!
0 0
arrayTest Failed!
failTest Passed!
Test for GetGeneration() FAILED!
Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
Expected: 100
Actual: 1
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 Program.<<Main>$>g__TestExecutor26|0_27(StreamWriter tempLogSw, StreamWriter statsCsvSw, StreamWriter outOfProcessPlanWriter, <>c__DisplayClass0_0&)
03:34:03.645 Failed test: GC/API/GC/GetGeneration/GetGeneration.dll
Known Issue Error Message
DO NOT USE JSON BELOW IF THIS IS A BUILD BREAK otherwise build analysis will allow pull requests to merge that break the build worse. For a build break, do not use this issue form. Make a regular new issue.
Fill the error message using step by step known issues guidance.
{
"ErrorMessage": "Test for GetGeneration() FAILED!",
"ErrorPattern": "",
"BuildRetry": false,
"ExcludeConsoleLog": false
}Known issue validation
Build: 🔎
Result validation:
Validation performed at: 10/15/2026 2:08:09 PM UTC
Report
| Build | Repository | Test | Pull Request |
|---|---|---|---|
| 1637289 | dotnet/runtime | GC/API/GC/GetGeneration/GetGeneration.dll | #135882 |
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 1 | 1 | 1 |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Known Build ErrorUse this to report build issues in the .NET Helix tabUse this to report build issues in the .NET Helix tabarea-ReadyToRunblocking-clean-ci-optionalBlocking optional rolling runsBlocking optional rolling runs
Type
Projects
- StatusShow more project fieldsNo status
Activity
dhartglassMSFT commentedon Aug 13, 2026
@janvorli I'm assuming that this issue is totally distinct from #131542 , since this run used jit stress modes and not the interpreter. Let me know if this is not the case.
janvorli commentedon Aug 17, 2026
@dhartglassMSFT you are right. The most likely reason for the failure is the same as for the GC.Collect and GC.Collect0 tests and the fix would be the same as #132076
dhartglassMSFT commentedon Aug 17, 2026
Thanks Jan
@kkokosa sending this your way then for an initial look, per Jan's pointer.
Though I saw this did not fail on the latest pipeline run from this weekend.
VincentBu commentedon Aug 18, 2026
Failed in: runtime-coreclr jitstress 20260816.1
Failed tests:
Error message:
Stack trace:
VincentBu commentedon Sep 4, 2026
This run doesn't set JitStressRegs. Please let me know if I need to create another issue for this.
Failed in: runtime-coreclr jitstress 20260902.1
Failed tests:
Error message:
Stack trace:
VincentBu commentedon Sep 14, 2026
Failed in: runtime-coreclr outerloop 20260912.2
Failed tests:
Error message:
Stack trace:
VincentBu commentedon Sep 22, 2026
Failed in: runtime-coreclr jitstress 20260920.1
Failed tests:
Error message:
Stack trace:
VincentBu commentedon Sep 29, 2026
Failed in: runtime-coreclr pgo 20260928.1
Failed tests:
Error message:
Stack trace:
VincentBu commentedon Oct 8, 2026
Failed in: runtime-coreclr r2r-extra 20261003.1
Failed tests:
Error message:
Stack trace:
VincentBu commentedon Oct 12, 2026
Failed in: runtime-coreclr jitstressregs 20261010.1
Failed tests:
Error message:
Stack trace:
pcshrosbree commentedon Oct 12, 2026
Another hit, this time on a plain leg: PR #135520, build 1632403,
coreclr linux x64 Checked @ AzureLinux.3.Amd64.Open(console log). The log shows no JIT-stress, GC-stress,RunCrossGen2or interpreter settings; the normal stress script sets only the crash-dump variables. The PR's product change is confined to interpreter execution, which is not enabled in the logged configuration.Build Analysis lists this failure as unmatched. This issue currently has neither the
Known Build Errorlabel nor a JSON block in its description. Could you add the label, and this block to the description?{ "ErrorMessage": "Test for GetGeneration() FAILED!", "ErrorPattern": "", "BuildRetry": false, "ExcludeConsoleLog": false }It is a single string because the
Expected: 100/Actual: 1pair is the merged runner's generic exit-code assertion.Test for GetGeneration() FAILED!is printed by this test and identifies its failure.On the cause, this fits your comment above, @janvorli. #126108 removed this test's process isolation, and #132076 restored it for
Collect,Collect0andCollect1but not forGetGeneration. So the test still runs inside the mergedGCrunner, after the GCHandle tests andGetAllocatedBytesForCurrentThread.On a local linux-x64 Checked build, I ran the full merged
GCrunner 200 times with the same corerun arguments and test order as the CI work item, on a runtime without #135520's change.GetGenerationfailed once (0 0,ObjectTest Failed!). It did not fail in 200 runs with the change, but that rate is too low to compare the two builds.Separately, I wrote a small probe that runs the
arrayTestcheck with 200 pinned 1000-byte arrays allocated before the tested array. It failed the check in about 48% to 90% of iterations, over three runs of 1000 iterations on each build, and each run's first recorded failure was0 0. The unpinned variant and the pins-after-the-array variant had no failures. This shows one way to produce the failure; it does not establish whether pinned objects caused the CI failure or where they came from.I can follow up with a PR adding
<RequiresProcessIsolation>true</RequiresProcessIsolation>toGetGeneration.csproj, following #132076.Note
This comment was prepared with AI assistance (Anthropic Claude, checked by OpenAI Codex) at my request. I reviewed it and the measurements before posting.
Run GC.GetGeneration test in its own process (#135657)