Repository navigation
fix(minvmd): replace raw-PID gvproxy signalling with pidfd - #555
Merged
Merged
Conversation
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.
[sdd-fastpath: tracking=550 tier=sonnet]
Fixes the independent-crash recycled-PID window in
GvproxySwitch(#550).What changed
Replaces raw-PID
kill(2)on all three teardown paths withpidfd_send_signal(2)vialibc::syscall(SYS_pidfd_send_signal, ...):GvproxySwitch::stop()GvproxySwitch::DropPtaskAttachment::Droppidfd_open(2)is called immediately after the child PID is extracted insupervise(), before the supervision task is spawned. TheArc<OwnedFd>is shared with everyPtaskAttachmentso all teardown paths use the same pidfd. A pidfd is bound to the exact process instance —pidfd_send_signalreturnsESRCHafter the process exits, never resolving to a recycled PID.signal_child(rawkill(2)) is retained under#[cfg(not(target_os = "linux"))]for macOS development builds.Proof artifacts
Test —
cargo test -p minvmd net::tests::pidfd_signal_to_reaped_child_returns_esrch:File —
grep -q 'pidfd' crates/minvmd/src/net.rs:Returns exit code 0 (
pidfdis present innet.rs).All 19 net tests (including existing teardown tests):
Merging this pull request advances the tracking issue from
sdd:in-progresstosdd:done; a human does the final close.Summary by CodeRabbit
Release Notes
Bug Fixes
Tests