Repository navigation
Description
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)
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
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 12 | 27 | 27 |
Activity
dotnet-policy-service commentedon Jul 17, 2026
Tagging subscribers to this area: @karelz, @dotnet/area-system-io-compression
See info in area-owners.md if you want to be subscribed.
github-actions commentedon Jul 17, 2026
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 howCompressionLevel.SmallestSizemaps 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")throwsOutOfMemoryExceptionfrom the native Zstandard encoder:The test compresses with
CompressionLevel.SmallestSize. InZstandardUtils.GetQualityFromCompressionLevel(src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardUtils.cs),CompressionLevel.SmallestSizemaps toQuality_Max— zstd compression level 22. The public docs onZstandardCompressionOptions.Qualityalready 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, soZSTD_compressStream2returns a memory-allocation error that surfaces asOutOfMemoryException.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:
SmallestSize-> level-22 mapping (e.g. boundingwindowLogon 32-bit, or mappingSmallestSizeto a less memory-hungry level) is a public-behavior/design decision for the compression owners, outside small-fix bounds.Evidence
Libraries Test Run release coreclr windows x86 Release—System.Net.Http.Functional.Tests.CompressedContentTest.BrotliZstd_SerializeToStream_WithCompressionLevel_RoundTrips(per the KBEBuild error leg or test failing:line). Reproduced across all three Helix retries.ZstandardUtils.GetQualityFromCompressionLevel(CompressionLevel.SmallestSize => Quality_Max).Suggested reviewers / area contacts
area-System.IO.Compression):@karelz,@dotnet/area-system-io-compressionA fix would likely bound the zstd window log (or the effective level) for the
SmallestSizemapping on 32-bit processes, or otherwise make level 20-22 degrade gracefully under a constrained address space.