FS#27975 - [lvm2] lvremove hangs

Attached to Project: Arch Linux
Opened by Christian Hesse (eworm) - Tuesday, 17 January 2012, 14:47 GMT
Last edited by Tom Gundersen (tomegun) - Sunday, 29 January 2012, 11:55 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Eric Belanger (Snowman)
Thomas Bächler (brain0)
Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:


Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce:
This task depends upon

Closed by  Tom Gundersen (tomegun)
Sunday, 29 January 2012, 11:55 GMT
Reason for closing:  Fixed
Comment by Christian Hesse (eworm) - Tuesday, 17 January 2012, 14:50 GMT
Sorry, accidentally pressed enter...

My backup script creates read only lvm snapshots, then removes them after rsync. However lvremove hangs with the latest packages in testing. However the snapshot is already removed, so just killing it seems to be fine.

linux 3.2.1-1
lvm2 2.02.88-1
udev 177-1
Comment by Michael Laß (Bevan) - Monday, 23 January 2012, 11:54 GMT
I can confirm this problem. It might be related to the latest udev updates, because a few days ago I didn't have these problems. I can reproduce it with udev 177 and udev 178.

Steps to reproduce:
lvcreate -L 10G -s -n testsnap /dev/vg0/YOUR_VOLUME
lvremove -vvv -f /dev/vg0/testsnap

You see that lvremove is waiting for a semaphore to decrease:
"Udev cookie 0xd4d99e1 (semid 229380) waiting for zero"

strace -p `pidof lvremove`:
Process 5846 attached - interrupt to quit
semop(229380, {{0, 0, 0}}, 1

The only way to let lvremove finish is to remove this semaphore:
ipcrm -s 229380

But this seems to be a really dirty hack and I think /dev/mapper is then not cleaned up as it should.

Kernel 3.2.1-1-ARCH on x86_64
udev 177-3 and 178-1
lvm2 2.02.88-1
Comment by Michael Duell (akurei) - Monday, 23 January 2012, 20:04 GMT
I can also reproduce this. When I kill udevd after lvcreate -L1G -s -n snap /dev/joel/root I can then do lvremove -f /dev/joel/snap although this can't be good.
It's definitely udev related.
Comment by Thomas Bächler (brain0) - Monday, 23 January 2012, 20:22 GMT
This again. This is the third or fourth time this bug reappears in the device-mapper (I am not kidding).
Comment by Michael Duell (akurei) - Tuesday, 24 January 2012, 12:21 GMT
Was there a workaround for this other than killing udevd the last times?
Comment by Till Hofmann (morxa) - Tuesday, 24 January 2012, 21:12 GMT
I can confirm the problem. Also, LVM monitor hangs infinitely during shut down (which forces me to kill the pc)
This started to occur with the latest udev update (to version 178).

Kernel 3.2.1-1-ARCH on x86_64
udev 178-1
lvm2 2.02.88-1
Comment by Michael Duell (akurei) - Tuesday, 24 January 2012, 23:26 GMT
<quote>Also, LVM monitor hangs infinitely during shut down (which forces me to kill the pc)</quote>

I second that.
I need to use the "Magic-Sysrq-Key" to sync and then I have to hold the power button five seconds to hard-kill the power to "poweroff" my system effectively and "safely".

When I try to use AltGr+SysRq+O (after AltGr+SysRq+{R,E,I,S,U})" [1] to "SHUTDOWN SYSTEM IMMEDIATELY", I get a kernel panic. AltGr+SysRq+B does not work on my Thinkpad T400, so I use AltGr+SysRq+O instead.

[1] see https://en.wikipedia.org/wiki/Magic_SysRq_key#.E2.80.9CREISUB.E2.80.9D_.E2.80.93_safe_reboot
Comment by Till Hofmann (morxa) - Wednesday, 25 January 2012, 18:04 GMT
I updated udev to version 179, no changes. Bug still exists.

Kernel 3.2.1-2-ARCH on x86_64
udev 179-1
lvm2 2.02.88-1
Comment by Tom Gundersen (tomegun) - Sunday, 29 January 2012, 09:44 GMT
Hi guys, thanks for reporting.

I spoke with upstream who just released a fix. Please try udev-180 from testing and confirm if it works.
Comment by Till Hofmann (morxa) - Sunday, 29 January 2012, 11:25 GMT
yes, udev-180 works fine! Thanks!

Loading...