Repository navigation
xtask: Drain vendor tar stream to avoid zstd SIGPIPE - #2595
Merged
Merged
Conversation
The tar crate stops reading when it reaches the end-of-archive marker, before the zero padding that follows it. The pipe was then closed while zstd was still writing that padding, so zstd was killed by SIGPIPE and `cargo xtask package` failed. Read the rest of the stream before returning. Assisted-by: AI Signed-off-by: John Eckersberg <dev@eckersberg.com>
There was a problem hiding this comment.
🟢 Approval recommended
The localized fix addresses premature pipe closure without changing denylist validation, and no blocking issues were identified.
No open issues 🎉
What changed in this PR
This PR fixes cargo xtask package failures caused by closing the vendor tar stream while zstd is still writing trailing padding.
Changes:
- Retains the tar archive so its underlying reader remains accessible after entry validation.
- Drains the remaining stream before returning, preserving denylist checks and propagating read errors.
| File | Description |
|---|---|
crates/xtask/src/xtask.rs |
Drains trailing tar data to prevent premature pipe closure and zstd SIGPIPE. |
Review effort: Balanced
ckyrouac
approved these changes
Oct 27, 2026
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.
The tar crate stops reading when it reaches the end-of-archive marker,
before the zero padding that follows it. The pipe was then closed while
zstd was still writing that padding, so zstd was killed by SIGPIPE and
cargo xtask packagefailed. Read the rest of the stream beforereturning.
Assisted-by: AI
Signed-off-by: John Eckersberg dev@eckersberg.com