KamoCRM

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

FixKlusterServices
出荷済み
2026年9月24日 1:43 UTC
プロフィール
Kamo
コンテンツ
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.

すべての変更

配送を見るのが好きですか?

自分のワークスペースに到着します。 無料プランをスタートし、月に再度このページをお読みください.

永遠に無料で始める料金を見る