[Bug 819914] New: acpid does not stop during shutdown causing delay
https://bugzilla.novell.com/show_bug.cgi?id=819914 https://bugzilla.novell.com/show_bug.cgi?id=819914#c0 Summary: acpid does not stop during shutdown causing delay Classification: openSUSE Product: openSUSE 12.3 Version: Final Platform: Other OS/Version: openSUSE 12.3 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: arvidjaar@gmail.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- Created an attachment (id=539259) --> (http://bugzilla.novell.com/attachment.cgi?id=539259) systemd debug log of system shutdown User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 During shutdown acpid does not stop. This causes delay on shutdown/reboot. Here is relevant part of debug log (full output attached): [95319.774268] systemd[1]: Installed new job acpid.service/stop as 2283 [95319.838329] systemd[1]: Merged into installed job acpid.service/stop as 2283 [95323.232067] systemd[1]: Stopping ACPI Event Daemon... [95323.232113] systemd[1]: About to execute /bin/kill -s QUIT $MAINPID [95323.232418] systemd[1]: Forked /bin/kill as 29947 [95323.238150] systemd[1]: acpid.service changed running -> stop [95323.240468] systemd[1]: Received SIGCHLD from PID 29947 (kill). [95323.240506] systemd[1]: Got SIGCHLD for process 29947 (kill) [95323.240618] systemd[1]: Child 29947 died (code=exited, status=0/SUCCESS) [95323.240622] systemd[1]: Child 29947 belongs to acpid.service [95323.240631] systemd[1]: acpid.service: control process exited, code=exited status=0 [95323.242215] systemd[1]: acpid.service got final SIGCHLD for state stop [95323.242347] systemd[1]: acpid.service changed stop -> stop-sigterm [95413.242536] systemd[1]: acpid.service stopping timed out. Killing. [95413.243301] systemd[1]: acpid.service changed stop-sigterm -> stop-sigkill [95413.243341] systemd[1]: Running GC... [95413.256551] systemd[1]: Received SIGCHLD from PID 728 (acpid). [95413.256622] systemd[1]: Got SIGCHLD for process 728 (acpid) [95413.256802] systemd[1]: Child 728 died (code=killed, status=9/KILL) [95413.256813] systemd[1]: Child 728 belongs to acpid.service [95413.256836] systemd[1]: acpid.service: main process exited, code=killed, status=9/KILL [95413.257091] systemd[1]: acpid.service changed stop-sigkill -> failed [95413.259099] systemd[1]: Job acpid.service/stop finished, result=done [95413.259148] systemd[1]: Stopped ACPI Event Daemon. [95413.259170] systemd[1]: Unit acpid.service entered failed state [95413.259279] systemd[1]: Stopping Basic System. Manually running "systemctl stop acpid" in run level 5 works. Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=819914 https://bugzilla.novell.com/show_bug.cgi?id=819914#c1 David Kerkhof <dutchkind@txoriaskea.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dutchkind@txoriaskea.org --- Comment #1 from David Kerkhof <dutchkind@txoriaskea.org> 2013-05-17 17:37:02 UTC --- I have the same problem. I didn't know it was this acpid.service so I thought to have had it solved by stopping kactivitymanagerd because since then it would usually shutdown properly. But I still have this hung state causing a minute delay during shutdown, but now not always. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=819914 https://bugzilla.novell.com/show_bug.cgi?id=819914#c2 --- Comment #2 from David Kerkhof <dutchkind@txoriaskea.org> 2013-05-27 07:16:44 UTC --- I found something that solves for me the delay. It's a hack but until there is a better solution. I commented out the line: ExecStop=/bin/kill -s QUIT $MAINPID in /usr/lib/systemd/system/acpid.service Since I did this I rebooted and shut down many times and did not see the delay anymore. I don't know if there is any drawback with this solution, doesn't seem to do any harm -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=819914 https://bugzilla.novell.com/show_bug.cgi?id=819914#c Ye Yuan <yyuan@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yyuan@suse.com AssignedTo|bnc-team-screening@forge.pr |trenn@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=819914 https://bugzilla.novell.com/show_bug.cgi?id=819914#c3 Thomas Renninger <trenn@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |fcrozat@suse.com, | |werner@suse.com --- Comment #3 from Thomas Renninger <trenn@suse.com> 2013-06-03 08:10:27 UTC --- Adding Frederic and Werner as this is systemd specific and already debugged a bit. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=819914 https://bugzilla.novell.com/show_bug.cgi?id=819914#c4 Frederic Crozat <fcrozat@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO CC| |crrodriguez@opensuse.org InfoProvider| |dutchkind@txoriaskea.org --- Comment #4 from Frederic Crozat <fcrozat@suse.com> 2013-06-03 08:20:08 UTC --- Does it work if you use -s TERM instead of -s QUIT for ExecStop ? This would mimic what the initscript was doing ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=819914 https://bugzilla.novell.com/show_bug.cgi?id=819914#c5 --- Comment #5 from Dr. Werner Fink <werner@suse.com> 2013-06-03 09:02:01 UTC --- AFAICS from source both QUIT and TERM should work (acpid-2.0.17/acpid.c): /* trap key signals */ signal(SIGHUP, reload_conf); signal(SIGINT, clean_exit); signal(SIGQUIT, clean_exit); signal(SIGTERM, clean_exit); signal(SIGPIPE, SIG_IGN); only within acpid-2.0.17/event.c there exist a lot of lock/unlock pairs of those signals. But I do not see how the already delivered signals will be handled after the lock has been removed in acpid_handle_event() -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=819914 https://bugzilla.novell.com/show_bug.cgi?id=819914#c6 --- Comment #6 from Cristian Rodríguez <crrodriguez@opensuse.org> 2013-06-03 16:03:01 CLT --- (In reply to comment #2)
I found something that solves for me the delay. It's a hack but until there is a better solution. I commented out the line: ExecStop=/bin/kill -s QUIT $MAINPID in /usr/lib/systemd/system/acpid.service Since I did this I rebooted and shut down many times and did not see the delay anymore. I don't know if there is any drawback with this solution, doesn't seem to do any harm
If you omit ExecStop systemd just sends SIGTERM , if the process is still around after "TimeoutSec=" it sends SIGKILL. as SIGTERM is handled by the same routine as SIGQUIT it effectively does the same thing. While this indeed needs fixing (read, make acpid to use signalfd(2)) dare I ask why you have acpid installed ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=819914 https://bugzilla.novell.com/show_bug.cgi?id=819914#c7 --- Comment #7 from Cristian Rodríguez <crrodriguez@opensuse.org> 2013-06-03 16:33:28 CLT --- I have changed the unit file to just let systemd to kill the process. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=819914 https://bugzilla.novell.com/show_bug.cgi?id=819914#c8 --- Comment #8 from David Kerkhof <dutchkind@txoriaskea.org> 2013-06-04 01:58:32 UTC --- My 12.3 has been installed and upgraded over the years, so that is probably why I had acpid installed on my notebook. When working through this issue, after having added my post, I read at the opensuse forum someone suggesting acpid was obsolete now, so I did uninstall to see and test, and I haven't seen any problems since. So for me this is fixed now. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=819914 https://bugzilla.novell.com/show_bug.cgi?id=819914#c9 Benjamin Brunner <bbrunner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |RESOLVED InfoProvider|dutchkind@txoriaskea.org | Resolution| |FIXED --- Comment #9 from Benjamin Brunner <bbrunner@suse.com> 2013-06-20 09:11:38 CEST --- Update released for openSUSE 12.3. Resolved fixed. Feel free to reopen the report if something isn't working as expected. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=819914 https://bugzilla.novell.com/show_bug.cgi?id=819914#c10 --- Comment #10 from Swamp Workflow Management <swamp@suse.de> 2013-06-20 08:05:14 UTC --- openSUSE-RU-2013:1056-1: An update that has one recommended fix can now be installed. Category: recommended (low) Bug References: 819914 CVE References: Sources used: openSUSE 12.3 (src): acpid-2.0.17-2.4.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com