Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
System Shutdown - stop jobs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Spargeltarzan
Guru
Guru


Joined: 23 Jul 2017
Posts: 300

PostPosted: Wed Dec 27, 2017 11:34 pm    Post subject: System Shutdown - stop jobs Reply with quote

Hi,

My Gentoo was several monthes smootly booting and also shutdown worked without any problems - but in the last weeks when doing shutdown I have got "A stop job issues" - recently user c2 for gdm

Sometimes this message is missing and the shutdown is delayed for 1-2 min.

I have read that within systemd these issues are more commonly, can I tweak some settings for a cleaner shutdown? (I use gnome officially with systemd)
How can I troubleshoot these issues and realize which processes are affected?
_________________
___________________
Regards

Spargeltarzan

Notebook: Lenovo YOGA 900-13ISK: Gentoo stable amd64, GNOME systemd, KVM/QEMU
Desktop-PC: Intel Core i7-4770K, 8GB Ram, AMD Radeon R9 280X, ZFS Storage, GNOME openrc, Dantrell, Xen
Back to top
View user's profile Send private message
grumblebear
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2008
Posts: 142

PostPosted: Thu Dec 28, 2017 11:46 am    Post subject: Reply with quote

Before shutting down, stop all your running programs manually (not the gnome stuff, of course). Then check in a console with ps if there are any zombies left. These are most often the cause for such problems.
Back to top
View user's profile Send private message
Spargeltarzan
Guru
Guru


Joined: 23 Jul 2017
Posts: 300

PostPosted: Thu Dec 28, 2017 1:12 pm    Post subject: Reply with quote

I checked for zombies with ps aux | grep 'Z', no zombies are shown, but in the shutdown the "Stop Job" appears...
_________________
___________________
Regards

Spargeltarzan

Notebook: Lenovo YOGA 900-13ISK: Gentoo stable amd64, GNOME systemd, KVM/QEMU
Desktop-PC: Intel Core i7-4770K, 8GB Ram, AMD Radeon R9 280X, ZFS Storage, GNOME openrc, Dantrell, Xen
Back to top
View user's profile Send private message
grumblebear
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2008
Posts: 142

PostPosted: Thu Dec 28, 2017 5:28 pm    Post subject: Reply with quote

Then it is maybe a gnome process that hangs when stopped. I am not quite sure how to properly get out of gnome. I would log out, switch to another console (e.g. CTRL-ALT-F2), then as root something like "systemctl stop gdm" and finally check again for zombies.
Back to top
View user's profile Send private message
Spargeltarzan
Guru
Guru


Joined: 23 Jul 2017
Posts: 300

PostPosted: Wed Jan 03, 2018 12:08 pm    Post subject: Reply with quote

When I log off and do "systemctl stop gdm" in another console I cannot reproduce the shutdown stop jobs. (so also I still cannot detect Zombies)

I have read so much in the Internet but cannot find any method to diagnose the issue right.

It mostly happens in the lines after
[OK] Stopped Laptop Mode Tools

or

[OK] Unmounted /run/user/1000

I looked with a slow-motion video at the output of the shutdown process and than I see that after [OK] Unmounted /run/user/1000 the line [OK] Stopped Session c1 of user gdm appears.

So I guess you are right it has something todo with gnome...

ADD: bugs similar to this are re-created continuously, always closed because not fully reproducible and have different root causes - systemd sucks
_________________
___________________
Regards

Spargeltarzan

Notebook: Lenovo YOGA 900-13ISK: Gentoo stable amd64, GNOME systemd, KVM/QEMU
Desktop-PC: Intel Core i7-4770K, 8GB Ram, AMD Radeon R9 280X, ZFS Storage, GNOME openrc, Dantrell, Xen
Back to top
View user's profile Send private message
Spargeltarzan
Guru
Guru


Joined: 23 Jul 2017
Posts: 300

PostPosted: Wed Jan 03, 2018 9:47 pm    Post subject: Reply with quote

I have created a log of the timeout (28s + 90s = 118s -- see the last lines) with help of Debugging Systemd

Code:

