Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 550358 - sys-apps/systemd-220 cryptsetup: indefinite wait for encrypted swap device
Summary: sys-apps/systemd-220 cryptsetup: indefinite wait for encrypted swap device
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo systemd Team
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-25 12:42 UTC by Matthias Dahl
Modified: 2016-07-11 15:10 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
crypttab (crypttab,276 bytes, text/plain)
2015-05-25 12:44 UTC, Matthias Dahl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Dahl 2015-05-25 12:42:21 UTC
Updating to systemd 220 today (from 219_p112) on an up to date ~amd64 system, broke the encrypted swap setup I had been using for ages now. Nothing else was touched, except for the systemd upgrade.

The device is properly brought up but mapper-crypt-swap.device stills waits indefinitely for the device to show up, thus hanging the boot process if swap is listed in fstab.

This is definitely a regression in systemd -- and thus far, I have been unable to figure out what is exactly causing it. :(

Reproducible: Always
Comment 1 Matthias Dahl 2015-05-25 12:44:32 UTC
Created attachment 403934 [details]
crypttab

For completeness sake, here the crypttab I am using. Nothing out of the ordinary, really.

One more thing, maybe of relevance: I use dracut for the initrd... but have been doing so for ages as well and I don't see how this could be relevant in this case.
Comment 2 poncho 2015-05-25 13:36:36 UTC
Same issue here.

crypttab:
swap   /dev/disk/by-partlabel/swap   /dev/urandom   swap,nofail,discard

fstab:
/dev/mapper/swap   none   swap   defaults,nofail,discard   0 0
Comment 3 Mike Gilbert gentoo-dev 2015-05-25 20:05:40 UTC
You'll have to work with upstream to figure this out.
Comment 4 Matthias Dahl 2015-05-26 08:50:44 UTC
Taken upstream. Let's hope it gets any attention and we can track this down. :-)
Comment 5 Matthias Dahl 2015-05-26 19:08:34 UTC
(In reply to poncho from comment #2)

> Same issue here.

Could you try this patch, please?
http://cgit.freedesktop.org/systemd/systemd/commit/?id=185abfc3d6b4e8f804a3f7216cd8b0459593af87

That should fix it. I tried it on my system, forgot to enable swap in fstab and thus was not 100% able to check it but systemd detected the crypt device again, so it very likely properly works all the way. Unfortunately I cannot restart the system until tomorrow and test myself, so... :-)

Didn't realize Mike pulled in additional commits from master for v220 and thought this one was pretty much vanilla. That particular patch line was flawed and fixed by that commit.

Keeping my fingers crossed here. ;-)
Comment 6 poncho 2015-05-26 19:24:03 UTC
(In reply to Matthias Dahl from comment #5)
> (In reply to poncho from comment #2)
> 
> > Same issue here.
> 
> Could you try this patch, please?
> http://cgit.freedesktop.org/systemd/systemd/commit/
> ?id=185abfc3d6b4e8f804a3f7216cd8b0459593af87
> 

Above patch fixes the issue for me. Thanks for the pointer.
Comment 7 Mike Gilbert gentoo-dev 2015-05-26 19:35:04 UTC
Thanks, I'll revbump the ebuild.
Comment 8 Mike Gilbert gentoo-dev 2015-05-26 19:47:29 UTC
+*systemd-220-r1 (26 May 2015)
+
+  26 May 2015; Mike Gilbert <floppym@gentoo.org> +systemd-220-r1.ebuild:
+  Backport a regression fix for udev inotify handling, bug 550358. Thanks to
+  Matthias Dahl and poncho.
Comment 9 stukov 2016-07-11 15:10:26 UTC
Hello. I am still having the exact same issue on my setup.

This is my version and USE flags.
$ equery uses systemd
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for sys-apps/systemd-226-r2:
 U I
 - - abi_x86_32 : 32-bit (x86) libraries
 + + acl        : Add support for Access Control Lists
 - - audit      : Enable support for sys-process/audit
 + + cryptsetup : Enable cryptsetup tools (includes unit generator for crypttab)
 - - curl       : Enable support for uploading journals; required to build systemd-import/systemd-pull
 - - elfutils   : Enable coredump stacktraces in the journal
 - - gcrypt     : Enable sealing of journal files using gcrypt; required to build systemd-import/systemd-pull
 - - gnuefi     : Enable EFI boot manager and stub loader (built using sys-boot/gnu-efi)
 - - http       : Enable embedded HTTP server in journald
 - - idn        : Enable support for Internationalized Domain Names
 - - importd    : Enable import daemon
 + + kdbus      : Connect to kernel dbus (KDBUS) instead of userspace dbus if available
 + + kmod       : Enable kernel module loading via sys-apps/kmod
 + + lz4        : Enable lz4 compression for the journal
 - - lzma       : Support for LZMA (de)compression algorithm
 - - nat        : Enable support for network address translation in networkd
 + + pam        : Add support for PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip
 + + policykit  : Enable PolicyKit authentication support
 - - qrcode     : Enable qrcode output support in journal
 + + seccomp    : Enable seccomp (secure computing mode) to perform system call filtering at runtime to increase security of programs
 + + ssl        : Add support for Secure Socket Layer connections
 - - sysv-utils : Install sysvinit compatibility symlinks and manpages for init, telinit, halt, poweroff, reboot, runlevel, and shutdown
 - - test       : Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in
                  make.conf/package.use anymore
 - - vanilla    : Disable Gentoo-specific behavior and compatibility quirks
 - - xkb        : Validate XKB keymap in logind