Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#30995 - [cryptsetup][systemd] system hangs on shutdown
Attached to Project:
Arch Linux
Opened by Christian Hesse (eworm) - Friday, 03 August 2012, 14:24 GMT
Last edited by Dave Reisner (falconindy) - Monday, 15 October 2012, 18:43 GMT
Opened by Christian Hesse (eworm) - Friday, 03 August 2012, 14:24 GMT
Last edited by Dave Reisner (falconindy) - Monday, 15 October 2012, 18:43 GMT
|
DetailsDescription:
System sometimes hangs on shutdown when root partition is on a LUKS encrypted partition and systemd is used. Dave Reisner is aware of the problem, see notes on Additional information: cryptsetup 1.5.0-1 mkinitcpio 0.10-1 systemd 187-4 Steps to reproduce: Shutdown. [0] http://lists.freedesktop.org/archives/systemd-devel/2012-June/005440.html |
This task depends upon
Closed by Dave Reisner (falconindy)
Monday, 15 October 2012, 18:43 GMT
Reason for closing: Fixed
Additional comments about closing: fixed somewhere around linux-3.5
Monday, 15 October 2012, 18:43 GMT
Reason for closing: Fixed
Additional comments about closing: fixed somewhere around linux-3.5
Sadly my girlfriends system (she is effected most, I can reproduce it on my own system only very seldom) is not around, so I can not test at the moment.
Thanks a lot!
I will take a look at that later.
Udev cookie 0xd4de038(semid 229376) waiting for zero
(Sorry, no complete log as it is a real machine and limited in functionality on shutdown. Probably it's easier for you to capture this on a virtual machine.)
This brings up two questions:
1. If I understand correctly udevd is no longer running. Why is udev stuff used at all? Though it looks like some of the udev calls succeed.
2. Why does it fail to decrease to zero? And who is to be blamed? libdevmapper? udev? systemd?
> 1. If I understand correctly udevd is no longer running. Why is udev stuff used at all? Though it looks like some of the udev calls succeed.
Because of the way that libdevmapper looks to see if udev is running [1]. In the sysvinit case, we shutdown udevd and everything comes down with it. This includes a bunch of stuff in /run/udev/. In the systemd case, a bunch of this hangs around because its controlled by socket activation. _check_udev_is_running() boils down to checking existance of /run/udev/queue.bin which I'm guessing succeeds for some odd reason (triggering the udev sync logic). If I'm right, nuking the /run/udev dir from within the shutdown script would fix this, as a silly hack. Sadly, I still can't seem to reproduce this hang anymore, but I'm going to keep trying.
> 2. Why does it fail to decrease to zero? And who is to be blamed? libdevmapper? udev? systemd?
No idea, but that's why it hangs (I've seen the hanging semop(2) operation via strace)... libdevmapper is at fault here, because its a pile of crap.
[1] http://sourceware.org/git/?p=lvm2.git;a=blob;f=libdm/libdm-common.c;h=fd775ca3aa8da7f0f56cddf2c9a28d66635f380c;hb=HEAD#l1795
ps tells me it does not hang around, but I suppose you are right that systemd starts it on request.
I will try if removing /run/udev helps on my girlfriend's system.
I think anybody should report this upstream to dm-devel. Would you like to or should I?
So far we have two possibilities:
* Adding the workaround to mkinitcpio or
* getting 3.5.0 into [core] asap.
I'm fine as is, my systems do work now. (And my girlfriend does no longer complain. ;)
Ok, will try to find some time to test this. ;)