-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(vmm/persist): do not close uffd socket #5122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5122 +/- ##
=======================================
Coverage 83.08% 83.09%
=======================================
Files 250 250
Lines 26918 26920 +2
=======================================
+ Hits 22366 22368 +2
Misses 4552 4552
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
We prevent Rust from closing the socket file descriptor to avoid a potential race condition between the mappings message and the connection shutdown. If the latter arrives at the UFFD handler first, the handler never sees the mappings. Signed-off-by: Nikita Kalyazin <[email protected]>
bchalios
reviewed
Mar 28, 2025
bchalios
approved these changes
Mar 31, 2025
roypat
approved these changes
Mar 31, 2025
xmarcalx
approved these changes
Mar 31, 2025
maggie-lou
added a commit
to buildbuddy-io/buildbuddy
that referenced
this pull request
Oct 30, 2025
Also includes this patch: firecracker-microvm/firecracker#5494 I'm interested in these bug fixes since v1.11.0 (which we were on previously): firecracker-microvm/firecracker#5122 firecracker-microvm/firecracker#5260 We should also look into enabling PCI. From their release notes: > In our micro-benchmarks, we measured up to 50% better latency for block and network, up to 70% better block throughput, and up to 25% higher network throughput (results depend on instance type and kernel). Also I had previously cherry-picked a firecracker patch that fixed some of the rcu_sched failures. It was formally merged into the firecracker repo [here](firecracker-microvm/firecracker#5494) and this final version has some implementation differences from the patch we'd applied. I can't directly apply the updated patch on v1.11.0 due to some merge conflicts, but it applies cleanly on top of v1.13.0
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.
Changes
Do not close the UFFD UDS socket.
Reason
We prevent Rust from closing the socket file descriptor to avoid a potential race condition between the mappings message and the connection shutdown. If the latter arrives at the UFFD handler first, the handler never sees the mappings. No meaningful test is possible due to the rare nature of the issue.
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.PR Checklist
tools/devtool checkstyleto verify that the PR passes theautomated style checks.
how they are solving the problem in a clear and encompassing way.
[ ] I have updated any relevant documentation (both in code and in the docs)in the PR.
CHANGELOG.md.[ ] If a specific issue led to this PR, this PR closes the issue.[ ] When making API changes, I have followed theRunbook for Firecracker API changes.
integration tests.
[ ] I have linked an issue to every newTODO.rust-vmm.