Skip to content

[ci-scan] Test failure: System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips (zstd OOM on x86) #130948

Description

@lewing

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1513558
Build error leg or test failing: Libraries Test Run release coreclr windows x86 Release - System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips
Pull request: #130816

Error Details

On 32-bit (x86), the zstd round-trip compression test throws OutOfMemoryException from the native Zstandard encoder under memory pressure. Reproduced across all three Helix retries of the work item.

System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips(encoding: "zstd") [FAIL]
  System.OutOfMemoryException : Insufficient memory to continue the execution of the program.
  Stack Trace:
    /_/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardUtils.cs(60,0): at System.IO.Compression.ZstandardUtils.Throw(ZSTD_error error)
    /_/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardEncoder.cs(266,0): at System.IO.Compression.ZstandardEncoder.CompressCore(...)
    /_/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardStream.Compress.cs(155,0): at System.IO.Compression.ZstandardStream.WriteCoreAsync(...)
    /_/src/libraries/System.Net.Http/tests/FunctionalTests/CompressedContentTest.NonBrowser.cs(113,0): at System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips(String encoding)

Console log: https://helixr1107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-130816-merge-652dacff842f4867b0/System.Net.Http.Functional.Tests/1/console.ba7ba570.log?helixlogtype=result

Error Message

{
  "ErrorMessage": [
    "System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips(encoding: \"zstd\") [FAIL]",
    "System.OutOfMemoryException : Insufficient memory to continue the execution of the program."
  ],
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Note

This issue draft was prepared with GitHub Copilot assistance and reviewed by the submitting developer.

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1513558
Error message validated: [System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips(encoding: "zstd") [FAIL] System.OutOfMemoryException : Insufficient memory to continue the execution of the program.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 7/17/2026 2:38:25 AM UTC

Report

Build Repository Test Pull Request
1517781 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #130758
1517570 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #131071
1517370 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #130758
1514233 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #130854
1517280 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #131062
1517015 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #129683
1516936 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #130610
1516899 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #131050
1516867 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #131049
1516864 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #131048
1516809 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #130610
1516746 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #131042
1516531 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips
1516510 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #131029
1516504 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #117223
1516329 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #131019
1516099 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips
1515988 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips
1515850 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #131002
1515690 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #130994
1515652 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #130827
1515240 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #126367
1515054 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #130973
1514783 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #130611
1513096 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #129690
1513558 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #130816
1512674 dotnet/runtime System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips #130627

Summary

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

Activity

  1. added
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    Known Build ErrorUse this to report build issues in the .NET Helix tab
    on Jul 17, 2026
  2. dotnet-policy-service commented on Jul 17, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @karelz, @dotnet/area-system-io-compression
    See info in area-owners.md if you want to be subscribed.

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

    @github-actions
    Contributor

    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: #130948

    Note

    AI/Copilot-generated root-cause hand-off (ci-failure-fix). No automated code change was produced: removing this failure would require either a public-API/behavioral decision about how CompressionLevel.SmallestSize maps to zstd on 32-bit, or muting the test on x86 (not allowed here). Looping in owners to fix forward.

    Root cause (read-only analysis)

    On the 32-bit (windows x86) leg, CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips(encoding: "zstd") throws OutOfMemoryException from the native Zstandard encoder:

    System.OutOfMemoryException : Insufficient memory to continue the execution of the program.
       at System.IO.Compression.ZstandardUtils.Throw(ZSTD_error error)
       at System.IO.Compression.ZstandardEncoder.CompressCore(...)
    

    The test compresses with CompressionLevel.SmallestSize. In ZstandardUtils.GetQualityFromCompressionLevel (src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardUtils.cs), CompressionLevel.SmallestSize maps to Quality_Max — zstd compression level 22. The public docs on ZstandardCompressionOptions.Quality already warn that "Values 20-22 require more memory and should be used with caution." At level 22 the encoder allocates a very large window plus working buffers (well beyond the input size), which exceeds the ~2 GB user address space available to a 32-bit process, so ZSTD_compressStream2 returns a memory-allocation error that surfaces as OutOfMemoryException.

    Because the memory demand is driven by the compression level (window log), not the 4 KB payload, shrinking the test input would not help. This is a streaming (ZstandardStream) path with no pledged source size, so the window cannot be auto-bounded to the input length the way a one-shot compress could.

    Why no in-bounds automated fix:

    • Capping/clamping the SmallestSize -> level-22 mapping (e.g. bounding windowLog on 32-bit, or mapping SmallestSize to a less memory-hungry level) is a public-behavior/design decision for the compression owners, outside small-fix bounds.
    • Skipping the test on x86 would mute coverage, which this workflow must not do.

    Evidence

    • Failing leg: Libraries Test Run release coreclr windows x86 Release — System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips (per the KBE Build error leg or test failing: line). Reproduced across all three Helix retries.
    • Failing build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1513558 (verified: completed/failed).
    • Mapping site: ZstandardUtils.GetQualityFromCompressionLevel (CompressionLevel.SmallestSize => Quality_Max).
    • No high-confidence regressing commit identified; this is a latent 32-bit memory limit for level-22 zstd rather than a recent regression.

    Suggested reviewers / area contacts

    • Area owners (area-System.IO.Compression): @karelz, @dotnet/area-system-io-compression

    A fix would likely bound the zstd window log (or the effective level) for the SmallestSize mapping on 32-bit processes, or otherwise make level 20-22 degrade gracefully under a constrained address space.

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

  6. self-assigned this
    on Jul 20, 2026
  7. locked and limited conversation to collaborators on Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Known Build ErrorUse this to report build issues in the .NET Helix tabarea-System.IO.Compressionblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions