Repository navigation
boot: a contended checkpoint loop, how a qemu bump is checked for #421 - #436
Merged
Merged
Conversation
#424 made Checkpoint wait for QEMU to leave finish-migrate, and only a fake QEMU held it in the tree: an idle host does not reach the window between MIGRATION{completed} and the move to postmigrate, so boot:record's single checkpoint passes with the fix and without it. boot:finish-migrate is #421's scratch loop: spin's shape plugged to 2 GiB with a writer in the guest, 300 checkpoints each continued at once, any refusal a failure, with the test and QEMU under taskset on the host's last two CPUs and a spin loop on each. On the laptop, with finished() made to return at once, 39 of 300 continues were refused, and none with it. QEMU alone on the busy CPUs, the test free, refused none without the fix, so the test runs there too. It is not in CI. The qemu entry's note names it beside boot:record and boot:compat, so a QEMU that reorders migration_completion_end and migration_iteration_finish is caught at the bump. Closes #425 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Why
Before the next release, a checkpoint has to keep working on a runner whose CPUs other workspaces are using. #424 fixed the case where a
Continueright afterCheckpointwas refused while QEMU was still infinish-migrate. Only a fake QEMU held that fix in the tree. An idle host never reaches the window, soboot:recordpasses with the fix and without it. A QEMU bump that reordersmigration_completion_endandmigration_iteration_finishwould go unseen (#425).What
boot:finish-migrate(boot/finish_test.go) is Continue right after Checkpoint can fail: QEMU says completed before it leaves finish-migrate #421's scratch loop. It boots spin's shape plugged to 2 GiB, with a guest rewriting 600 MiB of tmpfs. It runs 300 checkpoints and continues each one at once. Any refusal fails the test.taskseton the host's last two CPUs. The test keeps every CPU it is given busy with a spin loop. It refuses to run on more than four CPUs, so it never hogs a whole host.versions.yamlnames it next toboot:recordandboot:compat, so the check runs when QEMU is bumped.docs/cli.md,lab check's help anddocs/log.mdname the new check.Evidence
Laptop, real KVM, v20261121.01 with this checkout's spin-machine, 300 checkpoints per arm:
finished()made to return at once (no #424 fix)go tool task boot:finish-migrateThe last row is why the test runs on the busy CPUs too.
go tool task lint test mutatepasses (coverage 80.6%, nothing to mutate).Closes #425
🤖 Generated with Claude Code