KamoCRM

The restart could land mid-initramfs and leave a computer unbootable

FixKlusterServices
Expediere
24 septembrie 2026 la 01:43 UTC
Autor
Kamo
Comite
45d5dd3

A brand new computer provisioned, came up, reported AWAKE, and ninety seconds later panicked: Kernel panic - not syncing: No working init found. I caused that. _ensure_resume writes the grub fragment, runs update-grub, and only THEN runs update-initramfs -u. resume_restart_decision is satisfied the moment update-grub finishes — it checks grub.cfg — so a watcher tick landing in that window rebooted the machine while the initramfs was still being written. A truncated initrd cannot mount root, the kernel cannot exec init, and the computer is unbootable with nothing in it able to say why. The window was opened by moving the restart into IdleWatcher.tick(), which does not hold the lock that configure() takes. So restart_for_resume now takes that same lock before it decides anything. Non-blocking, deliberately: configure() holds the lock for minutes while it writes a RAM-sized swap file to a network volume, and the idle watcher has to keep polling through that rather than stall behind it. A skipped tick costs thirty seconds and the refusal says exactly why. The regression test holds the lock and asserts that no reboot is issued, then releases it and asserts the next attempt proceeds.

Toate modificările

Ca ceea ce vezi de transport maritim?

Toate acestea ajung în spațiul de lucru pe cont propriu. Începeți cu planul gratuit și citiți această pagină din nou într-o lună.

Pornește gratuit pentru totdeaunaVezi prețurile