Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#24415 - [systemd] shutdown/reboot hangs for 2 minutes on SSD

Attached to Project: Community Packages
Opened by Radek Nabb (fake) - Tuesday, 24 May 2011, 10:20 GMT
Last edited by Dave Reisner (falconindy) - Tuesday, 28 June 2011, 14:57 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Recently I switched to SSD (Kingston SNV425S2128GB) disk and now system hangs on shutdown/reboot using systemd. It takes about 90-120 seconds to power off. I don't have this problem with standard init and it worked well on old HDD with systemd.

Additional info:
Arch64, up-to-date
Shutdown log http://pastebin.com/nWP7eRhZ (following this http://wiki.frugalware.org/index.php/SystemD#When_shutdown_hangs )

Steps to reproduce:
Shutdown/reboot my computer.
This task depends upon

Closed by  Dave Reisner (falconindy)
Tuesday, 28 June 2011, 14:57 GMT
Reason for closing:  Fixed
Additional comments about closing:  syslog-ng 3.2.4-2
Comment by Radek Nabb (fake) - Friday, 27 May 2011, 13:28 GMT
Moreover hibernation hangs forever.
Comment by Jesse Jaara (Huulivoide) - Friday, 27 May 2011, 14:00 GMT
This also happens on my system. Using 2 regular HDDs.
root (ext4) and swap on other and var and home (both btrfs,
on subpartitions) on the other one. Also on x86_64
and up-to-date.
Comment by Michal Minář (minami) - Friday, 27 May 2011, 14:23 GMT
Hi, I used to have the same problem, but after some updates and messing with
configs, it went away. Unfortunately I can not say, what fixed it.
I'm also using btrfs filesystem, but on ssd together with systemd.

Here are my configs, hope it helps:
systemd + version info: http://pastebin.com/ZAkLVDnP
/etc/rc.conf: http://pastebin.com/086Q5JEb
/etc/mkinitcpio.conf: http://pastebin.com/r5ZWgkGM
/etc/fstab: http://pastebin.com/XuMfTqT3
Comment by Radek Nabb (fake) - Saturday, 28 May 2011, 10:21 GMT
Thanks for comments.
I'm using ext4 only. I tried to generate ramdisk with your mkinitcpio but it doesn't change anything. rc.conf looks similar.
In that shutdown log attached to above you can find:

[ 92.939887] <31>systemd[1]: Got SIGCHLD for process 1725 (akonadi_control)
[ 92.940048] <31>systemd[1]: Child 1725 died (code=exited, status=0/SUCCESS)
[ 174.873846] <28>systemd[1]: syslog-ng.service stopping timed out. Killing.
[ 174.874200] <31>systemd[1]: syslog-ng.service changed stop-sigterm -> stop-sigkill

IMO it looks like that systemd can't close syslog-ng.service properly. I don't know how to debug syslog-ng.service, but maybe I will try to stop this process earlier e.g. in /etc/rc.local.shutdown and see what happens.
Comment by Dave Reisner (falconindy) - Saturday, 28 May 2011, 12:30 GMT
Your problem is syslog-ng, and this has been mentioned countless times on the forum thread as well as being posted on the wiki page. Please stop using syslog-ng and use rsyslog, which properly support systemd.
Comment by Radek Nabb (fake) - Saturday, 28 May 2011, 22:20 GMT
I've tried rsyslog before ( https://wiki.archlinux.org/index.php/Rsyslog ) but I forgot about unit arch-daemons.target and syslog-ng started anyway... Now everything works perfectly (shutdown, reboot, hibernation). Thank you.
Comment by Peter "CzP" Czanik (czanik) - Saturday, 04 June 2011, 07:30 GMT
  • Field changed: Percent Complete (100% → 0%)
Installing rsyslog instead of syslog-ng does not fix the bug. Systemd and syslog-ng work nicely together on Fedora (where systemd is used by default) and other distributions.
CzP (from syslog-ng upstream)
Comment by Dave Reisner (falconindy) - Saturday, 04 June 2011, 14:25 GMT
Sure, it works because socket takeover is never attempted in Fedora where the .service file is incorrectly written. It references a nonexistent socket unit 'syslog-ng.socket'. This is supposed to be syslog.socket. In Arch and OpenSUSE, syslog-ng does not work with systemd. The daemon will claim to start via systemctl, but any interaction with the daemon will hang until the timeout and systemd will be forced to use kill -9.

http://pkgs.fedoraproject.org/gitweb/?p=syslog-ng.git;a=blob;f=syslog-ng.service;h=3bb20540c5491596c20167449f464b68b282c9bb;hb=HEAD

I've actually pointed this out, and Kay Sievers put it on the TODO list for systemd:

http://cgit.freedesktop.org/systemd/tree/TODO

Perhaps it might need to go somewhere more important, but that's not my concern.
Comment by Dave Reisner (falconindy) - Saturday, 18 June 2011, 20:40 GMT
Upstream bug report opened, because this isn't acceptable behavior for a syslog daemon. I'd love to go back to syslog-ng, but I can't.

https://bugzilla.balabit.com/show_bug.cgi?id=125

Loading...