[    3.761230] systemd-logind[793]: New user gdm logged in.
[    3.763613] systemd[1]: Created slice User Slice of gdm.
[    3.767115] systemd[1]: Started Session c1 of user gdm.
[    3.767414] systemd-logind[793]: New session c1 of user gdm.
[    3.767530] systemd-logind[793]: Electing new display for user gdm
[    7.010736] systemd-logind[793]: Inhibitor gdm (GNOME handling keypresses) pid=1043 uid=107 mode=block started.
[    7.246555] systemd-logind[793]: Inhibitor gdm (Multiple displays attached) pid=1043 uid=107 mode=block started.
[    7.249199] systemd-logind[793]: Inhibitor gdm (GNOME needs to lock the screen) pid=1043 uid=107 mode=delay started.
[   28.369156] systemd[1]: gdm.service: Installed new job gdm.service/stop as 2102
[   28.379845] systemd[1]: gdm.service: Changed running -> stop-sigterm
[   28.397541] systemd[1]: Stopping Session c1 of user gdm.
[   28.399016] systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/gdm_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=132 reply_cookie=0 error=n/a
[   28.399042] systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/gdm_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=133 reply_cookie=0 error=n/a
[   28.399072] systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/gdm_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=575 reply_cookie=0 error=n/a
[   28.399097] systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/gdm_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=576 reply_cookie=0 error=n/a
[   28.408200] systemd[1]: Child 4753 (gdm-x-session) died (code=killed, status=1/HUP)
[   28.408315] systemd[1]: Child 882 (gdm-x-session) died (code=killed, status=1/HUP)
[   28.462571] systemd-logind[793]: Electing new display for user gdm
[   28.463887] systemd-logind[793]: Got message type=signal sender=:1.1 destination=n/a object=/org/freedesktop/systemd1/unit/gdm_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=575 reply_cookie=0 error=n/a
[   28.463905] systemd-logind[793]: Got message type=signal sender=:1.1 destination=n/a object=/org/freedesktop/systemd1/unit/gdm_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=576 reply_cookie=0 error=n/a
[   28.468116] systemd-logind[793]: Inhibitor gdm (Multiple displays attached) pid=1043 uid=107 mode=block stopped.
[   28.468157] systemd-logind[793]: Inhibitor gdm (GNOME needs to lock the screen) pid=1043 uid=107 mode=delay stopped.
[   28.468280] systemd-logind[793]: Inhibitor gdm (GNOME handling keypresses) pid=1043 uid=107 mode=block stopped.
[   28.471216] systemd[1]: Received SIGCHLD from PID 827 (gdm).
[   28.471228] systemd[1]: Child 827 (gdm) died (code=exited, status=0/SUCCESS)
[   28.471246] systemd[1]: gdm.service: Child 827 belongs to gdm.service
[   28.471254] systemd[1]: gdm.service: Main process exited, code=exited, status=0/SUCCESS
[   28.471296] systemd[1]: gdm.service: Changed stop-sigterm -> dead
[   28.471403] systemd[1]: gdm.service: Job gdm.service/stop finished, result=done
[   28.471530] systemd[1]: gdm.service: Collecting.
[   28.471580] systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/gdm_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=286 reply_cookie=0 error=n/a
[   28.471602] systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/gdm_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=287 reply_cookie=0 error=n/a
[   28.471635] systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/gdm_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=751 reply_cookie=0 error=n/a
[   28.471663] systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/gdm_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=752 reply_cookie=0 error=n/a
[   28.471741] systemd-logind[793]: Got message type=signal sender=:1.1 destination=n/a object=/org/freedesktop/systemd1/unit/gdm_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=751 reply_cookie=0 error=n/a
[   28.471805] systemd-logind[793]: Got message type=signal sender=:1.1 destination=n/a object=/org/freedesktop/systemd1/unit/gdm_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=752 reply_cookie=0 error=n/a
[  118.426914] systemd[1]: Stopped Session c1 of user gdm.
[  118.432627] systemd[1]: Removed slice User Slice of gdm.


What is gdm_2eservice?

ADD: Could also have something todo with session-c1: Log

POSSIBLY SOLVED: I upgraded to systemd-235-r1 ~amd64 (because Phoronix News said: "systemctl's poweroff/reboot/halt commands are now asynchronous, and a variety of other fixes" about it) and performed 10-15 reboots, was already happy that firstly no issue appeared until once in the end a [FAILED] for deactivating swap /run/user/1000 happened - let's hope this was a one-time issue - also many apps was open when I did this reboot.
Don't forget to change /etc/default/grub to "init=/lib/systemd/systemd" because paths in systemd changed with 235 - check out the news if you upgrade systemd. I will observe and mark this thread as solved after some more testing. On bugs.gentoo.org there is already the stabilization request for systemd-235, so you might want probably days until it is released. Systemd-236 would lead to a blocker I didn't want to try.

NOV-SOLVED: Today I observed this stop job again once. I don't know why this situation improved much first, and today almost every time I shutdown, I have got the stop job again...
_________________
___________________
Regards

Spargeltarzan

Notebook: Lenovo YOGA 900-13ISK: Gentoo stable amd64, GNOME systemd, KVM/QEMU
Desktop-PC: Intel Core i7-4770K, 8GB Ram, AMD Radeon R9 280X, ZFS Storage, GNOME openrc, Dantrell, Xen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum