Bug 1623651

Summary: Restarting dbus leaves systemd-logind in broken state
Product: Red Hat Enterprise Linux 7 Reporter: Mike Ely <mike.ely>
Component: systemdAssignee: systemd-maint
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: dtardon, giuseppe.ragusa, johannespfau, systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-31 18:13:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mike Ely 2018-08-29 19:54:27 UTC
Description of problem:
After restarting dbus with "systemctl restart dbus.service" new SSH sessions take 25 seconds to complete, and the following is logged:
pam_systemd(sshd:session): Failed to create session
: Connection timed out
dbus[30997]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service'
dbus[30997]: [system] Failed to activate service 'org.freedesktop.login1': timed out

Running 'systemctl status -l org.freedesktop.login' returns:
Failed to abandon session scope: Transport endpoint is not connected

Restarting systemd-logind resolves the issue.

How reproducible:
Usually

Steps to Reproduce:
1. systemctl restart dbus.service
2. attempt to login via ssh
3. observe logs similar to above

Actual results:
The systemd-logind service enters a broken state. New connections via SSH (or presumably other service calling logind) take 25 seconds to complete.

Expected results:
The systemd-logind service does not enter a broken state after restarting dbus.

Comment 2 Giuseppe Ragusa 2018-12-09 17:49:18 UTC
I can confirm the above detailed bug.
Isn't it possible to describe in terms of systemd services that a dbus restart should subsequently restart systemd-logind too?

It happened to me after dbus crashed (apparently after a ypbind restart, maybe I will open a separate bug for that):

Dec  3 01:08:51 polmcad8 systemd: Starting NIS/YP (Network Information Service) Clients to NIS Domain Binder...
Dec  3 01:08:51 polmcad8 dbus[8061]: avc:  received policyload notice (seqno=4)
Dec  3 01:08:51 polmcad8 dbus[34465]: avc:  received policyload notice (seqno=4)
Dec  3 01:08:51 polmcad8 setsebool: The allow_ypbind policy boolean was changed to 1 by root
Dec  3 01:08:51 polmcad8 org.a11y.Bus: Reloaded configuration
Dec  3 01:08:51 polmcad8 kernel: dbus-daemon[1051]: segfault at 0 ip 0000562e86944159 sp 00007ffe6107a8f0 error 6 in dbus-daemon[562e86929000+33000]
Dec  3 01:08:51 polmcad8 systemd: dbus.service: main process exited, code=killed, status=11/SEGV
Dec  3 01:08:51 polmcad8 systemd: Unit dbus.service entered failed state.
Dec  3 01:08:51 polmcad8 systemd: dbus.service failed.
Dec  3 01:08:51 polmcad8 systemd: Failed to propagate agent release message: Transport endpoint is not connected
Dec  3 01:08:51 polmcad8 systemd: Failed to propagate agent release message: Transport endpoint is not connected
Dec  3 01:08:51 polmcad8 systemd: Failed to propagate agent release message: Transport endpoint is not connected
Dec  3 01:08:51 polmcad8 systemd: Failed to propagate agent release message: Transport endpoint is not connected
Dec  3 01:08:51 polmcad8 rtkit-daemon[24493]: Demoting known real-time threads.
Dec  3 01:08:51 polmcad8 rtkit-daemon[24493]: Demoted 0 threads.
Dec  3 01:08:51 polmcad8 systemd: Started D-Bus System Message Bus.
Dec  3 01:08:51 polmcad8 systemd: Starting D-Bus System Message Bus...
Dec  3 01:08:51 polmcad8 ypbind: Binding NIS service
Dec  3 01:08:51 polmcad8 ypbind: Binding took 0 seconds
Dec  3 01:08:51 polmcad8 ypbind: NIS domain: mwtolab.polito.it, NIS server: dirac.nfs.private
Dec  3 01:08:51 polmcad8 systemd: Started NIS/YP (Network Information Service) Clients to NIS Domain Binder.
Dec  3 01:08:51 polmcad8 dbus[2026]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service'
Dec  3 01:09:16 polmcad8 dbus[2026]: [system] Failed to activate service 'org.freedesktop.login1': timed out

Comment 3 David Tardon 2019-01-31 18:13:56 UTC

*** This bug has been marked as a duplicate of bug 1532105 ***