Bug 880765 - dm-setup hangs on shutdown
dm-setup hangs on shutdown
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: lvm2 (Show other bugs)
17
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Peter Rajnoha
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-27 13:52 EST by Pentarh Udi
Modified: 2013-08-01 14:02 EDT (History)
19 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-01 14:02:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
sos reports (1.33 MB, application/x-xz)
2012-11-27 13:52 EST, Pentarh Udi
no flags Details
systemd shutdown debug log (327.83 KB, text/plain)
2013-01-15 01:57 EST, Pentarh Udi
no flags Details

  None (edit)
Description Pentarh Udi 2012-11-27 13:52:00 EST
Created attachment 653016 [details]
sos reports

Description of problem:

I have a problem with start and shutdown process.
On shutdown my system stopping all services and then hung for about minute. Then poweroff/restart.
On start it always does fsck of all filesystems.
Both cases slow down start/shutdown process dramatically.

I dont see anything unusual in logs. Please help me what info should i provide for futher investigation of problem.

I did put "noquiet" to kernel parameters, but messages appear too fast to recognize them. Though, systemd hang at shutdown is obviously happen after/on filesystems umount - so no logs available. 

Version-Release number of selected component (if applicable):
systemd-44-21.fc17.x86_64

Sos report attached. Thank you.
Comment 1 Lennart Poettering 2013-01-14 12:33:33 EST
Hmm, could you please follow the guidelines at

http://freedesktop.org/wiki/Software/systemd/Debugging#Diagnosing_Shutdown_Problems

to track down what the shutdown issues are?
Comment 2 Pentarh Udi 2013-01-15 01:57:23 EST
Created attachment 678660 [details]
systemd shutdown debug log

Thanks for pointing to this. I got the problem, but dont know how to solve it.

Looks like it can not close and properly umount devices on LUKS partition.

I have the whole LVM PV located at luks partition - with swap, home, var and others.

Systemd debug attached.
Comment 3 Pentarh Udi 2013-01-15 01:59:22 EST
[root@pentbook pentarh]# cat /etc/crypttab 
luks-e2459dba-540c-4e2f-931a-4a52ea31bec1 UUID=e2459dba-540c-4e2f-931a-4a52ea31bec1 none 

[root@pentbook pentarh]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/mapper/luks-e2459dba-540c-4e2f-931a-4a52ea31bec1
  VG Name               vgsys

[pentarh@pentbook ~]$ cat /etc/fstab
/dev/mapper/vgsys-lvroot /                       ext4    defaults        1 1
UUID=8a66cbb3-2be5-421c-afe2-028e14140aff /boot                   ext4    defaults        1 2
/dev/mapper/vgsys-lvhome /home                   ext4    defaults        1 2
/dev/mapper/vgsys-lvmm  /mm                     ext4    defaults        1 2
/dev/mapper/vgsys-lvtmp /tmp                    ext4    defaults        1 2
/dev/mapper/vgsys-lvvar /var                    ext4    defaults        1 2
/dev/mapper/vgsys-lvswap swap                    swap    defaults        0 0
Comment 4 Lennart Poettering 2013-01-15 18:01:59 EST
Seems dm-setup hangs. Reassigning to lvm
Comment 5 Bryn M. Reeves 2013-01-16 05:27:21 EST
I only see vgchange --monitor [yn] in that log. Nothing appears to shut down the VG that is residing on the encrypted PV (which is why it is open and cannot be removed).

I don't see any calls to dmsetup at all. The dm ioctl errors logged by the kernel:

[  132.211096] device-mapper: ioctl: unable to remove open device luks-e2459dba-540c-4e2f-931a-4a52ea31bec1
[  132.411218] device-mapper: ioctl: unable to remove open device luks-e2459dba-540c-4e2f-931a-4a52ea31bec1
[  132.611361] device-mapper: ioctl: unable to remove open device luks-e2459dba-540c-4e2f-931a-4a52ea31bec1
[  132.811567] device-mapper: ioctl: unable to remove open device luks-e2459dba-540c-4e2f-931a-4a52ea31bec1
[  133.011700] device-mapper: ioctl: unable to remove open device luks-e2459dba-540c-4e2f-931a-4a52ea31bec1
[  133.211818] device-mapper: ioctl: unable to remove open device luks-e2459dba-540c-4e2f-931a-4a52ea31bec1
[  133.411934] device-mapper: ioctl: unable to remove open device luks-e2459dba-540c-4e2f-931a-4a52ea31bec1
[  133.612064] device-mapper: ioctl: unable to remove open device luks-e2459dba-540c-4e2f-931a-4a52ea31bec1
[  133.812161] device-mapper: ioctl: unable to remove open device luks-e2459dba-540c-4e2f-931a-4a52ea31bec1
[  134.012257] device-mapper: ioctl: unable to remove open device luks-e2459dba-540c-4e2f-931a-4a52ea31bec1
[...]
[  217.541028] systemd[1]: Job dev-dm\x2d0.device/stop finished, result=timeout
[  217.541037] systemd[1]: Job dev-dm\x2d0.device/stop failed with result 'timeout'.
[  217.684644] systemd[1]: Job sys-devices-virtual-block-dm\x2d0.device/stop finished, result=timeout
[  217.684652] systemd[1]: Job sys-devices-virtual-block-dm\x2d0.device/stop failed with result 'timeout'.

Happen ~45s before the timeout is logged - dmsetup or cryptsetup (who call the ioctls) should exit right after receiving this error. I don't see anything suggesting they are hanging (but if something keeps retrying it when it cannot succeed then it would look that way.. there are a few more at >223s which suggests that is happening).
Comment 6 Pentarh Udi 2013-01-16 05:37:33 EST
>223s is the actual systemd-shutdown debug script remounting / rw for writing this debug.

Pls suggest how to see what app keeps opened files preventing umount?
Comment 7 Milan Broz 2013-01-16 06:07:02 EST
If the open count is caused by activated LVs over LUKS, "lsblk" output should be enough to prove that.
Comment 8 Fedora End Of Life 2013-07-04 02:27:49 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 9 Fedora End Of Life 2013-08-01 14:02:29 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.