Still reproducible on 24.04 -> 26.04 (do-release-upgrade, 2026-10-24), ZFS root
(bpool/rpool, non-zsys),
~1100 sanoid snapshots on rpool/ROOT/<dataset>.
During `dpkg --configure --pending`, kdump-tools.postinst -> grub-mkconfig ->
/etc/grub.d/10_linux_zfs
mounts snapshots via /.zfs/snapshot/<snap>. At that point:
uname -r 6.8.0-147-generic (24.04 kernel, still running)
/sys/module/zfs/version 2.2.2-0ubuntu9.5
zfs version (userland) zfs-2.4.1-1ubuntu5.1
grub-common 2.14-2ubuntu2.1
Result: 1844 `mount.zfs rpool/ROOT/...@autosnap_..._monthly` processes in D
state (all the same snapshot,
same start time), load average ~1849, the upgrade blocked indefinitely. The
D-state mounts cannot be killed;
only a reboot clears them. Services kept running.
The hang only happens while userland and kernel module versions differ, which
is exactly the
window during a release upgrade. Suggested fix (patch attached, tested on the
affected machine):
10_linux_zfs compares `zfs version` with /sys/module/zfs/version and, if they
differ, skips the
snapshot ("Revert system") entries with a warning, still generating the entry
for the root dataset
itself, so the system remains bootable. After the reboot into the new kernel
the versions match and the
next update-grub restores the snapshot entries.
Tested output with the patch while the mismatch was present:
Warning: zfs userland 2.4.1 != kernel module 2.2.2: not scanning snapshots
(reboot and run update-grub again)
Found linux image: vmlinuz-7.0.0-38-generic in rpool/ROOT/ubuntu_i87dfh
Found linux image: vmlinuz-6.8.0-147-generic in rpool/ROOT/ubuntu_i87dfh
Found initrd image: initrd.img-6.8.0-147-generic in rpool/ROOT/ubuntu_i87dfh
No new mount.zfs processes were created and the script finished
normally.
This is less drastic than blocking release upgrades on every machine with a
zpool, and narrower than the
workaround in openzfs/zfs#17337 (which skips snapshots unconditionally and has
to be reverted by hand).
The upstream fix (openzfs/zfs#18847, kernel-side snapshot automount) lives in
the kernel module, so it cannot help
while the *old* module is still loaded during the upgrade - the upgrade window
still needs to be handled here.
Limitation: comment #3 reports the hang without any snapshots; this patch does
not address that case
(here the mount of the root dataset itself worked fine under the mismatch).
Related: openzfs/zfs#17190, openzfs/zfs#17252, openzfs/zfs#17337,
openzfs/zfs#18847.
** Patch added: "10_linux_zfs-skip-snapshots-on-kmod-mismatch.patch"
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2110891/+attachment/6012200/+files/10_linux_zfs-skip-snapshots-on-kmod-mismatch.patch
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2110891
Title:
System freeze on release upgrade 24.10 oracular to 25.04 plucky with
root fs on ZFS
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2110891/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs