Bug 1341837 - KillUserProcesses true does not kill user gdm session on restart, restart hangs 1m30s
Summary: KillUserProcesses true does not kill user gdm session on restart, restart han...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-01 20:23 UTC by Chris Murphy
Modified: 2017-08-08 14:43 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-08-08 14:43:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1337307 0 unspecified CLOSED 90 second hang at reboot, lsof reports many user session processes aren't quitting 2021-02-22 00:41:40 UTC

Internal Links: 1337307

Description Chris Murphy 2016-06-01 20:23:23 UTC
Description of problem:


When restarting, there is a 1m30s hang, and the journal reports that the gdm user session was not killed until the 1m30s delay elapses.


Version-Release number of selected component (if applicable):
systemd-229-8.fc24.x86_64

How reproducible:
Always



Steps to Reproduce:
1. /etc/systemd/logind.conf KillUserProcesses=yes and uncommented, system rebooted.
2. sudo restart or via gnome-shell power button UI to restart


Actual results:

1m30s delay

Expected results:

Should kill the gdm user session so reboot can happen pretty much right away.

Additional info:

Jun 01 14:15:21 f24m systemd[1]: Stopped GNOME Display Manager.
Jun 01 14:15:21 f24m audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=gdm comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 01 14:15:21 f24m /usr/libexec/gdm-x-session[1640]: (II) UnloadModule: "libinput"
Jun 01 14:15:21 f24m /usr/libexec/gdm-x-session[1640]: (II) systemd-logind: releasing fd for 13:65
Jun 01 14:15:21 f24m systemd[1]: Starting Show Plymouth Reboot Screen...
Jun 01 14:15:21 f24m systemd[1]: Stopping LSB: Init script for live image....
Jun 01 14:15:21 f24m /usr/libexec/gdm-x-session[1640]: (II) UnloadModule: "libinput"
Jun 01 14:15:21 f24m /usr/libexec/gdm-x-session[1640]: (II) systemd-logind: releasing fd for 13:67
Jun 01 14:15:21 f24m systemd[1]: Stopped LSB: Init script for live image..
Jun 01 14:15:21 f24m audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=livesys comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 01 14:15:21 f24m /usr/libexec/gdm-x-session[1640]: Xorg: ../include/privates.h:122: dixGetPrivateAddr: Assertion `key->initialized' failed.
Jun 01 14:15:21 f24m audit[1642]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=1 subj=unconfined_u:unconfined_r:xserver_t:s0-s0:c0.c1023 pid=1642 comm="Xorg" exe="/usr/libexec/Xorg" sig=6
Jun 01 14:15:21 f24m systemd-coredump[2492]: Failed to connect to coredump service: Connection refused
Jun 01 14:15:21 f24m systemd[1]: Stopped Session 1 of user chris.
Jun 01 14:15:21 f24m systemd[1618]: Stopped Accessibility services bus.
Jun 01 14:15:21 f24m systemd[1618]: Stopped target Basic System.
Jun 01 14:15:21 f24m systemd[1618]: Stopped target Sockets.
Jun 01 14:15:21 f24m systemd[1618]: Closed D-Bus User Message Bus Socket.
Jun 01 14:15:21 f24m systemd[1618]: Reached target Shutdown.
Jun 01 14:15:21 f24m systemd[1618]: Starting Exit the Session...
Jun 01 14:15:21 f24m systemd[1618]: Stopped target Paths.
Jun 01 14:15:21 f24m systemd[1618]: Stopped target Timers.
Jun 01 14:15:21 f24m systemd[1618]: Received SIGRTMIN+24 from PID 2495 (kill).
Jun 01 14:15:21 f24m systemd[1626]: pam_unix(systemd-user:session): session closed for user chris
Jun 01 14:15:21 f24m systemd[1]: Stopped User Manager for UID 1000.
Jun 01 14:15:21 f24m audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=user@1000 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 01 14:15:21 f24m systemd[1]: Removed slice User Slice of chris.
Jun 01 14:15:21 f24m systemd-logind[823]: Removed session 1.
Jun 01 14:15:21 f24m systemd[1]: Stopped User Manager for UID 1000.
Jun 01 14:15:21 f24m audit[1]: USER_AVC pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='Unknown permission stop for class system exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'
Jun 01 14:15:21 f24m audit[1]: USER_AVC pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='Unknown permission stop for class system exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'
Jun 01 14:15:21 f24m systemd[1]: Removed slice user-1000.slice.
Jun 01 14:15:21 f24m systemd[1]: Unmounted /run/user/1000.
Jun 01 14:15:21 f24m audit[823]: AVC avc:  denied  { getattr } for  pid=823 comm="systemd-logind" path="/dev/shm/lldpad.state" dev="tmpfs" ino=11685 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=file permissive=0
Jun 01 14:15:21 f24m systemd-logind[823]: Failed to stat() POSIX shared memory segment lldpad.state: Permission denied
Jun 01 14:15:21 f24m systemd[1]: Received SIGRTMIN+20 from PID 2484 (plymouthd).
Jun 01 14:15:21 f24m systemd[1]: Started Show Plymouth Reboot Screen.
Jun 01 14:15:21 f24m audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=plymouth-reboot comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 01 14:15:22 f24m thermald[869]: terminating on user request ..
Jun 01 14:15:23 f24m systemd[1]: Stopped Thermal Daemon Service.
Jun 01 14:15:23 f24m audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=thermald comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 01 14:15:26 f24m dbus[845]: [system] Activating service name='org.fedoraproject.Setroubleshootd' (using servicehelper)
Jun 01 14:15:26 f24m dbus[845]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd'
Jun 01 14:15:26 f24m setroubleshoot[2506]: failed to retrieve rpm info for /dev/shm/lldpad.state
Jun 01 14:15:26 f24m setroubleshoot[2506]: SELinux is preventing systemd-logind from getattr access on the file /dev/shm/lldpad.state. For complete SELinux messages. run sealert -l 56b6518a-8f27-4d38-9d0e-a99599e9bf5d
Jun 01 14:15:26 f24m python3[2506]: SELinux is preventing systemd-logind from getattr access on the file /dev/shm/lldpad.state.
                                    
                                    *****  Plugin restorecon (99.5 confidence) suggests   ************************
                                    
                                    If you want to fix the label. 
                                    /dev/shm/lldpad.state default label should be lldpad_tmpfs_t.
                                    Then you can run restorecon.
                                    Do
                                    # /sbin/restorecon -v /dev/shm/lldpad.state
                                    
                                    *****  Plugin catchall (1.49 confidence) suggests   **************************
                                    
                                    If you believe that systemd-logind should be allowed getattr access on the lldpad.state file by default.
                                    Then you should report this as a bug.
                                    You can generate a local policy module to allow this access.
                                    Do
                                    allow this access for now by executing:
                                    # ausearch -c 'systemd-logind' --raw | audit2allow -M my-systemdlogind
                                    # semodule -X 300 -i my-systemdlogind.pp
                                    
Jun 01 14:16:51 f24m systemd[1]: session-c1.scope: Stopping timed out. Killing.
Jun 01 14:16:51 f24m polkitd[911]: Unregistered Authentication Agent for unix-session:c1 (system bus name :1.27, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Jun 01 14:16:51 f24m systemd[1]: Stopped Session c1 of user gdm.
Jun 01 14:16:51 f24m systemd[1]: session-c1.scope: Unit entered failed state.
Jun 01 14:16:51 f24m systemd[1]: Removed slice User Slice of gdm.
Jun 01 14:16:51 f24m systemd[1]: Stopping Login Service...
Jun 01 14:16:51 f24m systemd[1]: Stopping Permit User Sessions...
Jun 01 14:16:51 f24m systemd[1]: Stopped Permit User Sessions.
Jun 01 14:16:51 f24m audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-user-sessions comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

Comment 1 Chris Murphy 2016-06-01 20:26:15 UTC
Bug 1337307 is for whatever component isn't quitting at restart/shutdown. This bug is for systemd not forcibly killing that session. It's likely I don't understand how this is all supposed to work.

Comment 2 Kadir 2016-11-30 07:38:13 UTC
I have this exact same problem, a shutdown or reboot always hangs for 1.30m waiting for processes to quit (like GDM)

Comment 3 Fedora End Of Life 2017-07-25 20:58:26 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2017-08-08 14:43:36 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.