Repository navigation
fix: tolerate the macOS lost-race write error in the control-cap test - #2875
Merged
norrietaylor merged 1 commit intoNov 4, 2026
Merged
norrietaylor merged 1 commit into
norrietaylor merged 1 commit into
Conversation
Past the control door's connection cap the accept loop closes a connection without reading it, so a client's write can lose the race to that close. The test asserted the lost write always surfaces as a broken pipe, but on macOS the same lost race fails with ENOTCONN instead, so a correctly-refused connection failed the test. Accept NotConnected beside BrokenPipe for the lost-race write, and name both platform outcomes in the race comment. The door's refusal logic is unchanged.
Contributor
norrietaylor
enabled auto-merge
November 4, 2026 15:40
norrietaylor
approved these changes
Nov 4, 2026
norrietaylor
added this pull request to the merge queue
Nov 4, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 4, 2026
norrietaylor
added this pull request to the merge queue
Nov 4, 2026
norrietaylor
deleted the
inbox-patch/control-cap-lost-race-error-kinds-e30df7522245e595
branch
November 4, 2026 21:09
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.
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABcQ_m_Q
Past the control door's connection cap,
accept_loopwrites the refusaland closes the connection without reading the request line. A client
that writes anyway can lose the race to that close. The
control_connections_refused_past_the_captest asserted the lost writealways fails with
ErrorKind::BrokenPipe, which is what Linux reports(EPIPE). On macOS the same lost race fails with ENOTCONN
(
ErrorKind::NotConnected), so a correctly-refused connection failedthe test. The unit suite on the macOS lane intermittently showed this.
Accept
NotConnectedbesideBrokenPipein the lost-race assertion,and name both platform outcomes in the race comment.
ConnectionResetis not added: it is a TCP errno, not a unix-domain-socket write error,
so it cannot surface on this path. The door's refusal logic is
unchanged.
Verification
cargo fmt --all --check --manifest-path target/Cargo.toml — clean
cargo clippy --workspace --all-targets --locked --manifest-path target/Cargo.toml -- -D warnings — clean, finished in 1m 49s
cargo test --locked --manifest-path target/Cargo.toml -p minvmd control:: — 66 passed; 0 failed (includes control_connections_refused_past_the_cap)
cargo test --locked --manifest-path target/Cargo.toml -p minvmd — 661 passed; 0 failed, with 4 failures reproduced identically on unmodified main (sandbox-environment path/mode and tracer issues, unrelated files)
live-session: macos e2e (ci-macos.yml) — crates/minvmd/** matches the lane's on patterns, so the lane runs on this PR; the macOS-only write-race errno itself is not reproducible on this Linux runner and is exercised by the unit test on the macOS unit lane
Summary by CodeRabbit