Repository navigation
underhill_crash: report failed crash dump transfers as errors - #5236
Merged
Sunil Muthuswamy (sunilmut) merged 2 commits intoNov 26, 2026
Merged
Sunil Muthuswamy (sunilmut) merged 2 commits into
Sunil Muthuswamy (sunilmut) merged 2 commits into
Conversation
send_dump discarded the results of its read and write tasks and always returned success, so a dump the host rejected, or one cut short by a closed channel, was reported as delivered. Propagate host write errors, channel failures, and streaming/completion errors so the crash reporter exits with a failure status. Make the protocol code generic over the VMBus ring type so it can be tested with in-memory pipes. Test changes: - Add the crate's first unit tests, using a fake host over test pipes. - Verify a host-reported write error fails the transfer. - Verify a closed channel fails the transfer. - Verify a successful transfer delivers every byte in order.
|
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.
🟡 Changes recommended
The failure tests cover only read-side errors, leaving writer-side streaming and completion error propagation to send_dump unverified and vulnerable to regressions.
1 open issue
What changed in this PR
This PR makes OpenHCL’s crash reporter propagate dump-transfer failures instead of reporting success when the host rejects a dump or the channel closes.
Changes:
- Returns the first completed task’s result, prioritizing read-side errors when both tasks are ready.
- Propagates streaming, completion, and receive errors.
- Generalizes ring-memory types and adds in-memory tests for successful delivery, host rejection, and channel closure.
| File | Description |
|---|---|
openhcl/underhill_crash/src/lib.rs |
Propagates transfer errors and adds in-memory transfer tests. |
openhcl/underhill_crash/Cargo.toml |
Adds ring-memory and test-tracing dependencies. |
Cargo.lock |
Records the added dependencies for underhill_crash. |
Review effort: Balanced
Keep the host channel open while an invalid outgoing ring consumer offset causes streaming and completion writes to fail independently. Assert that send_dump returns the matching writer error rather than relying on a competing read-side failure. Both tests reject swallowed writer errors.
John Starks (jstarks)
approved these changes
Nov 25, 2026
Sunil Muthuswamy (sunilmut)
merged commit Nov 26, 2026
2b2021d
into
microsoft:main
108 of 109 checks passed
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.

send_dumpraced its read and write tasks, discarded both results, and alwaysreturned
Ok(()). A dump the host rejected, or one cut short by a closedchannel, was therefore reported as delivered and the crash reporter exited
successfully. The existing comment already said a VSP error should make the
function error out.
This change:
error if both finish in the same poll.
to writes on failure).
To test against an in-memory VMBus pipe,
read_message,send_dump, andDumpStreamerare generic overRingMem; the real process still usesMappedRingMem.Test changes (the crate's first unit tests, with a fake host over
connected_message_pipes):Okbefore).Okbefore).