Skip to content

boot: the shut down subtest boots systemd sized as spin sizes it (#658) - #672

Merged
aledbf merged 1 commit into
mainfrom
fix/658
Nov 23, 2026
Merged

aledbf merged 1 commit into
mainfrom
fix/658

Conversation

@aledbf

@aledbf aledbf commented Nov 23, 2026

Copy link
Copy Markdown
Member

Why

boot:record decides whether a machine ends as spin's runner expects, so it has to boot the guest as spin boots it. Its shut_down subtest booted systemd in the 128 MiB base and never plugged memory. That left ~90 MiB to the guest (GuestMemory Total 90 in the same job). A guest left at that size runs its OOM killer through the boot, as docs/boot-time.md ("The memory") and labs 44784196287 and 44788801555 recorded. When the killer took systemd-logind, the power button went unhandled and QEMU did not end (#656's failure). Closes #658.

What

  • shell(t, r, true) plugs 2048 MiB through virtio-mem right after the machine is released. That is what spin does right after a workspace starts, and what the probes do (plugged=2048).
  • TestTheMachineSaysHowItEnded fails on any Out of memory in the guest's console. Before, only an OOM that also cost the shutdown failed it.
  • Nothing else boots systemd through shell.

Measured

This was a loop of the subtest alone, 40 boots per run, on the KVM fleet through compat.yml on a throwaway branch (exp/658-repro, not for merge).

boots guest OOM subtest failed
main (compat 45230275709) 40 28 29
this change (compat 45231206182) 40 0 0

For spin

Inferred, not measured here. spin's own window between start and plug is the same race, at 128 MiB. Booting with 2048 MiB at boot instead of plugging is already proposed in spin-stack/spin#1660 (#561). This PR does not change the machine.

🤖 Generated with Claude Code

TestTheMachineSaysHowItEnded/shut_down booted systemd in spin's 128 MiB
base and never plugged, ~90 MiB to the guest. A guest left there runs
its OOM killer through the boot (docs/boot-time.md, "The memory"): 28
of 40 boots did on the KVM fleet (compat 45230275709), and when it took
systemd-logind the power button went unhandled and QEMU did not end.
spin plugs 2048 MiB right after a workspace starts, as the probes do;
the subtest now does the same, and fails on any OOM in the guest's
console rather than only on the ones that cost the shutdown. With the
plug, 0 of 40 (compat 45231206182).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aledbf
aledbf merged commit 60bd35c into main Nov 23, 2026
14 checks passed
@aledbf
aledbf deleted the fix/658 branch November 23, 2026 17:55
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:record: shut_down subtest OOMs the guest's systemd now and then

1 participant