FS#40765 - [systemd] [lvm2] lvremove locks up with systemd version 213-x

Attached to Project: Arch Linux
Opened by Robin (robin67) - Monday, 09 June 2014, 06:36 GMT
Last edited by Dave Reisner (falconindy) - Tuesday, 10 June 2014, 16:10 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Eric Belanger (Snowman)
Thomas Bächler (brain0)
Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:
The latest update of systemd to version 213 makes my snapshots of lvm crash. I tried version 213-5 and 213-6, both with the same result
When I try to remove the snapshot with "lvremove -f vg/lv1" I receive the following error

Unable to deactivate open vg-lv1-cow (254:7)
Failed to activate snapup.
Releasing activation in critical section.
libdevmapper exiting with 1 device(s) still suspended.

I experience this on my i686 as wel as on my x86_64 machines. After this my system locks up and I need to hard reset it.
Before I knew it was caused by systemd I first tried downgrading lvm and my kernel but that was not causing it.
I could only solve it by downgrading systemd to version 212-3. I expect udev to be causing this.
I also opened a topic on the forum about it on: https://bbs.archlinux.org/viewtopic.php?id=182585

Additional info:
linux-lts 3.10.42-1
lvm2 2.02.106-2
systemd 212-3
systemd-sysvcompat 212-3

Steps to reproduce:
lvcreate --size 2G --snapshot --name lv1 /dev/vg/home -p r
mount -r -t ext2 /dev/vg/lv1 /mnt/tmp-bck
tar -C /mnt/tmp-bck -czvpf /volum1/backup-home.tgz .
umount /mnt/tmp-bck
lvremove -f /dev/vg/lv1
This task depends upon

Closed by  Dave Reisner (falconindy)
Tuesday, 10 June 2014, 16:10 GMT
Reason for closing:  Fixed
Additional comments about closing:  systemd-213-9
Comment by Dave Reisner (falconindy) - Monday, 09 June 2014, 11:46 GMT
Likely a problem with the new udev device locking. You'll need to report this upstream.
Comment by Robin (robin67) - Monday, 09 June 2014, 17:12 GMT
I won't mind doing so, but what do you mean with reporting upstream ?
How, what where ??? Sorry for my ignorance...
Comment by Dave Reisner (falconindy) - Monday, 09 June 2014, 17:13 GMT Comment by Dave Reisner (falconindy) - Monday, 09 June 2014, 17:27 GMT
systemd-213-8 in [testing] should fix this. Could you confirm?
Comment by Robin (robin67) - Monday, 09 June 2014, 17:30 GMT
[testing] currently holds systemd-213-7
I will test (and hopefully confirm ;-) ) after I can download it from testing...
Comment by Dave Reisner (falconindy) - Monday, 09 June 2014, 17:38 GMT
Right, I just uploaded it. Mirror sync, etc.
Comment by Robin (robin67) - Monday, 09 June 2014, 17:45 GMT

Thanks for your quick replies. I noticed it just got uploaded and installed and tested it.
I installed:
libsystemd 213-8
systemd 213-8
systemd-sysvcompat 213-8

Unfortunately it still has the same problem

Unable to deactivate open vg-lv1-cow (254:7)
Failed to activate lv1.
Releasing activation in critical section.
libdevmapper exiting with 1 device(s) still suspended.

Comment by Dave Reisner (falconindy) - Monday, 09 June 2014, 17:53 GMT
Do you use systemd in your initramfs? Did you regenerate your initramfs?
Comment by Leeman (alaricljs) - Monday, 09 June 2014, 18:06 GMT
I also tested and did regen initramfs although I don't think I have systemd in there. Also failure on the lvremove.
Comment by Robin (robin67) - Monday, 09 June 2014, 18:07 GMT

There was no need to regenerate before (not for switching back to 212-3 either)
But I did so anyway just now with "mkinitcpio -p linux-lts" and tested again.

Still the same error, unfortunately.

It will be back to 212-3 for now for me...
Comment by Dave Reisner (falconindy) - Monday, 09 June 2014, 18:09 GMT
Can you confirm that the error exists on the real kernel?
Comment by Leeman (alaricljs) - Monday, 09 June 2014, 18:10 GMT
Ok, ripped it apart. systemd-udev is in there but not all of systemd.
Comment by Robin (robin67) - Monday, 09 June 2014, 18:13 GMT

@Dave: That will be a little bit harder for me to test right now, because I have a program running that will need this kernel version.
I can test it later on and get back to you on it
Comment by Leeman (alaricljs) - Monday, 09 June 2014, 18:16 GMT
Dave, I am running linux 3.14.6-1 and the issue persists with the 213-8 rev of systemd
Comment by Leeman (alaricljs) - Tuesday, 10 June 2014, 13:26 GMT
From the LVM mailing list:

this commit should be fixing problems for lvm2 & latest systemd:

e918a1b5a94f270186dca59156354acd2a596494

and this is systemd commit which has introduced problem:

3d06f4183470d42361303086ed9dedd29c0ffc1b

Comment by Dave Reisner (falconindy) - Tuesday, 10 June 2014, 13:33 GMT
Right. I already pointed out what the problem was (udev locking) and included the commit which is supposed to fix this in 213-8. Since you say it doesn't, I'd suggest going back to the LVM mailing list.
Comment by Christian Hesse (eworm) - Tuesday, 10 June 2014, 13:59 GMT
Reading the code I think the commit is wrong and does not fix the issue. Already sent a mail to systemd mailing list:
http://lists.freedesktop.org/archives/systemd-devel/2014-June/019863.html
Comment by Dave Reisner (falconindy) - Tuesday, 10 June 2014, 14:01 GMT
Yeah, your patch looks correct. Thanks for looking into this.
Comment by Dave Reisner (falconindy) - Tuesday, 10 June 2014, 14:49 GMT
And 213-9 is a thing now... Please test.
Comment by Leeman (alaricljs) - Tuesday, 10 June 2014, 15:20 GMT
That did the trick.

Loading...