Description of problem: When rootfs is on LUKS we need to deactivate LUKS device during shutdown. To do that we call systemd-cryptsetup detach on the particular device. systemd-cryptsetup will then call crypt_deactivate function from libcryptsetup. This function then deactivates device, but when libcryptsetup notices that udev daemon is still running it executes the code path that uses udev cookies (synchronization mechanism implemented by libdevicemapper based on udev). To figure out whether udev is running it uses udev_queue_get_udev_is_active function from libudev. However this function only checks for presence of udev control AF_UNIX socket. Because system is in emergency mode, udev is not running anymore and corresponding socket unit was also already stopped. Note that systemd by default doesn't unlink AF_UNIX sockets from the filesystem when socket unit is stopped. udev_queue_get_udev_is_active then returns true because /run/udev/control AF_UNIX socket is still present, but udevd is actually not running. That will then cause hang in libcryptsetup. Version-Release number of selected component (if applicable): systemd-231-3.fc26 How reproducible: always Steps to Reproduce: 1. install system with encrypted / 2. systemctl isolate emergency.target 3. sulogin 4. reboot Actual results: Reboot hangs Expected results: Reboot completes in a timely fashion Additional info: https://github.com/systemd/systemd/issues/2477
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'.
This was fixed while ago by, https://github.com/systemd/systemd/pull/4039/commits/a2de10775194edec51b1e88d20a380724a3dc716 Above commit is included in systemd-v233 (F26 and rawhide).