Fix cDAC x-plat dump tests: pre-zip payloads and exclude osx legs#127871
Open
max-charlamb wants to merge 2 commits intodotnet:mainfrom
Open
Fix cDAC x-plat dump tests: pre-zip payloads and exclude osx legs#127871max-charlamb wants to merge 2 commits intodotnet:mainfrom
max-charlamb wants to merge 2 commits intodotnet:mainfrom
Conversation
The Helix SDK's <PayloadDirectory> code path (DirectoryPayload.UploadAsync)
zips the directory into a MemoryStream before upload. MemoryStream's backing
array is capped at int.MaxValue (~2 GiB), so per-platform dump payloads that
approach that size fail in CdacXPlatDumpTest with:
System.IO.IOException: Stream was too long.
at System.IO.MemoryStream.set_Capacity(Int32 value)
Switch the cDAC xplat dump tests to pre-zip each per-platform dump directory
with the MSBuild ZipDirectory task and ship the resulting .zip via
<PayloadArchive>. ArchivePayload uses File.OpenRead and streams directly to
blob storage, with no in-memory buffering. CompressionLevel=Fastest keeps
the local zip step cheap; dumps don't compress meaningfully anyway.
This follows the same pattern already used in
src/tests/Common/helixpublishwitharcade.proj.
Fixes dotnet#127859
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the cDAC x-plat dump Helix submission project to avoid intermittent Helix SDK failures caused by the SDK’s <PayloadDirectory> path building a ZIP in a MemoryStream (which is capped at ~2 GiB). It pre-creates per-platform ZIPs on disk and ships them via <PayloadArchive> so upload can stream from a FileStream.
Changes:
- Pre-zip each per-platform dump directory using MSBuild’s
ZipDirectorytask. - Switch Helix work items from
<PayloadDirectory>to<PayloadArchive>pointing at the prebuilt ZIP. - Update inline documentation to explain the rationale and the 2 GiB cap being avoided.
steveisok
approved these changes
May 6, 2026
The x-plat CdacXPlatDumpTests stage downloads every source platform's dump artifacts onto each host, then runs one work item per source platform. The osx_arm64 / osx_x64 dump payloads are large enough that the combined working set exceeds Helix host disk space and the affected work items abort with exit code -3 (Crash). Add a separate cdacXPlatDumpPlatforms parameter that omits osx and use it for the three x-plat stages (CdacXPlatDumpGen platforms, CdacXPlatDumpTests platforms, the artifact-download/extract loops, and the SourcePlatforms env var). Single-leg mode keeps the original cdacDumpPlatforms list, so osx coverage is unaffected there. osx coverage for the x-plat flow is left as a TODO referencing dotnet#127859 - re-enable once the dump set shrinks or the Helix queues provide more disk. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR was authored with assistance from GitHub Copilot.
Problem
The cDAC x-plat dump tests ( + "" + CdacXPlatDumpTest + "" + stages) hit two distinct failure modes when running with + "" + cdacDumpTestMode=xplat + "" + :
Helix SDK 2 GB + "" + MemoryStream + "" + cap. + "" + + "" + ( + "" + DirectoryPayload.UploadAsync + "" + ) zips the source directory into a + "" + MemoryStream + "" + before uploading. + "" + MemoryStream + "" + 's backing array is capped at + "" + int.MaxValue + "" + (~2 GiB), so per-platform dump payloads that approach that size fail with + "" + IOException: Stream was too long + "" + .
Helix host disk pressure on osx source dumps. Even with the SDK cap removed, x-plat tests download every source platform's dump artifacts onto each host. The + "" + osx_arm64 + "" + / + "" + osx_x64 + "" + payloads are large enough that the combined working set exceeds available disk and the affected work items abort with exit code -3 ( + "" + Crash + "" + ).
Fixes #127859.
Fix
1. Pre-zip per-platform dumps with ZipDirectory + + "" + + "" + . + "" + ZipDirectory + "" + calls + "" + ZipFile.CreateFromDirectory + "" + , which writes the archive directly to a + "" + FileStream + "" + -- no 2 GiB cap. The Helix SDK's + "" + ArchivePayload + "" + (selected by + "" + + "" + ) uses + "" + File.OpenRead + "" + and streams the existing zip to blob storage without any in-memory buffering. + "" + CompressionLevel="Fastest" + "" + keeps the local zip step cheap; dump files don't compress meaningfully anyway.
This is the same pattern already used in + "" + src/tests/Common/helixpublishwitharcade.proj + "" + .
2. Drop osx from the x-plat dump set (TODO). Adds a separate + "" + cdacXPlatDumpPlatforms + "" + parameter to + "" + �ng/pipelines/runtime-diagnostics.yml + "" + that excludes + "" + osx_arm64 + "" + / + "" + osx_x64 + "" + , used by the three x-plat stages ( + "" + CdacXPlatDumpGen + "" + , + "" + CdacXPlatDumpTests + "" + host platforms + artifact downloads, and the + "" + SourcePlatforms + "" + env var). Single-leg mode ( + "" + cdacDumpTestMode=single-leg + "" + ) still uses the full + "" + cdacDumpPlatforms + "" + list, so osx coverage there is preserved. Re-enable osx in the x-plat flow once the dump set shrinks or the Helix queues provide more disk.
Validation
untime-diagnostics + "" + with + "" + cdacDumpTestMode=xplat + "" + against this PR.