Skip to content

boot: a contended checkpoint loop, how a qemu bump is checked for #421 - #436

Merged
aledbf merged 1 commit into
mainfrom
boot-finish-migrate
Nov 21, 2026
Merged

aledbf merged 1 commit into
mainfrom
boot-finish-migrate

Conversation

@aledbf

@aledbf aledbf commented Nov 21, 2026

Copy link
Copy Markdown
Member

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 Continue right after Checkpoint was refused while QEMU was still in finish-migrate. Only a fake QEMU held that fix in the tree. An idle host never reaches the window, so boot:record passes with the fix and without it. A QEMU bump that reorders migration_completion_end and migration_iteration_finish would 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.
  • The target runs the test and QEMU under taskset on 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.
  • It is not in CI. The qemu entry's note in versions.yaml names it next to boot:record and boot:compat, so the check runs when QEMU is bumped.
  • docs/cli.md, lab check's help and docs/log.md name the new check.

Evidence

Laptop, real KVM, v20261121.01 with this checkout's spin-machine, 300 checkpoints per arm:

Arm Continues refused
finished() made to return at once (no #424 fix) 39 of 300
as shipped, through go tool task boot:finish-migrate 0 of 300
no fix, QEMU alone on the busy CPUs and the test free 0 of 300

The last row is why the test runs on the busy CPUs too.

go tool task lint test mutate passes (coverage 80.6%, nothing to mutate).

Closes #425

🤖 Generated with Claude Code

#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>
@aledbf
aledbf merged commit 515dd62 into main Nov 21, 2026
6 checks passed
@aledbf
aledbf deleted the boot-finish-migrate branch November 21, 2026 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

boot: no in-tree check on real QEMU reaches the finish-migrate window of #421

1 participant