dotnet / dotnet/runtime

GC.GetGeneration test fails under R2R with JitStressRegs=2

Open
#132,291 6 comments 0 reactions 1 assignee Claimed by @kkokosa View on GitHub
area-ReadyToRun blocking-clean-ci-optional untriaged
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

(from copilot):

# `GC.GetGeneration` test fails under R2R with JitStressRegs=2

## Build information

- Pipeline: `runtime-coreclr r2r-extra`
- Build: [`20260809.1` (1546038)](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1546038)
- Test result: [`GC/API/GC/GetGeneration/GetGeneration.dll`](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1546038&view=ms.vss-test-web.build-test-results-tab&runId=42571104&resultId=122639)
- 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:

```text
+ 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.<$>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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.