Repository navigation
fix(minvmd): raise RLIMIT_NOFILE in the VMM child before boot - #1740
Conversation
Bursts of `min session exec` open one vsock connection per exec, and libkrun holds each closed connection ~5 s before freeing it. The VMM child inherits the parent's default 256-fd soft limit, so a burst exhausts it and every exec fails for those 5 s. Raise the soft and hard RLIMIT_NOFILE to 64 Ki at the start of the VMM child, before any fd-heavy work, mirroring the helper minimald's guest pid-1 already uses. Best-effort: a VM that boots with the default limit beats one that does not boot.
|
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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. 3 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 VMM child now attempts to raise its ChangesVMM file descriptor limit
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to No identified issue prevents merging after normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit checks the limit high, Comment |
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABTSyXSw
Defect
Bursts of
min session execopen one vsock connection per exec, and libkrun holds each closed connection ~5 s before freeing it. The VMM child inherits the parent's default 256-fd soft limit, so a burst exhausts it and every exec fails for those 5 s.Change
Raise the soft and hard
RLIMIT_NOFILEto 64 Ki at the start of the VMM child (run_vmm), before any fd-heavy work, mirroring the helper minimald's guest pid-1 already uses. Best-effort: a VM that boots with the default limit beats one that does not boot.Verification
cargo fmt --all --check— cleancargo clippy -p minvmd --locked -- -D warnings— cleancargo build --workspace --locked— cleancargo test -p minvmd --locked— cleanSummary by CodeRabbit