Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#52667 - [lvm2] presence of active lvm snapshot delays shutdown

Attached to Project: Arch Linux
Opened by Jakub Turski (yacoob) - Saturday, 21 January 2017, 23:56 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 27 September 2018, 14:34 GMT
Task Type Bug Report
Category Packages: Core
Status Assigned
Assigned To Christian Hesse (eworm)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


I've just set up a fresh arch system with / on LVM on top of a LUKS container.

sda 8:0 0 238.5G 0 disk
|-sda1 8:1 0 200M 0 part /boot/efi
`-sda2 8:2 0 238.3G 0 part
`-cryptolvm 254:0 0 238.3G 0 crypt
|-rg-swap 254:1 0 16G 0 lvm
|-rg-root-real 254:2 0 40G 0 lvm
| |-rg-root 254:3 0 40G 0 lvm /
| `-rg-bugtest 254:5 0 40G 1 lvm
|-rg-bugtest-cow 254:4 0 1G 1 lvm
| `-rg-bugtest 254:5 0 40G 1 lvm
`-rg-home 254:6 0 181.3G 0 lvm /home

Once it has booted, I've taken a snapshot of root volume:
$ lvcreate --snapshot -p r -n bugtest -L 1G /dev/rg/root

Upon shutdown I've found the following in the journal:
lvm [pid]: There are still devices being monitored
lvm [pid]: Refusing to exit
watchdog: watchdog0: watchdog did not stop!

The lvm messages are not 100% reproducible, but they're usually there. The shutdown delay seem to be strongly correlated to presence of a snapshot of root filesystem.
At least once, I've also found:
dmeventd[pid]: dmeventd detected break while being idle for 174 second(s), existing.
dmeventd shutting down

It's not entirely clear whether presence of encryption is a factor - and I don't have any hardware handy to test pure LVM setup. Sorry about that :( Given that dm-crypt uses device mapper as well, I think it may be relevant.

Additional info:
lvm2 2.02.168-1
cryptsetup 1.7.3-1
device-mapper 2.02.168-1
lvmetad is running

Steps to reproduce:
- install a new system with / on lvm on luks
- lvcreate --snapshot -p r -n bugtest -L 1G /dev/rg/root
- reboot, watch system stall
This task depends upon