[Bug 1838329] Re: Cryptswap periodically fails to mount at boot due to missing a udev notification
Launchpad Bug Tracker
1838329 at bugs.launchpad.net
Sat Jul 18 17:44:22 UTC 2020
This bug was fixed in the package systemd - 245.6-3ubuntu3
---------------
systemd (245.6-3ubuntu3) groovy; urgency=medium
* Rebuild against libselinux 3.0
systemd (245.6-3ubuntu2) groovy; urgency=medium
* basic/cap-list: Print unknown capabilities in hexadecimal.
This fixes autopkgtest running on 5.8 kernels
(when systemd was built on an earlier one) (LP: #1885755)
File: debian/patches/basic-cap-list-parse-print-numerical-capabilities.patch
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=ef46ec8289df815d42c9a3fdbf9fb347226d6be4
systemd (245.6-3ubuntu1) groovy; urgency=medium
* Merge to Ubuntu from Debian unstable
- Dropped changes:
* Enable EFI/bootctl on armhf.
systemd (245.6-3) unstable; urgency=medium
[ Dan Streetman ]
* d/t/upstream: capture new merged 'system.journal' from tests.
https://github.com/systemd/systemd/pull/15281
* d/t/upstream: use --directory or --file param for journalctl.
Properly tell journalctl if the journal to parse is a dir or file.
* d/t/storage: check for ext2 or ext4 fs when using crypttab 'tmp' option.
https://github.com/systemd/systemd/pull/15853
[ Martin Pitt ]
* debian/tests/localed-locale: Fix for environments without en_US.UTF-8.
Unconditionally back up/restore locale configuration files and generate
en_US.UTF-8. Previously the test failed in environments which have some
locale other than en_US.UTF-8 in /etc/default/locale.
Also fix the assertion of /etc/locale.conf not being present after
localectl. This only applies to Debian/Ubuntu tests, not upstream ones.
[ Dimitri John Ledkov ]
* Enable EFI/bootctl on armhf.
systemd (245.6-2ubuntu2) groovy; urgency=medium
[ Balint Reczey ]
* debian/tests/tests-in-lxd: Work around snapd.seeded.service hanging
File: debian/tests/tests-in-lxd
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=04a3342ff533b234ccb1a1020f6d854ab0acd053
[ Dimitri John Ledkov ]
* ubuntu: enable CET on amd64.
File: debian/rules
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=cc42a377e7e8c372124bcf43d9f4fb9c169f4292
[ Dan Streetman ]
* Lock swap blockdevice while calling mkswap (LP: #1838329)
Files:
- debian/patches/lp1838329/0001-blockdev-propagate-one-more-unexpected-error.patch
- debian/patches/lp1838329/0003-dissect-use-log_debug_errno-where-appropriate.patch
- debian/patches/lp1838329/0004-blockdev-add-helper-for-locking-whole-block-device.patch
- debian/patches/lp1838329/0005-makefs-lock-device-while-we-operate.patch
- debian/patches/lp1838329/0006-makefs-normalize-logging-a-bit.patch
- debian/patches/lp1838329/0007-cryptsetup-generator-use-systemd-makefs-for-implemen.patch
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=652a148cf1d3ecfa93cfee288c152c90caee3ac6
systemd (245.6-2ubuntu1) groovy; urgency=medium
* Merge to Ubuntu from Debian unstable
- Dropped changes:
* dhclient-exit-hooks.d/timesyncd: Act only when systemd-timesyncd is enabled
* hwdb: Mask rfkill event from intel-hid on HP platforms (LP: #1883846)
File: debian/patches/hwdb-Mask-rfkill-event-from-intel-hid-on-HP-platforms.patch
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=c705323d61b9cd4e36ceb92e236cd6e9ba4c1b1a
* debian/tests/tests-in-lxd: Show debugging info about reason of skipping test
File: debian/tests/tests-in-lxd
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=1c835ca2d4f6d09977525d781d224a87ba7cde24
* debian/tests/tests-in-lxd: Drop workaround removing fstab from the container
(LP: #1886430)
File: debian/tests/tests-in-lxd
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=f13213af98fa4c27c5f7e58c511b9691bb56065a
systemd (245.6-2) unstable; urgency=medium
[ Dan Streetman ]
* 40-vm-hotadd.rules: check offline before onlining memory/cpus.
The kernel will return EINVAL if the memory or cpu is already online,
which is harmless, but adds a confusing error to the log. Avoid the error
message by only onlining if the memory or cpu is currently offline.
(LP: #1876018)
[ Michael Biebl ]
* d/t/boot-and-services: use canonical name for NetworkManager service
* Fix build with libmicrohttpd 0.9.71.
The return type of callbacks was changed from int to an enum.
[ Youfu Zhang ]
* fsckd: avoid useless CR displayed on console (LP: #1692353)
[ Balint Reczey ]
* dhclient-exit-hooks.d/timesyncd: Act only when systemd-timesyncd is available.
Otherwise the hook script might trigger an error if the
systemd-timesyncd package is uninstalled but not purged. (LP: #1873031)
-- Balint Reczey <rbalint at ubuntu.com> Thu, 16 Jul 2020 16:54:53 +0200
** Changed in: systemd (Ubuntu Groovy)
Status: New => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1838329
Title:
Cryptswap periodically fails to mount at boot due to missing a udev
notification
Status in systemd:
New
Status in systemd package in Ubuntu:
Fix Released
Status in systemd source package in Bionic:
New
Status in systemd source package in Focal:
Fix Committed
Status in systemd source package in Groovy:
Fix Released
Bug description:
[impact]
systems using cryptsetup-based encrypted swap may hang during boot due
to udevd missing the notification that swap has been setup on the
newly created swap device.
[test case]
see original description, and reproduction is intermittent based on
timing
[regression potential]
any regression would likely occur during, or after, boot when creating
an encrypted swap device and/or while waiting to activate the new swap
device. Regressions may cause failure to correctly enable swap and/or
hung boot waiting for the swap device.
[scope]
this was (potentially) fixed upstream with PR 15836, which is not yet
included in any upstream release, so this is needed in all releases,
including groovy.
also note while the upstream bug is closed, and code review seems to
indicate this *should* fix this specific issue, there are some
comments in the upstream bug indicating it may not completely solve
the problem, although there is no further debug of the new reports.
[original description]
On some systems, cryptsetup-based encrypted swap partitions cause
systemd to get stuck at boot. This is a timing-sensitive Heisenbug, so
the rate of occurrence varies from one system to another. Some
hardware will not experience the issue at all, others will only
occasionally experience the issue, and then there are the unlucky who
are unable to boot at all, no matter how many times they restart.
The workaround is for the cryptsetup-generator to generate cryptswap
service entries that call `udevadm trigger` after `mkswap`. This will
ensure that the udev event is triggered, so that systemd is notified
that the encrypt swap partition is ready to activate. This patch has
already been submitted upstream to systemd, but it was not accepted
because it is a workaround for the side effect of systemd not seeing
the udev event upon creating the swap partition.
To manage notifications about this bug go to:
https://bugs.launchpad.net/systemd/+bug/1838329/+subscriptions
More information about the foundations-bugs
mailing list