Bug ID 1231199
Summary [systemd] Shutdown gets blocked with "A stop job is running for Cryptography Setup for cr_home" message
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Basesystem
Assignee screening-team-bugs@suse.de
Reporter aplanas@suse.com
QA Contact qa-bugs@suse.de
Target Milestone ---
Found By ---
Blocker ---

Created attachment 877686 [details]
systemd logs

Using the last MicroOS (systemd v256.6) with FDE and a separate /home
(cr_home), gets blocked during shutdown waiting to the
systemd-cryptsetup@cr_home.service to execute the ExecStop command
(systemd-cryptenroll detach cr_home)

# cat /etc/crypttab
# File created by sdbootutil.  Comments will be removed
cr_root /dev/disk/by-uuid/200d9ca9-5f00-42ae-a725-cd32ce5934ce none
x-initrd.attach,tpm2-device=auto
cr_home /dev/disk/by-uuid/0a5847de-7496-464f-a549-6f80dabf693b none
tpm2-device=auto

Attached the logs with systemd.log_level=debug and udev_log_devel=debug. After
some debug with Fabian we found that systemd-cryptsetup is communicating with
/run/udev/control (systemd-udevd-control.socket) but when systemd-udevd service
is already down. This seems to be the cause of the block.

We try to condition the socket removed on the udevd service stop, via adding:

[Unit]
PropagateStopTo=systemd-udevd-control.socket

to systemd-udevd.service. Also adding:

[Unit]
Requires=systemd-udevd.service

to cryptsetup.target.

Manually doing "rm /run/udev/control" and then "shutdown now" works. In some
tests adding 

[Unit]
After=systemd-udevd.service

to systemd-cryptsetup@cr_home.service also work (not always, but maybe I did
something wrong)

Maybe related with  https://bugzilla.opensuse.org/show_bug.cgi?id=1175850


You are receiving this mail because: