You are not logged in.
Since I finally migrated to systemd recently, every time I've had a kernel update, shutdown always and hangs and I have serious problems on restart. Eg pacman gets out of sync or filesystem has to run the journal.
Is this a bug or a feature? Is there some way to prevent this from happening in the future?
Offline
How exactly do you shutdown?
Any logs or more detailed info what might be happening? What do you mean by 'pacman gets out of sync'?
Offline
The upgrade I did yesterday was worse than usual. The shutdown hangs when attempting to unmount the root drive (sda1 in my case). I restarted, and was dumped into single user mode. The pacman cache had none of the packages from the upgrade. It was around 7 or 8 packages. Just not there. The Pacman log didn't have any entries either from the upgrade. I had to boot up the install disk, as lots of files in the file system, including much of the linux package, were not owned by any package. Pacman itself wouldn't work. Using the install disk, I was able to figure out which files were out of sync with Pacman, and deduce which packages they came from, and manually update the problem packages.
I've had the same install for several years, and only bit the bullet for the systemd conversion a month ago. Went pretty smoothly except for this one problem I've experienced.
Offline
Please look through the journal output and paste any relevant errors.
Offline
I hate to ask, but where is the journal output?
Offline
On the wiki: https://wiki.archlinux.org/index.php/Systemd#Journal
Not really a Sysadmin issue, moving to NC...
Offline
This is the end of the shutdown:
Jul 06 23:09:25 gulliver login[233]: pam_unix(login:session): session closed for user sweisman
Jul 06 23:09:25 gulliver login[233]: pam_systemd(login:session): Failed to connect to system bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the n
Jul 06 23:09:25 gulliver systemd[1]: Stopped Getty on tty1.
Jul 06 23:09:25 gulliver systemd[1]: Stopping Permit User Sessions...
Jul 06 23:09:25 gulliver su[319]: pam_unix(su-l:session): session closed for user root
Jul 06 23:09:25 gulliver systemd[1]: dhcpcd@eth0.service: main process exited, code=exited, status=1/FAILURE
Jul 06 23:09:25 gulliver systemd[1]: Stopped dhcpcd on eth0.
Jul 06 23:09:25 gulliver systemd[1]: Unit dhcpcd@eth0.service entered failed state.
Jul 06 23:09:27 gulliver systemd[1]: Stopped Permit User Sessions.
Jul 06 23:09:27 gulliver systemd[1]: Stopping Basic System.
Jul 06 23:09:27 gulliver systemd[1]: Stopped target Basic System.
Jul 06 23:09:27 gulliver systemd[1]: Stopping Paths.
Jul 06 23:09:27 gulliver systemd[1]: Stopped target Paths.
Jul 06 23:09:27 gulliver systemd[1]: Stopping Dispatch Password Requests to Console Directory Watch.
Jul 06 23:09:27 gulliver systemd[1]: Stopped Dispatch Password Requests to Console Directory Watch.
Jul 06 23:09:27 gulliver systemd[1]: Stopping CUPS Printer Service Spool.
Jul 06 23:09:27 gulliver systemd[1]: Stopped CUPS Printer Service Spool.
Jul 06 23:09:27 gulliver systemd[1]: Stopping Forward Password Requests to Wall Directory Watch.
Jul 06 23:09:27 gulliver systemd[1]: Stopped Forward Password Requests to Wall Directory Watch.
Jul 06 23:09:27 gulliver systemd[1]: Stopping CUPS Printing Service Sockets.
Jul 06 23:09:27 gulliver systemd[1]: Stopping /dev/initctl Compatibility Named Pipe.
Jul 06 23:09:27 gulliver systemd[1]: Closed Delayed Shutdown Socket.
Jul 06 23:09:27 gulliver systemd[1]: Closed udev Control Socket.
Jul 06 23:09:27 gulliver systemd[1]: Stopped target System Initialization.
Jul 06 23:09:27 gulliver systemd[1]: Stopping Apply Kernel Variables...
Jul 06 23:09:27 gulliver systemd[1]: Stopped Apply Kernel Variables.
Jul 06 23:09:27 gulliver systemd-journal[94]: Journal stoppedThere are no journal entries of any of the botched startup attempts until I am able to clean the system up, when it then boots normally.
Last edited by jasonwryan (2013-07-07 08:05:14)
Offline
Something a little more specific might help, like filtering on errors over the time this has been happening:
http://0pointer.de/blog/projects/journalctl.html
# also, click on the edit button for your last post and see how to use code tags when pasting to the boards...
Offline
I've experienced something similar. Sometimes, the shutdown hangs for a very, very long time but I don't ever touch it and it eventually shutdowns normally. It tells me the files are clean or w/e then hangs then prints the normal "Storage is finalized" stuff.
Offline
Anything unusual about your set up? E.g. do you use encryption or lvm or anything? If so, is the shutdown hook included in mkinitcpio.conf?
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
When it hangs, you should never just go straight to a hard shutdown (that is, holding the power button til power is cut). Always try using the Magic SysRq key first. To understand the SysRq key and what it can do, see the wiki. There is also a nice bit of documentation about it in the linux-docs package.
Offline
That does require you to have enabled it...
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
It does indeed. But the wiki page will likely help you with that.
Offline
Thanks for the tips. It could be that if I left the system alone, it would eventually shutdown on its own, after a long delay. I've read about the magic SysRq key. I'll use it next time it happens. Would probably have saved me much grief.
As far as my mkinitcpio hooks, they pre-date systemd. This is it currently:
HOOKS="base udev autodetect modconf block filesystems keyboard fsck"
What changes do you suggest?
Offline
The pacman cache had none of the packages from the upgrade
That implies that a filesystem sync has not even been performed (e.g. "sync ; sync" in bash - it's run twice apparently).
I would regard that as a bug in systemd, because it's such a sensible precaution to do that at an early stage of the shutdown procedure.
Offline
Thanks for the tips. It could be that if I left the system alone, it would eventually shutdown on its own, after a long delay. I've read about the magic SysRq key. I'll use it next time it happens. Would probably have saved me much grief.
As far as my mkinitcpio hooks, they pre-date systemd. This is it currently:
HOOKS="base udev autodetect modconf block filesystems keyboard fsck"
What changes do you suggest?
Try adding the shutdown hook at the end. I don't think you should need it in your case but I don't think it can hurt and maybe if there is a bug in systemd it will work around it.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline