[Bug 1554795] Re: timeout on restart or shutdown with LUKS root
Jan Vollendorf
jan at vollendorf.com
Thu Apr 13 13:29:19 UTC 2017
I had the same issue, too...
Lots of messages saying "Timed out stoppping ...".
The system never rebooted.
Here is what fixed the problem for me:
Firstly, I activated systemd's debug shell using 'systemctl enable debug-shell.service'.
Then I initiated a reboot and when the problem occured, I switched to debug shell (alt+F9 [/F10 ?] ).
Using 'systemctl list-jobs', I figured out what jobs were running while the system hung.
One of the jobs was an "unattended-upgrdes" job.
This job held one ore more files on my root filesystem open.
When I killed that process, the system finished its shutdown and rebooted.
After having removed the package by 'apt-get --purge remove unattended-upgrades' the problem didn't arise again.
I am using cron-apt on my servers - therefore I do not necessarily need
unattended-upgrades.
Hopefully this helps as workaround and to find the real cause of the
problem.
** Attachment added: "Screenshots debug shell and shutdown messages"
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1554795/+attachment/4861267/+files/no-reboot-with-unattended-upgrades.png
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1554795
Title:
timeout on restart or shutdown with LUKS root
Status in initramfs-tools package in Ubuntu:
Confirmed
Status in systemd package in Ubuntu:
Confirmed
Bug description:
Using the server install ISO, it's possible to specify root on LUKS
and variations thereof - for instance, root on LUKS on MD-RAID, root
on LVM on LUKS on MD-RAID, and so forth. The installer does the right
thing and initramfs-tools does everything necessary to support booting
this sort of thing.
However, systemd gives a 90-second timeout on restart or shutdown,
presumably because it cannot dispose of the things beneath root.
It's wholly unclear to me where the 90-second timeout is specified,
should I wish to shorten it to reboot without the futile delay, but
more to the point, there seems to be infrastructure for handling this
kind of situation that doesn't exist in Ubuntu at present.
I was pointed at this:
https://www.freedesktop.org/wiki/Software/systemd/InitrdInterface/
However, Ubuntu seems not to have anything in its initramfs-tools to
facilitate "shutdown-initrd" functionality.
I haven't tested this, but I suspect this problem will exist for folks
running root on MD-RAID without the LUKS as well. Either way, a
relatively common vanilla install will force 90-second timeouts on
users, which is unfortunate.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: systemd 229-2ubuntu1 [modified: usr/share/dbus-1/system-services/org.freedesktop.systemd1.service]
ProcVersionSignature: Ubuntu 4.4.0-11.26-generic 4.4.4
Uname: Linux 4.4.0-11-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl nvidia_uvm nvidia_modeset nvidia
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
Date: Tue Mar 8 18:06:45 2016
InstallationDate: Installed on 2016-02-24 (13 days ago)
InstallationMedia: Ubuntu-Server 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160219)
Lsusb:
Bus 002 Device 002: ID 1058:0820 Western Digital Technologies, Inc. My Passport Ultra (WDBMWV, WDBZFP)
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 046d:c408 Logitech, Inc. Marble Mouse (4-button)
Bus 001 Device 002: ID 046d:c318 Logitech, Inc. Illuminated Keyboard
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Gigabyte Technology Co., Ltd. To be filled by O.E.M.
ProcEnviron:
TERM=xterm-color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.4.0-11-generic.efi.signed root=/dev/mapper/hostname-root ro net.ifnames=0 biosdevname=0
SourcePackage: systemd
SystemdDelta:
[EXTENDED] /lib/systemd/system/systemd-timesyncd.service → /lib/systemd/system/systemd-timesyncd.service.d/disable-with-time-daemon.conf
[EXTENDED] /lib/systemd/system/rc-local.service → /lib/systemd/system/rc-local.service.d/debian.conf
2 overridden configuration files found.
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 12/04/2015
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: F1
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: X150M-PRO ECC-CF
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrF1:bd12/04/2015:svnGigabyteTechnologyCo.,Ltd.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnGigabyteTechnologyCo.,Ltd.:rnX150M-PROECC-CF:rvrx.x:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.name: To be filled by O.E.M.
dmi.product.version: To be filled by O.E.M.
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1554795/+subscriptions
More information about the foundations-bugs
mailing list