Skip to content

logind randomly loses its dbus connection #2925

@jengelh

Description

@jengelh

Submission type

  • [*] Bug report
  • Request for enhancement (RFE)

systemd version the issue has been seen with

v228 + d8ccf5f + 8936a5e

Used distribution

openSUSE Leap 42.1

In case of bug report: Unexpected behaviour you saw

logind somehow loses its connection to dbus, which causes long delays when trying to login with sshd

# busctl
11:17 dagent:/home/zarafa # busctl 
NAME                             PID PROCESS         USER             CONNECTION    UNIT                      SESSION    DESCRI
:1.0                               1 systemd         root             :1.0          init.scope                -          -     
:1.1                              24 systemd-networkd systemd-network  :1.1          systemd-networkd.service  -          -    
:1.373                         15545 busctl          root             :1.373        sshd.service              -          -     
org.freedesktop.DBus               - -               -                -             -                         -          -     
org.freedesktop.hostname1          - -               -                (activatable) -                         -         
org.freedesktop.locale1            - -               -                (activatable) -                         -         
org.freedesktop.login1             - -               -                (activatable) -                         -         
org.freedesktop.machine1           - -               -                (activatable) -                         -         
org.freedesktop.network1          24 systemd-networkd systemd-network  :1.1          systemd-networkd.service  -          -    
org.freedesktop.systemd1           1 systemd         root             :1.0          init.scope                -          -     
org.freedesktop.timedate1          - -               -                (activatable) -                         -         
11:17 dagent:/home/zarafa # systemctl status systemd-logind
% systemd-logind.service - Login Service
   Loaded: loaded (/usr/lib/systemd/system/systemd-logind.service; static; vendor preset: disabled)
   Active: active (running) since Tue 2016-03-29 15:54:26 CEST; 1 day 19h ago
     Docs: man:systemd-logind.service(8)
           man:logind.conf(5)
           http://www.freedesktop.org/wiki/Software/systemd/logind
           http://www.freedesktop.org/wiki/Software/systemd/multiseat
 Main PID: 128 (systemd-logind)
   Status: "Processing requests..."
   CGroup: /system.slice/system-systemd\x2dnspawn.slice/[email protected]/system.slice/systemd-logind.service
           └─128 /usr/lib/systemd/systemd-logind
.
Mar 30 13:33:08 dagent systemd-logind[128]: New session 2029 of user zarafa.
Mar 30 13:58:31 dagent systemd-logind[128]: New session 2062 of user zarafa.
Mar 30 14:01:50 dagent systemd-logind[128]: Removed session 2062.
Mar 31 02:51:58 dagent systemd-logind[128]: Removed session 2029.
Mar 31 11:00:01 dagent systemd-logind[128]: Failed to abandon session scope: Transport endpoint is not connected
Mar 31 11:05:08 dagent systemd[1]: Started Login Service.
Mar 31 11:05:33 dagent systemd-logind[128]: Failed to abandon session scope: Transport endpoint is not connected
Mar 31 11:12:58 dagent systemd[1]: Started Login Service.
Mar 31 11:13:47 dagent systemd[1]: Started Login Service.
Mar 31 11:15:01 dagent systemd[1]: Started Login Service.
11:17 dagent:/home/zarafa # ps 128
  PID TTY      STAT   TIME COMMAND
  128 ?        Ss     0:01 /usr/lib/systemd/systemd-logind

The long wait is caused by dbus:

# journalctl -u dbus
Mar 31 11:05:08 dagent dbus[23]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesk...
Mar 31 11:05:33 dagent dbus[23]: [system] Failed to activate service 'org.freedesktop.login1': timed out...

Because the service is still running, "systemd start systemd-logind" is a no-op, and since the busname won't reappear, dbus considers it an activation failure.

Other services are prone to the issue as well; networkd however seems to continue living ever since applying said two patches on top of 228.

In case of bug report: Expected behaviour you didn't see

Don't lose the dbus connection.

In case of bug report: Steps to reproduce the problem

if only I knew. Unlike #2136, this issue happens to me without interaction, that is, no "daemon-reload", reexec, or other restarting action was executed to the best of my knowledge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Programming errors, that need preferential fixingloginneeds-reporter-feedback ❓There's an unanswered question, the reporter needs to answer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions