Might be a good idea to enable some systemd parameter for debugging purposes : https://freedesktop.org/wiki/Software/systemd/Debugging/
Enabling tty9 w/ systemd.debug-shell=1 and possibly the following : Diagnosing Shutdown Problems Just like with boot problems, when you encounter a hang during shutting down, make sure you wait at least 5 minutes to distinguish a permanent hang from a broken service that's just timing out. Then it's worth testing whether the system reacts to CTRL+ALT+DEL in any way. If shutdown (whether it be to reboot or power-off) of your system gets stuck, first test if the kernel itself is able to reboot or power-off the machine forcedly using one of these commands: reboot -f poweroff -f If either one of the commands does not work, it's more likely to be a kernel, not systemd bug. Shutdown Completes Eventually If normal reboot or poweroff work, but take a suspiciously long time, then boot with the debug options: systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M printk.devkmsg=on enforcing=0 save the following script as /usr/lib/systemd/system-shutdown/debug.sh and make it executable: #!/bin/sh mount -o remount,rw / dmesg > /shutdown-log.txt mount -o remount,ro / reboot Look for timeouts logged in the resulting file shutdown-log.txt and/or attach it to a bugreport. Shutdown Never Finishes If normal reboot or poweroff never finish even after waiting a few minutes, the above method to create the shutdown log will not help and the log must be obtained using other methods. Two options that are useful for debugging boot problems can be used also for shutdown problems: use a serial console use a debug shell - not only is it available from early boot, it also stays active until late shutdown. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1796376 Title: Bug #1739107 fix causes linux-cloud-tools-common not to be upgradable with unattended-upgrades on shutdown mode Status in linux package in Ubuntu: Confirmed Bug description: Since the following linux-cloud-tools-common package versions : Xenial : 4.4.0-135.161 Bionic : 4.15.0-34.37 the Systemd service unit file for hv-kvp-daemon has been modified with new dependencies that make the package unable to be upgraded with unattended-upgrades on shutdown mode. Unattended-upgrades hangs with the linux-cloud-tools-common package during "Preparing to unpack". The server restarts after the unattended-upgrades service timeout expires. - Package state after reboot : iFR linux-cloud-tools-common 4.15.0-34.37 all Linux kernel version specific cloud tools for version 4.15.0 - Unattended-upgrades dpkg logs : Log started: 2018-10-05 17:59:04 (Reading database ... 52043 files and directories currently installed.) Preparing to unpack .../linux-cloud-tools-common_4.15.0-36.39_all.deb ... Log ended: 2018-10-05 18:00:54 - Impact : The current impact is very important as all security updates are blocked until you manually fix each server with : dpkg --configure -a apt install --only-upgrade linux-cloud-tools-common - Workaround/Fix : As a simple straightforward fix, replacing : Before=shutdown.target cloud-init-local.service walinuxagent.service with : Before=shutdown.target walinuxagent.service makes the package upgradable during shutdown. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1796376/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp