Repository navigation
fix(vmm): run each start to completion even if its request is dropped - #1617
Merged
Merged
Conversation
kvinwang
enabled auto-merge
November 18, 2026 11:44
kvinwang
added a commit
that referenced
this pull request
Nov 18, 2026
Model #1616 (load_vm and load_or_update_vm auto-starts recheck started under the launch lock) and #1617 (a start runs in its own task, so a dropped caller no longer releases the lock mid-launch) as Config switches that the fixed code has on. stop_sticks and at_most_one_running now hold for the fixed code without extra assumptions; the old traces replay the bugs with the switches off. Signed-off-by: Kevin Wang <wy721@qq.com>
A start holds the per-VM launch lock across the supervisor deploy. If the request future is dropped while that deploy is in flight, the lock goes with it while the deploy still lands. The next start then reads "not running", and the supervisor's own check lets its deploy through too: two QEMUs, one of them untracked, and the second launch's interface sweep can delete what the first one is using. Rocket serves HTTP/1 with half-close allowed, so hyper does not watch for a disconnect there, but an HTTP/2 client (h2c is accepted on the plain listener) that resets its stream or closes the connection drops the handler future. The start now runs in its own task and the caller awaits it, so dropping the caller no longer cancels a launch. Removal already runs in a spawned task; a dropped stop leaves at most a stop half done, not a second QEMU. Signed-off-by: Kevin Wang <wy721@qq.com>
kvinwang
force-pushed
the
vmm-start-survives-cancel
branch
from
November 18, 2026 11:55
457ce8c to
fa96582
Compare
Signed-off-by: Kevin Wang <wy721@qq.com>
The launch creates hda.img with qemu-img, which CI runners lack. Signed-off-by: Kevin Wang <wy721@qq.com>
kvinwang
added a commit
that referenced
this pull request
Nov 18, 2026
Model #1616 (load_vm and load_or_update_vm auto-starts recheck started under the launch lock) and #1617 (a start runs in its own task, so a dropped caller no longer releases the lock mid-launch) as Config switches that the fixed code has on. stop_sticks and at_most_one_running now hold for the fixed code without extra assumptions; the old traces replay the bugs with the switches off. Signed-off-by: Kevin Wang <wy721@qq.com>
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.
A start holds the per-VM launch lock across the supervisor deploy. If the
request future is dropped while that deploy is in flight, the lock goes
with it while the deploy still lands. The next start then reads "not
running", and the supervisor's own check lets its deploy through too: two
QEMUs, one of them untracked, and the second launch's interface sweep can
delete what the first one is using.
Rocket serves HTTP/1 with half-close allowed, so hyper does not watch for
a disconnect there, but an HTTP/2 client (h2c is accepted on the plain
listener) that resets its stream or closes the connection drops the
handler future. The start now runs in its own task and the caller awaits
it, so dropping the caller no longer cancels a launch. Removal already
runs in a spawned task; a dropped stop leaves at most a stop half done,
not a second QEMU.
Signed-off-by: Kevin Wang wy721@qq.com