dotnet / dotnet/runtime

[ci-scan] Test failure: System.Reflection.Tests.PropertyInfoTests.GetHashCode_MultipleSubClasses_ShouldBeUnique

Open
#133,208 1 comment 0 reactions 0 assignees View on GitHub
area-VM-reflection-mono blocking-clean-ci Known Build Error
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

### Description

`System.Reflection.Tests.PropertyInfoTests.GetHashCode_MultipleSubClasses_ShouldBeUnique` intermittently fails because two property subclasses produce the same hash code. This was observed in runtime CI build https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1579548.

### Reproduction Steps

Run `System.Reflection.Tests` under the Mono interpreter on Ubuntu 26.04 x64. The failure is intermittent; the CI occurrence and console log are linked below.

### Expected behavior

The test completes without finding a hash-code collision among the tested `PropertyInfo` subclasses.

### Actual behavior

#### Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1579548
Build error leg or test failing: Ubuntu.2604.Amd64.Open - `System.Reflection.Tests.PropertyInfoTests.GetHashCode_MultipleSubClasses_ShouldBeUnique`
Pull request: https://github.com/dotnet/runtime/pull/132927

#### Error Details

```
System.Reflection.Tests.PropertyInfoTests.GetHashCode_MultipleSubClasses_ShouldBeUnique [FAIL]
Assert.Equal() Failure: Values differ
Expected: 0
Actual: 1
at System.Reflection.Tests.PropertyInfoTests.GetHashCode_MultipleSubClasses_ShouldBeUnique()
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
```

#### Error Message

```json
{
"ErrorMessage": [
"System.Reflection.Tests.PropertyInfoTests.GetHashCode_MultipleSubClasses_ShouldBeUnique [FAIL]",
"Assert.Equal() Failure: Values differ"
],
"ErrorPattern": "",
"BuildRetry": false,
"ExcludeConsoleLog": false
}
```

Agentic workflow metadata (ci-failure-scan)

Workflow artifact: ci-failure-scan
Artifact kind: kbe-verification
Verified match count: 1 hits in failure.log

Console log: https://helixr1107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-132927-merge-1d9bb1edac7e43f48c/System.Reflection.Tests/1/console.451646fa.log?helixlogtype=result

### Regression?

Unknown.

### Known Workarounds

None known.

### Configuration

- .NET 11 CI build
- Ubuntu 26.04
- x64
- Mono interpreter

### Other information

A related failure was previously tracked in #121254 for NativeAOT on Android, but that issue does not cover this Mono interpreter/Linux configuration and was not a Known Build Error.

> [!NOTE]
> This issue was prepared with GitHub Copilot assistance and reviewed by the submitting developer.

### Report

|Build|Repository|Test|Pull Request|
|---|---|---|---|
|[1593891](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1593891)|dotnet/runtime|[System.Reflection.Tests.PropertyInfoTests.GetHashCode_MultipleSubClasses_ShouldBeUnique](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1593891&view=ms.vss-test-web.build-test-results-tab&runId=43995104&resultId=144827)|dotnet/runtime#133656|
#### Summary
|24-Hour Hit Count|7-Day Hit Count|1-Month Count|
|---|---|---|
|0|1|1|

Contributor guide

Open the contributing guide

Research direction

Start with System.Reflection.Tests.PropertyInfoTests.GetHashCode_MultipleSubClasses_ShouldBeUnique and reproduce it under the Mono interpreter on Ubuntu 26.04 x64, using the linked CI result and console log. Investigate the intermittent hash-code collision and the related #121254 context; done means the cause is addressed and the test completes reliably without a collision.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.