[Bug 2045797] Re: use losetup -P instead of kpartx which is racy
Ćukasz Zemczak
2045797 at bugs.launchpad.net
Mon Jan 15 15:20:46 UTC 2024
Hello Steve, or anyone else affected,
Accepted livecd-rootfs into jammy-proposed. The package will build now
and be available at https://launchpad.net/ubuntu/+source/livecd-
rootfs/2.765.33 in a few hours, and then in the -proposed repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed. Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
jammy to verification-done-jammy. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-jammy. In either case, without details of your testing we will
not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance for helping!
N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.
** Changed in: livecd-rootfs (Ubuntu Jammy)
Status: New => Fix Committed
** Tags added: verification-needed verification-needed-jammy
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to livecd-rootfs in Ubuntu.
https://bugs.launchpad.net/bugs/2045797
Title:
use losetup -P instead of kpartx which is racy
Status in livecd-rootfs package in Ubuntu:
New
Status in livecd-rootfs source package in Jammy:
Fix Committed
Bug description:
[ Impact ]
livefs builds on slow architectures (in particular, riscv64) hit a
race with a high degree of frequency when setting up partition maps
for the loop-mounted disk image, resulting in a build failure because
the partition devices are not available when they need to be.
This race is because 'kpartx -a' invokes kernel APIs that set up the
partition mappings asynchronously, returning when the kernel devices
exist but not blocking waiting on udev to create the device files
under /dev.
In contrast, the newer 'losetup -P' ("--partscan") invokes a syscall
that directly sets up the partitions in the kernel as part of the
loopback device setup and also creates the device nodes on devtmpfs
before returning.
This code has landed in mantic where it has reduced the rate of
riscv64 image build failures.
[ Test Plan ]
Unfortunately, since this code landed in mantic, it appears the kernel
may have regressed and made losetup -P itself racy (LP: #2045586).
Also since it was racy in the first place, a successful build or set
of builds would not be evidence that this issue was fixed. So the
test plan is restricted to verifying that the autopkgtests pass, and
verifying after publication to -updates that daily images are still
building.
[ Where problems could occur ]
Getting this working in mantic required changes to launchpad's setup
of the build containers wrt /dev mounting. In the unlikely event that
the behavior of jammy differed from that of mantic within the build
containers, this could cause all jammy livefs builds to fail until
resolved.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2045797/+subscriptions
More information about the foundations-bugs
mailing list