livecd-rootfs uses losetup -P for theoretically reliable/synchronous partition setup but it's not reliable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Jammy |
New
|
Undecided
|
Unassigned | ||
Mantic |
Won't Fix
|
Undecided
|
Unassigned | ||
Noble |
New
|
Undecided
|
Unassigned | ||
livecd-rootfs (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Mantic |
Won't Fix
|
Undecided
|
Unassigned | ||
Noble |
Fix Released
|
Undecided
|
Unassigned | ||
util-linux (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Jammy |
New
|
Undecided
|
Unassigned | ||
Mantic |
Won't Fix
|
Undecided
|
Unassigned | ||
Noble |
New
|
Undecided
|
Unassigned |
Bug Description
[impact]
In mantic, we migrated livecd-rootfs to use losetup -P instead of kpartx, with the expectation that this would give us a reliable, race-free way of loop-mounting partitions from a disk image during image build.
In noble, we are finding that it is no longer reliable, and in fact fails rather often.
It is most noticeable with riscv64 builds, which is the architecture where we most frequently ran into problems before with kpartx. The first riscv64+generic build in noble where the expected loop partition device is not available is
https:/
The failure is however not unique to riscv64, and the autopkgtest for the latest version of livecd-rootfs (24.04.7) - an update that specifically tries to add more debugging code for this scenario - has also failed on ppc64el.
https:/
The first failure happened on November 16. While there has been an update to the util-linux package in noble, this did not land until November 23.
The losetup usage has been backported to Jammy, and sees frequent failures there.
[test case]
The autopkgtests will provide enough confidence that the changes are not completely broken. Whether the change helps with the races on riscv can be "tested in prod" just as well as any other way.
[regression potential]
If the backport has been done incorrectly, image builds can fail (and the autopkgtests will fail if it has been completely bungled). This can be quickly handled. There is no foreseeable way for this to result in successful builds but broken images, which would be a much more difficult failure mode to unpick.
Related branches
- Canonical Foundations Team: Pending requested
-
Diff: 1974 lines (+1042/-17) (has conflicts)76 files modifieddebian/changelog (+314/-3)
debian/control (+3/-0)
live-build/apparmor/5.19/capability (+1/-0)
live-build/apparmor/5.19/caps/mask (+1/-0)
live-build/apparmor/5.19/dbus/mask (+1/-0)
live-build/apparmor/5.19/domain/attach_conditions/xattr (+1/-0)
live-build/apparmor/5.19/domain/change_hat (+1/-0)
live-build/apparmor/5.19/domain/change_hatv (+1/-0)
live-build/apparmor/5.19/domain/change_onexec (+1/-0)
live-build/apparmor/5.19/domain/change_profile (+1/-0)
live-build/apparmor/5.19/domain/computed_longest_left (+1/-0)
live-build/apparmor/5.19/domain/fix_binfmt_elf_mmap (+1/-0)
live-build/apparmor/5.19/domain/post_nnp_subset (+1/-0)
live-build/apparmor/5.19/domain/stack (+1/-0)
live-build/apparmor/5.19/domain/version (+1/-0)
live-build/apparmor/5.19/file/mask (+1/-0)
live-build/apparmor/5.19/ipc/posix_mqueue (+1/-0)
live-build/apparmor/5.19/mount/mask (+1/-0)
live-build/apparmor/5.19/namespaces/pivot_root (+1/-0)
live-build/apparmor/5.19/namespaces/profile (+1/-0)
live-build/apparmor/5.19/network/af_mask (+1/-0)
live-build/apparmor/5.19/network/af_unix (+1/-0)
live-build/apparmor/5.19/network_v8/af_mask (+1/-0)
live-build/apparmor/5.19/policy/set_load (+1/-0)
live-build/apparmor/5.19/policy/versions/v5 (+1/-0)
live-build/apparmor/5.19/policy/versions/v6 (+1/-0)
live-build/apparmor/5.19/policy/versions/v7 (+1/-0)
live-build/apparmor/5.19/policy/versions/v8 (+1/-0)
live-build/apparmor/5.19/ptrace/mask (+1/-0)
live-build/apparmor/5.19/query/label/data (+1/-0)
live-build/apparmor/5.19/query/label/multi_transaction (+1/-0)
live-build/apparmor/5.19/query/label/perms (+1/-0)
live-build/apparmor/5.19/rlimit/mask (+1/-0)
live-build/apparmor/5.19/signal/mask (+1/-0)
live-build/apparmor/6.2/capability (+1/-0)
live-build/apparmor/6.2/caps/mask (+1/-0)
live-build/apparmor/6.2/dbus/mask (+1/-0)
live-build/apparmor/6.2/domain/attach_conditions/xattr (+1/-0)
live-build/apparmor/6.2/domain/change_hat (+1/-0)
live-build/apparmor/6.2/domain/change_hatv (+1/-0)
live-build/apparmor/6.2/domain/change_onexec (+1/-0)
live-build/apparmor/6.2/domain/change_profile (+1/-0)
live-build/apparmor/6.2/domain/computed_longest_left (+1/-0)
live-build/apparmor/6.2/domain/fix_binfmt_elf_mmap (+1/-0)
live-build/apparmor/6.2/domain/post_nnp_subset (+1/-0)
live-build/apparmor/6.2/domain/stack (+1/-0)
live-build/apparmor/6.2/domain/version (+1/-0)
live-build/apparmor/6.2/file/mask (+1/-0)
live-build/apparmor/6.2/ipc/posix_mqueue (+1/-0)
live-build/apparmor/6.2/mount/mask (+1/-0)
live-build/apparmor/6.2/namespaces/pivot_root (+1/-0)
live-build/apparmor/6.2/namespaces/profile (+1/-0)
live-build/apparmor/6.2/network/af_mask (+1/-0)
live-build/apparmor/6.2/network/af_unix (+1/-0)
live-build/apparmor/6.2/network_v8/af_mask (+1/-0)
live-build/apparmor/6.2/policy/set_load (+1/-0)
live-build/apparmor/6.2/policy/versions/v5 (+1/-0)
live-build/apparmor/6.2/policy/versions/v6 (+1/-0)
live-build/apparmor/6.2/policy/versions/v7 (+1/-0)
live-build/apparmor/6.2/policy/versions/v8 (+1/-0)
live-build/apparmor/6.2/ptrace/mask (+1/-0)
live-build/apparmor/6.2/query/label/data (+1/-0)
live-build/apparmor/6.2/query/label/multi_transaction (+1/-0)
live-build/apparmor/6.2/query/label/perms (+1/-0)
live-build/apparmor/6.2/rlimit/mask (+1/-0)
live-build/apparmor/6.2/signal/mask (+1/-0)
live-build/auto/build (+13/-0)
live-build/auto/config (+198/-0)
live-build/buildd/hooks/02-disk-image-uefi.binary (+22/-14)
live-build/functions (+68/-0)
live-build/lb_binary_layered (+4/-0)
live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary (+313/-0)
live-build/ubuntu-cpc/hooks.d/base/riscv64/grub/cmdline.cfg (+4/-0)
live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot (+32/-0)
live-build/ubuntu-server/hooks/01-unminimize.chroot_early (+4/-0)
live-build/ubuntu-server/hooks/03-kernel-metapkg.chroot_early (+3/-0)
- Canonical Foundations Team: Pending requested
-
Diff: 63 lines (+23/-4)2 files modifieddebian/changelog (+8/-0)
live-build/functions (+15/-4)
- Canonical Foundations Team: Pending requested
-
Diff: 1898 lines (+996/-14) (has conflicts)76 files modifieddebian/changelog (+292/-3)
debian/control (+3/-0)
live-build/apparmor/5.19/capability (+1/-0)
live-build/apparmor/5.19/caps/mask (+1/-0)
live-build/apparmor/5.19/dbus/mask (+1/-0)
live-build/apparmor/5.19/domain/attach_conditions/xattr (+1/-0)
live-build/apparmor/5.19/domain/change_hat (+1/-0)
live-build/apparmor/5.19/domain/change_hatv (+1/-0)
live-build/apparmor/5.19/domain/change_onexec (+1/-0)
live-build/apparmor/5.19/domain/change_profile (+1/-0)
live-build/apparmor/5.19/domain/computed_longest_left (+1/-0)
live-build/apparmor/5.19/domain/fix_binfmt_elf_mmap (+1/-0)
live-build/apparmor/5.19/domain/post_nnp_subset (+1/-0)
live-build/apparmor/5.19/domain/stack (+1/-0)
live-build/apparmor/5.19/domain/version (+1/-0)
live-build/apparmor/5.19/file/mask (+1/-0)
live-build/apparmor/5.19/ipc/posix_mqueue (+1/-0)
live-build/apparmor/5.19/mount/mask (+1/-0)
live-build/apparmor/5.19/namespaces/pivot_root (+1/-0)
live-build/apparmor/5.19/namespaces/profile (+1/-0)
live-build/apparmor/5.19/network/af_mask (+1/-0)
live-build/apparmor/5.19/network/af_unix (+1/-0)
live-build/apparmor/5.19/network_v8/af_mask (+1/-0)
live-build/apparmor/5.19/policy/set_load (+1/-0)
live-build/apparmor/5.19/policy/versions/v5 (+1/-0)
live-build/apparmor/5.19/policy/versions/v6 (+1/-0)
live-build/apparmor/5.19/policy/versions/v7 (+1/-0)
live-build/apparmor/5.19/policy/versions/v8 (+1/-0)
live-build/apparmor/5.19/ptrace/mask (+1/-0)
live-build/apparmor/5.19/query/label/data (+1/-0)
live-build/apparmor/5.19/query/label/multi_transaction (+1/-0)
live-build/apparmor/5.19/query/label/perms (+1/-0)
live-build/apparmor/5.19/rlimit/mask (+1/-0)
live-build/apparmor/5.19/signal/mask (+1/-0)
live-build/apparmor/6.2/capability (+1/-0)
live-build/apparmor/6.2/caps/mask (+1/-0)
live-build/apparmor/6.2/dbus/mask (+1/-0)
live-build/apparmor/6.2/domain/attach_conditions/xattr (+1/-0)
live-build/apparmor/6.2/domain/change_hat (+1/-0)
live-build/apparmor/6.2/domain/change_hatv (+1/-0)
live-build/apparmor/6.2/domain/change_onexec (+1/-0)
live-build/apparmor/6.2/domain/change_profile (+1/-0)
live-build/apparmor/6.2/domain/computed_longest_left (+1/-0)
live-build/apparmor/6.2/domain/fix_binfmt_elf_mmap (+1/-0)
live-build/apparmor/6.2/domain/post_nnp_subset (+1/-0)
live-build/apparmor/6.2/domain/stack (+1/-0)
live-build/apparmor/6.2/domain/version (+1/-0)
live-build/apparmor/6.2/file/mask (+1/-0)
live-build/apparmor/6.2/ipc/posix_mqueue (+1/-0)
live-build/apparmor/6.2/mount/mask (+1/-0)
live-build/apparmor/6.2/namespaces/pivot_root (+1/-0)
live-build/apparmor/6.2/namespaces/profile (+1/-0)
live-build/apparmor/6.2/network/af_mask (+1/-0)
live-build/apparmor/6.2/network/af_unix (+1/-0)
live-build/apparmor/6.2/network_v8/af_mask (+1/-0)
live-build/apparmor/6.2/policy/set_load (+1/-0)
live-build/apparmor/6.2/policy/versions/v5 (+1/-0)
live-build/apparmor/6.2/policy/versions/v6 (+1/-0)
live-build/apparmor/6.2/policy/versions/v7 (+1/-0)
live-build/apparmor/6.2/policy/versions/v8 (+1/-0)
live-build/apparmor/6.2/ptrace/mask (+1/-0)
live-build/apparmor/6.2/query/label/data (+1/-0)
live-build/apparmor/6.2/query/label/multi_transaction (+1/-0)
live-build/apparmor/6.2/query/label/perms (+1/-0)
live-build/apparmor/6.2/rlimit/mask (+1/-0)
live-build/apparmor/6.2/signal/mask (+1/-0)
live-build/auto/build (+7/-0)
live-build/auto/config (+199/-0)
live-build/buildd/hooks/02-disk-image-uefi.binary (+19/-11)
live-build/functions (+52/-0)
live-build/lb_binary_layered (+4/-0)
live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary (+313/-0)
live-build/ubuntu-cpc/hooks.d/base/riscv64/grub/cmdline.cfg (+4/-0)
live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot (+32/-0)
live-build/ubuntu-server/hooks/01-unminimize.chroot_early (+4/-0)
live-build/ubuntu-server/hooks/03-kernel-metapkg.chroot_early (+3/-0)
- Michael Hudson-Doyle: Approve
-
Diff: 85 lines (+19/-17)2 files modifieddebian/changelog (+5/-0)
live-build/functions (+14/-17)
- Dan Bungert: Approve
-
Diff: 47 lines (+21/-1)2 files modifieddebian/changelog (+7/-0)
live-build/functions (+14/-1)
summary: |
livecd-rootfs uses losetup -P for theoretically reliable/synchronous - partition setup but it's not reliable in noble + partition setup but it's not reliable |
description: | updated |
November 16 was 2 days after livecd-rootfs 24.04.4 landed in the noble release pocket, superseding 24.04.2.
The code delta between 24.04.2 and 24.04.4 includes removal of support for "legacy" images (SUBPROJECT=legacy) which doesn't apply here; and some reorganization of code related to "preinstalled" images which could affect the riscv64+generic image, that is a preinstalled image using the cpc project, but there were no code changes touching any of the image partitioning code so it's unclear how those code changes could have introduced this bug.