Bug 922460

Summary: Long shuting down/restart - system hangs for about 90 seconds
Product: [openSUSE] openSUSE Distribution Reporter: Petr Tonkoshurov <vourlo>
Component: BasesystemAssignee: E-mail List <bnc-team-screening>
Status: RESOLVED UPSTREAM QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: bwiedemann, forgotten_omK_SZiU8I, ismail, systemd-maintainers, vourlo
Version: 13.2Flags: werner: needinfo? (vourlo)
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 13.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on: 897617    
Bug Blocks:    
Attachments: Verbose dmesg log in txt file

Description Petr Tonkoshurov 2015-03-16 08:36:10 UTC
Created attachment 626936 [details]
Verbose dmesg log in txt file

+++ This bug was initially created as a clone of Bug #897617 +++

When shutting down or restarting system from graphical environment (KDE4) or from console after logout system get stuck for about 90 seconds and then it closes/restarts.

I added systemd debuging options to boot options and used debug.sh (from http://freedesktop.org/wiki/Software/systemd/Debugging/#Shutdown_Completes_Eventually but with human readable timecodes option) to get shutdown-log. It seems that problem is with plymouth-reboot service, but I'm not quite shure.

Full shutdown-log in attachment.

Reproducible: 9/10 times.

Steps to Reproduce:
1.Try to shutdown or restart system
2.
3.
Actual Results:  
System shutsdown long - it takes about 90 seconds to poweroff/reboot

Expected Results:  
System should shutdown fast and then poweroff/reboot laptop

The system is desktop Core i3 2100/ASUS Z77-A/12Gb DDR3-1300/128GbSSD+2X750GbSATAHDD
Comment 1 Dr. Werner Fink 2015-03-16 09:15:19 UTC
The plymouth-reboot service is provided by plymouth. Interesting I do not see this behaviour.  Therefore attach more information about your system as well as the log files or the outpout of

   journalctl -b -1

also you may test out the systemd-210 from the project Base:System:Legacy at

   http://download.opensuse.org/repositories/Base:/System:/Legacy/openSUSE_13.2/

also to check if plymouth may cause this you may disable and/or remove plymouth to check this.
Comment 2 Dr. Werner Fink 2015-03-16 10:57:50 UTC
Please disable and stop the teamviewerd.service, from your shoutdown log:

[  178.439287] systemd[1]: Stopping TeamViewer remote control daemon...
[  178.439478] systemd[1]: teamviewerd.service changed running -> stop-sigterm
[  178.439492] systemd[1]: Stopping Multi-User System.
[  178.439506] systemd[1]: multi-user.target changed active -> dead

[...]

[  184.505622] systemd[1]: Got disconnect on private connection.
[  219.777739] systemd[1]: Got notification message for unit systemd-journald.service
[  219.777748] systemd[1]: systemd-journald.service: Got notification message from PID 411 (WATCHDOG=1...)
[  219.777754] systemd[1]: systemd-journald.service: got WATCHDOG=1
[  219.777766] systemd[1]: Got notification message for unit systemd-journald.service
[  219.777770] systemd[1]: systemd-journald.service: Got notification message from PID 411 (WATCHDOG=1...)
[  219.777773] systemd[1]: systemd-journald.service: got WATCHDOG=1
[  259.735419] systemd[1]: Got notification message for unit systemd-journald.service
[  259.735428] systemd[1]: systemd-journald.service: Got notification message from PID 411 (WATCHDOG=1...)
[  259.735434] systemd[1]: systemd-journald.service: got WATCHDOG=1
[  259.735441] systemd[1]: Got notification message for unit systemd-journald.service
[  259.735445] systemd[1]: systemd-journald.service: Got notification message from PID 411 (WATCHDOG=1...)
[  259.735448] systemd[1]: systemd-journald.service: got WATCHDOG=1
[  268.476051] systemd[1]: teamviewerd.service stop-sigterm timed out. Killing.
[  268.477452] systemd[1]: teamviewerd.service changed stop-sigterm -> stop-sigkill
[  268.477547] systemd[1]: Received SIGCHLD from PID 1252 (teamviewerd).
[  268.477595] systemd[1]: Child 1252 (teamviewerd) died (code=killed, status=9/KILL)
[  268.477656] systemd[1]: Child 1252 belongs to teamviewerd.service
[  268.477748] systemd[1]: teamviewerd.service: main process exited, code=killed, status=9/KILL
[  268.478471] systemd[1]: teamviewerd.service changed stop-sigkill -> failed
[  268.478608] systemd[1]: Job teamviewerd.service/stop finished, result=done
[  268.478624] systemd[1]: Stopped TeamViewer remote control daemon.
[  268.478961] systemd[1]: Unit teamviewerd.service entered failed state.
[  268.479561] systemd[1]: teamviewerd.service: cgroup is empty
Comment 3 Dr. Werner Fink 2015-03-16 11:03:11 UTC
Maybe you see in the output of

  journalctl -b -1

that the teamviewerd.service was flooding journald with messages after receiving SIGTERM. IMHO something goes wrong in teamviewerd.service, maybe missing dependency on network
Comment 4 Petr Tonkoshurov 2015-03-16 12:08:20 UTC
(In reply to Dr. Werner Fink from comment #3)
> Maybe you see in the output of
> 
>   journalctl -b -1
> 
> that the teamviewerd.service was flooding journald with messages after
> receiving SIGTERM. IMHO something goes wrong in teamviewerd.service, maybe
> missing dependency on network

Dear Dr. Werner Fink!

Thank you very much for quick response!
After disabling teamviewerd service I've rebooted/halted 5 times both GUI and from command line, shutdown process seemd to be as fast as it should be.
I will delete this package ASAP.

Again, thanks a lot!
Comment 5 Dr. Werner Fink 2015-03-16 12:23:34 UTC
I personal would change dependencies of teamviewerd.service that is replace any

 NetworkManager-wait-online.service

with

  network-online.target

and add

  TimeoutStopSec = 5

to the [Service] section.  Then it might be an idea to add network.target and/or network-online.target to the Wants= tag in the [Unit] section as it looks the service wants to have network.  Maybe it should be required.