Skip to content

[ci-scan] Known Build Error: StreamReader NegativeOneBufferSize test fails under PGO #128062

@github-actions

Description

@github-actions

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1414905
Pipeline: runtime-coreclr libraries-pgo (definition 145)
Affected leg: linux-x64 Release

Error Message

{
  "ErrorMessage": ["bufferSize ('-1') must be a non-negative and non-zero value"],
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Summary

System.IO.Tests.StreamReader_StringCtorTests.NegativeOneBufferSize_ShouldNotThrowException fails under PGO (libraries-pgo pipeline). The test expects that new StreamReader(path, Encoding.UTF8, true, -1) does not throw, but under PGO it throws ArgumentOutOfRangeException: bufferSize ('-1') must be a non-negative and non-zero value.

The StreamReader(string, Encoding, bool, int) constructor calls ValidateArgsAndOpenPath(path, bufferSize) which skips validation for -1, then chains to the Stream-based constructor which converts -1 to DefaultBufferSize. Under normal execution this works; the PGO-compiled code path may be reordering or inlining in a way that hits validation before the -1 → default conversion.

Impact on platforms

  • runtime-coreclr libraries-pgo (def 145) · linux-x64 Release · exit code 1

Console log

System.IO.Tests.StreamReader_StringCtorTests.NegativeOneBufferSize_ShouldNotThrowException [FAIL]
      System.ArgumentOutOfRangeException : bufferSize ('-1') must be a non-negative and non-zero value. (Parameter 'bufferSize')
      Stack Trace:
        at System.ArgumentOutOfRangeException.ThrowNegativeOrZero[T](T value, String paramName)
        at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
        at System.IO.Tests.StreamReader_StringCtorTests.NegativeOneBufferSize_ShouldNotThrowException()

Console log

First build it occurred

Present in builds 1414905 (May 10) and 1414533 (May 9). ≥2 occurrences.

Recommended action

Investigate whether PGO-guided inlining/optimization is changing the evaluation order of ValidateArgsAndOpenPath and the Stream ctor's bufferSize check. The -1 sentinel value should be converted to DefaultBufferSize before ThrowIfNegativeOrZero runs.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • dotnet.github.io

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "dotnet.github.io"

See Network Configuration for more information.

Note

🔒 Integrity filter blocked 4 items

The following items were blocked because they don't meet the GitHub integrity level.

  • #116358 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #86273 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #125436 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #128019 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

Generated by CI Outer-Loop Failure Scanner · ● 56.5M ·

Report

Build Definition Test Pull Request
1416672 dotnet/runtime System.IO.Tests.StreamReader_StringCtorTests.NegativeOneBufferSize_ShouldNotThrowException #126671

Summary

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

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1414905
Error message validated: [NegativeOneBufferSize_ShouldNotThrowException System.ArgumentOutOfRangeException]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 5/12/2026 11:31:36 AM UTC

Report

Build Definition Test Pull Request
1416672 dotnet/runtime System.IO.Tests.StreamReader_StringCtorTests.NegativeOneBufferSize_ShouldNotThrowException #126671
1414905 dotnet/runtime System.IO.Tests.StreamReader_StringCtorTests.NegativeOneBufferSize_ShouldNotThrowException

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 2 2

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1414905
Error message validated: [NegativeOneBufferSize_ShouldNotThrowException System.ArgumentOutOfRangeException]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 5/12/2026 11:31:36 AM UTC

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1414905
Error message validated: [bufferSize ('-1') must be a non-negative and non-zero value]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 5/13/2026 8:12:07 AM UTC

Report

Build Definition Test Pull Request
1419811 dotnet/runtime System.IO.Tests.StreamWriter_StringCtorTests.NegativeOneBufferSize_ShouldNotThrowException #126367
1419237 dotnet/runtime System.IO.Tests.StreamReader_StringCtorTests.NegativeOneBufferSize_ShouldNotThrowException #128148
1416672 dotnet/runtime System.IO.Tests.StreamReader_StringCtorTests.NegativeOneBufferSize_ShouldNotThrowException #126671
1414905 dotnet/runtime System.IO.Tests.StreamReader_StringCtorTests.NegativeOneBufferSize_ShouldNotThrowException

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 4 4

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1414905
Error message validated: [NegativeOneBufferSize_ShouldNotThrowException System.ArgumentOutOfRangeException]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 5/12/2026 11:31:36 AM UTC

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1414905
Error message validated: [bufferSize ('-1') must be a non-negative and non-zero value]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 5/13/2026 8:12:07 AM UTC

Metadata

Metadata

Assignees

Labels

Known Build ErrorUse this to report build issues in the .NET Helix tabagentic-workflowsarea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIblocking-clean-ci-optionalBlocking optional rolling runs

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions