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):
Steps to Reproduce:
1. install system with encrypted /
2. systemctl isolate emergency.target
Reboot completes in a timely fashion
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,
Above commit is included in systemd-v233 (F26 and rawhide).