Swap Failed, Indefinite hang on reboot/shutdown "Reached target Shutdown"

Bug #1582011 reported by xtrchessreal on 2016-05-15
This bug affects 19 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)

Bug Description

This bug has been affecting me since 15.04
Prior to shutdown I activate debug-shell 'systemctl start debug-shell'
I have followed bug #1464917 and installed Xenial-proposed with systemd 229-4ubuntu5 package.
I have finally collected shutdown info using vt9.
Issues collecting info due to what I believe is a timeout where vt9 is not activated when ctl+alt+F9 is pressed. I was able to collect info in vt9 to file "shutdown.text" I appended outputs to file "shutdown.text" the following commands in this order:
systemctl list-jobs >>shutdown.text
systemctl --failed >>shutdown.text
uname -a >>shutdown.text
systemd --version >>shutdown.text
lsblk >>shutdown.text
blkid >>shutdown.text
journalctl -b >>shutdown.text
systemctl -all >>shutdown.text
journalctl -xe >>shutdown.text

After gaining these data I was only able to finish the reboot with the alt+Sysrq and REISUB which forces a reboot even when I just want to shutdown
Each output I separated upon next boot by hand with a line ######################### for easier perusing.

As a workaround for shutdown/reboot I turn swap off, 'sudo swapoff -a && systemctl poweroff' or 'sudo swapoff -a && reboot' which occasionally fails if SWAP has more data than available RAM. In that latter case I am left waiting for the hang and then using alt+Sysrq+REISUB to reboot then shutdown again immediately upon boot before SWAP has a chance to gain data, then I can use any form of halt, poweroff or menu to shutdown.

I have been unable to get answers from AskUbuntu or the above listed bug #1464917 "Reached target Shutdown" I am filing this bug per instructions requested in that bug. Other systemd bugs I have researched #788303 Debian bug reports, #2930 Github and #3087 Github.

Thanks for your time and efforts to help with this issue.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: systemd 229-4ubuntu5
ProcVersionSignature: Ubuntu 4.4.0-22.39-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
Date: Sun May 15 12:08:34 2016
ExecutablePath: /lib/systemd/systemd
InstallationDate: Installed on 2015-06-29 (321 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
MachineType: Sony Corporation VGN-FW250J
 PATH=(custom, no user)
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-22-generic root=UUID=b010e611-6efb-49a9-bff0-59b9533d659b ro resume=UUID=8bcb4169-f5ab-4ab6-b644-23e528088d41 usbcore.autosuspend=-1
SourcePackage: systemd
 [EXTENDED] /lib/systemd/system/rc-local.service → /lib/systemd/system/rc-local.service.d/debian.conf
 [EXTENDED] /etc/systemd/system/display-manager.service → /lib/systemd/system/display-manager.service.d/xdiagnose.conf
 [EXTENDED] /lib/systemd/system/systemd-timesyncd.service → /lib/systemd/system/systemd-timesyncd.service.d/disable-with-time-daemon.conf

 3 overridden configuration files found.
UpgradeStatus: Upgraded to xenial on 2016-04-26 (18 days ago)
dmi.bios.date: 07/25/2008
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: R1090Y0
dmi.board.asset.tag: N/A
dmi.board.name: VAIO
dmi.board.vendor: Sony Corporation
dmi.board.version: N/A
dmi.chassis.asset.tag: N/A
dmi.chassis.type: 10
dmi.chassis.vendor: Sony Corporation
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrR1090Y0:bd07/25/2008:svnSonyCorporation:pnVGN-FW250J:pvrC6011MLK:rvnSonyCorporation:rnVAIO:rvrN/A:cvnSonyCorporation:ct10:cvrN/A:
dmi.product.name: VGN-FW250J
dmi.product.version: C6011MLK
dmi.sys.vendor: Sony Corporation

xtrchessreal (xtrchessreal) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
Changed in systemd (Ubuntu):
importance: Undecided → High
Carlos Pineda (cpinedagt) wrote :

I had the same problem but it started after I uncomment the following line in the /etc/default/grub file:


I commented it again and the PC start to shutdown again without problems.

I commented this line at first because I had a problem with my screen resolution mode... it was always as 640x400 so I commented that line and my system let me choose another mode. Of course when I commented the line again the resolution started again in 640x400, but I changed the line

GRUB_GFXMODE=640x400 to GRUB_GFXMODE=1024x768 and it works fine in this mode... I will try other modes later but maybe this can help you all.

The GRUB_TERMINAL line is related to the graphical terminal and the line GRUB_GFXMODE is related to the Mode of the graphical terminal.

blong (b-long) wrote :

This is effecting me as well. I'm a bit afraid of modifying /etc/default/grub for fear some future update will rely on that file being in a particular state. I'm a bit surprised to see this hasn't been resolved yet, especially if the context and / or resolution may have been distilled in https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1464917 .

Please Canonical, prioritize this fix!

Also, thanks (to Canonical and all bug reporters) for you efforts! :)

