Skip to content

xtask: Drain vendor tar stream to avoid zstd SIGPIPE - #2595

Merged
jeckersb merged 1 commit into
bootc-dev:mainfrom
jeckersb:xtask-sigpipe
Oct 28, 2026
Merged

jeckersb merged 1 commit into
bootc-dev:mainfrom
jeckersb:xtask-sigpipe

Conversation

@jeckersb

Copy link
Copy Markdown
Collaborator

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

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>
Copilot AI balanced review requested due to automatic review settings October 27, 2026 20:21
@bootc-bot
bootc-bot Bot requested a review from henrywang October 27, 2026 20:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@jeckersb
jeckersb enabled auto-merge (rebase) October 27, 2026 20:27
@jeckersb
jeckersb merged commit 0c47e8d into bootc-dev:main Oct 28, 2026
55 checks passed
@jeckersb jeckersb mentioned this pull request Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants