Repository navigation
sidecar_client: panic on unexpected completion read errors - #5241
Open
Sunil Muthuswamy (sunilmut) wants to merge 2 commits into
Open
Sunil Muthuswamy (sunilmut) wants to merge 2 commits into
Sunil Muthuswamy (sunilmut) wants to merge 2 commits into
Conversation
|
This PR modifies files containing For more on why we check whole files, instead of just diffs, check out the Rustonomicon |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the change that makes unexpected sidecar read errors fatal.
No open issues 🎉
What changed in this PR
This PR makes unexpected sidecar completion read errors fatal, preventing the reader from silently exiting and leaving running virtual processors waiting indefinitely.
Changes:
- Panic on read errors other than “would block” and remove the post-loop error log.
- Add a regression test using an eventfd to trigger a read error and verify the panic.
- Add the Linux-only test tracing dependency.
| File | Description |
|---|---|
openhcl/sidecar_client/src/lib.rs |
Makes unexpected read errors fatal and adds a regression test. |
openhcl/sidecar_client/Cargo.toml |
Adds test_with_tracing as a Linux-only development dependency. |
Cargo.lock |
Records the new sidecar client test dependency. |
Review effort: Balanced
John Starks (jstarks)
approved these changes
Nov 25, 2026
The completion reader is the only source of VP completions. On a read error other than "would block" it logged and exited, leaving every running VP on that node waiting forever. The current sidecar driver cannot return such an error, so treat one as a broken invariant and panic, matching the reader's other checks, instead of hanging silently. Test changes: - Add the crate's first unit test. - Verify a read error (eventfd rejecting a 4-byte read) panics the reader instead of leaving a running VP waiting.
Sunil Muthuswamy (sunilmut)
force-pushed
the
user/sunilmut/sidecar-reader-error-repro
branch
from
November 26, 2026 22:03
31713b5 to
9e2315b
Compare
Member
Author
|
Hi John Starks (@jstarks), thanks for your earlier approval. We have now rebased this PR onto main. Could you please take another look at the rebased changes when you have a chance? Thanks! |
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 sidecar completion reader (
sidecar_wait_loop) is the only source of VPcompletions. On a read error other than "would block", it logged and exited,
leaving every running VP on that node waiting forever with no further
signal.
The current OHCL sidecar driver cannot return such an error:
sidecar_readfails only with
-EINVAL(buffer under 4 bytes),-EFAULT,-EAGAIN, or aninterrupted wait in blocking mode, and the client always reads 4 bytes into a
valid buffer from a device opened
O_NONBLOCK. This change treats anunexpected read error as a broken invariant and panics, matching the loop's
existing panics on impossible conditions, so a future driver change surfaces
as a crash dump rather than a silent hang. The now-unreachable post-loop log
is removed. OpenHCL builds use
panic = 'abort'.Test changes (the crate's first unit test):
sidecar_wait_loopwith a VP waiting, against an eventfdholding a pending value (pollable; a 4-byte read fails with
EINVAL), andrequires a panic. Before the change the reader logged
"sidecar wait failed: Invalid argument" and returned.