Same failure here on unmodified Ubuntu 24.04 packages, with a much
higher hit rate when fsck has to replay the journal.

Setup: Ubuntu 24.04 minimal cloud images (arm64, build serials 20260626,
20260716 and 20261001) as krunkit/libkrun VMs on macOS, virtio-blk
(/sys/block/vda/queue/rotational is 1), with a separate /boot mounted by
label:

  LABEL=BOOT  /boot      ext4  defaults    0 2

Versions: systemd/udev 255.4-1ubuntu8.17, util-linux/libblkid
2.39.3-9ubuntu6.6, kernel 6.8.0-142 and 6.8.0-146.

After an unclean stop of the VM with /boot mounted (VMM process killed
or host power cut), systemd-fsck replays /boot's journal on the next
boot. In 4 of 8 such boots /boot was not mounted:

  systemd[1]: Found device dev-disk-by\x2dlabel-BOOT.device - 
/dev/disk/by-label/BOOT.
  systemd[1]: Starting systemd-fsck@dev-disk-by\x2dlabel-BOOT.service - File 
System Check on /dev/disk/by-label/BOOT...
  systemd-fsck[383]: BOOT: recovering journal
  systemd-fsck[383]: BOOT: clean, 264/59136 files, 33380/236288 blocks
  systemd[1]: systemd-fsck@dev-disk-by\x2dlabel-BOOT.service: Deactivated 
successfully.
  systemd[1]: Stopped systemd-fsck@dev-disk-by\x2dlabel-BOOT.service - File 
System Check on /dev/disk/by-label/BOOT.

In three of the four the fsck unit is stopped without logging
"Finished"; in the fourth it logs "Finished" and is stopped 3 ms later.
In the four good boots it logs "Finished" and boot.mount follows.

After a failing boot, "udevadm info /dev/vda16" shows no ID_FS_* and no
ID_PART_ENTRY_* properties, and DEVLINKS has only the by-path, by-
diskseq and by-id links, while "blkid /dev/vda16" reports LABEL="BOOT"
TYPE="ext4". "udevadm trigger --action=change /dev/vda16" restores the
properties and links, and boot.mount then starts. Unlike the trace in
the description, the by-partuuid link is gone as well.

The disk is rotational and /run/fsck/vda.lock exists, so fsck takes its
lock on that file rather than on /dev/vda: the case in the description,
not the non-rotational variant. We did not capture a udev debug trace.

Consequences on these images: unattended-upgrades.service
(Requires=boot.mount) does not run, and grub-initrd-fallback.service is
skipped (ConditionPathExists=/boot/grub/grub.cfg), so grub's initrdfail
flag stays set and a later boot takes the initrd fallback entry. With
tiny-initramfs installed that entry panics; filed as LP: #2169897.

The investigation and this comment were prepared with an AI assistant
(Claude), which also posted it through the Launchpad API under my
account. I reviewed the text and the logs it is based on.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2160558

Title:
  udevd and fsck contend causing the prior to miss fs uuids

To manage notifications about this bug go to:
https://bugs.launchpad.net/systemd/+bug/2160558/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to