Prasanna (prezna) wrote :

I am also facing the same issue. I have installed Lubuntu 16.04 on USB. My system has 2GB RAM and 2GB Swap area. Every time i try to shutdown or reboot it hangs. I need to long press the power button to take the system to halt.

Red (mabee) wrote :

I first installed Ubuntu 32-bit desktop some years ago (I believe 11.04) and have been upgrading it every six months. I am now up to 16.04 and have not ever experienced this shutdown problem.

Since Chrome no longer supports 32-bit, I have downloaded 16.04 64-bit (and verified the sha256).

I have burned the 64-bit to both DVD and thumb drives. I can boot live from either and shutdown without a problem.

If I install to a brand new SSD, I hang during shutdown.

If I replace the SSD with the original HDD with 16.04 32-bit, I can shutdown without problem.

I have found several suggestions on the Web to modify the /etc/default/grub file to solve the problem. My two /etc/default/grub files are identical so I don't see that as a problem.

None of the following work, they just hang:
  shutdown -h now
  shutdown -P now
  reboot -p
  sudo reboot -f (Just responds “Rebooting” and then nothing.)
  sudo halt

In summary, 11.04 (32-bit) upgraded to 11.10 upgraded to 12.04 upgraded to ... 16.04 shuts down without a problem while 16.04 clean install hangs.

Maybe, given time, I'll download 16.04 32-bit and do a clean install to see what that will do.

Red (mabee) wrote :

One addendum to the above, as a verification process, the 16-04 64-bit install was repeated, each time discarding any previous contents on the drive, just the eliminate any one-time glitches that might have occurred.

Also, only Ubuntu and updates through Software Updater have been installed. No extra software.

Red (mabee) wrote :

I have now downloaded and installed 16.04 32-bit Ubuntu and it has the shutdown problem. So, in my case, I do not have the problem if I use the disk that was originally 11.04 and upgraded to continually to 16.04. I only have the problem with a clean install of 16.04.

xtrchessreal (xtrchessreal) wrote :

I used a spare HDD on the same laptop and setup 16.04 LTS per Ubuntu Disk Partitioning recommendations as follows: Swap, /, and Home in that order. Grub is on the 1st Primary as boot, Swap, /, and Home are logical on the 1st extended. There are no other operating systems on this HDD. There is only this one HDD physically installed. With this HDD installed as described here I NO LONGER have issues during shutdown or reboot.

If I physically install the original HDD as it is described in this bug description I Still DO have issues with the hang on shutdown and reboot.

I cannot conclude anything but I speculate that the original HDD setup as /, Home, Swap in that order, or the config of fstab may have some significance to the issue.

It has been over 2 months using this new HDD in my laptop without any hangs. There has never been a Target reached Shutdown hang since installing the new HDD. I waited to be sure the hang is gone before reporting any new data. I will keep this new hardware configuration and use the original HDD as a spare for future use.

Thank you for all your efforts to resolve the issue.

Stephen (belrik) wrote :

Same issue, since upgrade to 16.04 the system has hung during reboot. The network isn't fully shutdown and responds to pings but sshd is stopped, the system reboots successfully if swap is disabled. Attempted to add reboot=force to grub, to no avail; only disabling swap fixed the issue.

Guest (disposable-s) wrote :

To clarify things, this bug here affects unencrypted swap partitions.

There is another bug (https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1506139),
which affects encrypted swap partitions.

James Bowery (jabowery) wrote :

This may be a bug that appears when using an SSD for swap. (I just can't imagine why people would want to use an SSD for swap ;) ).

This reported that the problem appeared with installation of an SSD for swap:


That's what happened to me as well.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers