Repository navigation
fix(minvmd): reap VMM child when MarkRunning fails - #1841
norrietaylor merged 1 commit into
Conversation
The supervisor spawns the VMM child, then in Phase 2 takes the lifecycle lock and transitions Starting -> Running. If that transition or the subsequent write_state fails, the supervisor returned via `?` without killing or reaping child_pid, leaving an orphaned __krun-vmm process. Wrap the Phase 2 block in a closure and, on error, kill and wait the child before returning, matching the existing boot_result and spawn-race cleanup paths. The StartingGuard still resets state to Stopped on drop. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthroughThe supervisor now handles failures during the transition from ChangesVMM startup cleanup
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The startup cleanup change is mergeable after normal checks; no actionable merge-blocking issue was established. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit watches startup begin Comment |
There was a problem hiding this comment.
Defect validated against main (run.rs Phase 2 ? paths leak the VMM child); independent review approved; all lanes green.
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABUt9rQw
The supervisor spawns the
__krun-vmmchild, then in Phase 2 takes thelifecycle lock and transitions Starting → Running. If that transition or the
subsequent
write_statefails, the supervisor returned via?withoutkilling or reaping
child_pid, leaving an orphaned VMM process.Wrap the Phase 2 block in a closure and, on error, kill and wait the child
before returning — matching the existing
boot_resultand spawn-race cleanuppaths. The
StartingGuardstill resets state to Stopped on drop.Verification
cargo fmt --all --check— cleancargo build -p minvmd --locked— cleancargo test -p minvmd --locked— 5 passed, 0 failedcargo clippy -p minvmd --locked -- -D warnings— clean for minvmd(workspace-wide clippy fails on pre-existing
args/remote-protolintsunder the Rust 1.99 toolchain, unrelated to this change)
Summary by CodeRabbit