Repository navigation
Fix macOS e2e unpack Broken pipe evicting queue entries - #1201
Merged
Mikola Lysenko (mikolalysenko) merged 1 commit intoOct 9, 2026
Merged
Conversation
The e2e legs unpacked their binaries with `zstd -d -c ... | tar -xf -` under pipefail. A tar that exits at the end-of-archive marker without draining stdin leaves zstd writing into a closed pipe; zstd then fails with "Broken pipe" and the leg goes red even though every file was extracted. That happened on macOS in merge_group run 37863817362 and evicted #1152 from the merge queue 10 minutes after #1179 introduced the archive. Decompress to a file and extract that instead, so no reader can close the pipe early. Add a test that feeds each consumer an archive with bytes after the end marker; it fails on the old pipe (GNU tar stops reading there too) and passes now. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNubt2ZznwzckQai6WxCLa
Collaborator
Author
|
bugbot run Generated by Claude Code |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit c4d96d7. Configure here.
Tanmay Singla (Tanmay182003)
approved these changes
Oct 9, 2026
Mikola Lysenko (mikolalysenko)
deleted the
ci-janitor/e2e-unpack-no-pipe
branch
October 9, 2026 02:12
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.
Problem
#1179 (merged 00:13 UTC) made every e2e leg unpack its binaries with
under
set -o pipefail. Ten minutes later the first merge_group run built on it went red. In run 37863817362,e2e-macos (macos-latest, e2e_vex_build, pdm:: --ignored, 2.29.2)failed in "Unpack the e2e binaries" with only:tar reported no error. The fail-fast watcher cancelled the run and the queue evicted #1152 (00:25:58). This step runs in every e2e, e2e-macos, e2e-full and cargo-vex leg (dozens per run), so it is a per-leg race on every queue entry.
Root cause
A tar that stops reading at the end-of-archive marker and exits without draining stdin leaves zstd writing the rest of the stream (block padding) into a closed pipe. zstd fails with EPIPE, and pipefail makes the step fail even though every file was already extracted. Whether it fires depends on timing: how much zstd still has to write when tar exits. Apple's libarchive-based tar does this. GNU tar does the same locally:
Fix
Both "Unpack the e2e binaries" sites (the
&e2e-stepsanchor, shared by e2e, e2e-macos and e2e-full, plus the&cargo-vex-stepsanchor) now decompress totarget/e2e-bin.tar, extract that file, and delete it. No pipe means no reader can close it early. The extra cost is one temporary write of the uncompressed bundle, which is deleted right away.Packing (
tar -cf - . | zstd ...) is unchanged: zstd reads its stdin to EOF, so that side has no early-close race.Proof
test_consumer_survives_a_tar_that_stops_at_the_end_markerinscripts/tests/test_ci_e2e_archive.pyruns each consumer's real commands (pulled from ci.yml) against an archive with bytes after the end marker. It fails on origin/main's ci.yml and passes with this change.python3 -B -m unittest discover -s scripts/tests: 281 tests OK.Where tests run
Nothing is removed or moved. All legs run where they did before. Required checks (
ci-ok,clippy) are unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_01QNubt2ZznwzckQai6WxCLa
Generated by Claude Code