You are not logged in.

#1 2017-10-13 14:34:10

jaythespacehound
Member
Registered: 2013-05-29
Posts: 11

[SOLVED] Xorg crashing triggered by systemd-logind on SSH

Hi all, thanks for any help.
Running arch with i3.

$uname -r
Linux jop85 4.13.5-1-ARCH #1 SMP PREEMPT Fri Oct 6 09:58:47 CEST 2017 x86_64 GNU/Linux

Xorg has been crashing what I thought was randomly since upgrading the following packages (among others but these seem most relevant):

[2017-10-11 12:37] [ALPM] upgraded libsystemd (234.11-8 -> 235.0-1)
[2017-10-11 12:37] [ALPM] upgraded dbus (1.10.22-1 -> 1.10.24-1)
[2017-10-11 12:37] [ALPM] upgraded systemd (234.11-8 -> 235.0-1)
[2017-10-11 12:37] [ALPM] upgraded linux (4.12.13-1 -> 4.13.5-1)
[2017-10-11 12:37] [ALPM] upgraded openssh (7.5p1-2 -> 7.6p1-1)
[2017-10-11 12:37] [ALPM] upgraded systemd-sysvcompat (234.11-8 -> 235.0-1)
[2017-10-11 12:37] [ALPM] upgraded xorg-server-common (1.19.3-3 -> 1.19.4-1)
[2017-10-11 12:37] [ALPM] upgraded xorg-server (1.19.3-3 -> 1.19.4-1)
[2017-10-11 12:37] [ALPM] upgraded xorg-server-xvfb (1.19.3-3 -> 1.19.4-1)

Looking at ~/.local/share/xorg/Xorg.0.log the only message is:

Fatal server error:
[   804.206] (EE) systemd-logind disappeared (stopped/restarted?)

So checked for systemd in journalctl:

$journalctl -b -1
Oct 13 12:57:47 jop85 sshd[25849]: Connection closed by authenticating user XXX ::1 port 45466 [preauth]
Oct 13 12:57:57 jop85 sshd[26072]: Connection closed by authenticating user XXX ::1 port 45512 [preauth]
Oct 13 12:57:57 jop85 sshd[26080]: Connection closed by authenticating user XXX ::1 port 45514 [preauth]
Oct 13 12:58:01 jop85 sshd[26091]: Accepted password for XXX from ::1 port 45520 ssh2
Oct 13 12:58:01 jop85 sshd[26091]: pam_unix(sshd:session): session opened for user XXX by (uid=0)
Oct 13 12:58:01 jop85 systemd-logind[22772]: do_ypcall: clnt_call: RPC: Unable to send; errno = Operation not permitted
Oct 13 12:58:26 jop85 sshd[26091]: pam_systemd(sshd:session): Failed to create session: Connection timed out
Oct 13 12:58:26 jop85 sshd[26595]: Received disconnect from ::1 port 45520:11: disconnected by user
Oct 13 12:58:26 jop85 sshd[26595]: Disconnected from user XXX ::1 port 45520
Oct 13 12:58:26 jop85 sshd[26091]: pam_unix(sshd:session): session closed for user XXX
Oct 13 13:00:57 jop85 systemd[1]: systemd-logind.service: Watchdog timeout (limit 3min)!
Oct 13 13:00:57 jop85 systemd[1]: systemd-logind.service: Killing process 22772 (systemd-logind) with signal SIGABRT.
Oct 13 13:00:57 jop85 systemd[1]: Started Process Core Dump (PID 29427/UID 0).
Oct 13 13:00:58 jop85 systemd[1]: systemd-logind.service: Main process exited, code=dumped, status=6/ABRT
Oct 13 13:00:58 jop85 systemd[1]: systemd-logind.service: Failed with result 'watchdog'.
Oct 13 13:00:58 jop85 systemd[1]: systemd-logind.service: Service has no hold-off time, scheduling restart.
Oct 13 13:00:58 jop85 systemd[1]: systemd-logind.service: Scheduled restart job, restart counter is at 2.
Oct 13 13:00:58 jop85 systemd[1]: Stopped Login Service.
Oct 13 13:00:58 jop85 systemd[1]: Starting Login Service...
Oct 13 13:00:58 jop85 systemd[1]: Started Login Service.
Oct 13 13:00:58 jop85 systemd-logind[29429]: New seat seat0.
Oct 13 13:00:58 jop85 systemd-coredump[29428]: Process 22772 (systemd-logind) of user 0 dumped core.
                                               
                                               Stack trace of thread 22772:
                                               #0  0x00007f2fc02ec016 connect (libc.so.6)
                                               #1  0x00007f2fc031957c clnttcp_create (libc.so.6)
                                               #2  0x00007f2fc031b554 __libc_rpc_getport (libc.so.6)
                                               #3  0x00007f2fc031952b clnttcp_create (libc.so.6)
                                               #4  0x00007f2fbc831787 n/a (libnsl.so.1)
                                               #5  0x00007f2fbc831f14 n/a (libnsl.so.1)
                                               #6  0x00007f2fbc832089 n/a (libnsl.so.1)
                                               #7  0x00007f2fbc83217b yp_match (libnsl.so.1)
                                               #8  0x00007f2fbc626e63 _nss_nis_getpwuid_r (libnss_nis.so.2)
                                               #9  0x00007f2fbca4639e n/a (libnss_compat.so.2)
                                               #10 0x00007f2fbca48ae1 _nss_compat_getpwuid_r (libnss_compat.so.2)
                                               #11 0x00007f2fc02b85d5 getpwuid_r@@GLIBC_2.2.5 (libc.so.6)
                                               #12 0x00007f2fc02b7d39 getpwuid (libc.so.6)
                                               #13 0x00005635b0d012ce n/a (systemd-logind)
                                               #14 0x00005635b0d01a98 n/a (systemd-logind)
                                               #15 0x00007f2fbfe1aa24 n/a (libsystemd-shared-235.so)
                                               #16 0x00007f2fbfe1be27 bus_process_object (libsystemd-shared-235.so)
                                               #17 0x00007f2fbfea79b8 n/a (libsystemd-shared-235.so)
                                               #18 0x00007f2fbfea7dd4 n/a (libsystemd-shared-235.so)
                                               #19 0x00007f2fbfef6c50 n/a (libsystemd-shared-235.so)
                                               #20 0x00007f2fbfef6e8b sd_event_dispatch (libsystemd-shared-235.so)
                                               #21 0x00007f2fbfef700e sd_event_run (libsystemd-shared-235.so)
                                               #22 0x00005635b0cef661 n/a (systemd-logind)
                                               #23 0x00007f2fc0215f6a __libc_start_main (libc.so.6)
                                               #24 0x00005635b0cef7da n/a (systemd-logind)
Oct 13 13:00:58 jop85 systemd-logind[29429]: Assertion 'sd->fd < 0' failed at ../systemd-stable/src/login/logind-session-device.c:516, f
Oct 13 13:00:58 jop85 systemd[1]: Started Process Core Dump (PID 29434/UID 0).
Oct 13 13:00:58 jop85 systemd[1]: systemd-logind.service: Main process exited, code=dumped, status=6/ABRT
Oct 13 13:00:58 jop85 systemd[1]: systemd-logind.service: Failed with result 'core-dump'.
Oct 13 13:00:58 jop85 systemd[1]: systemd-logind.service: Service has no hold-off time, scheduling restart.
Oct 13 13:00:58 jop85 systemd[1]: systemd-logind.service: Scheduled restart job, restart counter is at 3.
Oct 13 13:00:58 jop85 systemd[1]: Stopped Login Service.
Oct 13 13:00:58 jop85 systemd[1]: Starting Login Service...
Oct 13 13:00:58 jop85 su[24922]: pam_unix(su:session): session closed for user XXX
Oct 13 13:00:58 jop85 systemd[1]: Started Login Service.
Oct 13 13:00:58 jop85 systemd-coredump[29435]: Process 29429 (systemd-logind) of user 0 dumped core.
                                               
                                               Stack trace of thread 29429:
                                               #0  0x00007fa041d758a0 raise (libc.so.6)
                                               #1  0x00007fa041d76f09 abort (libc.so.6)
                                               #2  0x00007fa0419f9d8c log_assert_failed_realm (libsystemd-shared-235.so)
                                               #3  0x000055fa36c1704f n/a (systemd-logind)
                                               #4  0x000055fa36c055ee n/a (systemd-logind)
                                               #5  0x00007fa041d61f6a __libc_start_main (libc.so.6)
                                               #6  0x000055fa36c057da n/a (systemd-logind)
[snip]

This appears to all be triggered by an ssh into localhost (I have two accounts on this machine and sometimes have to swap and ssh is easiest to forward display and not have to enter password):

$ ssh -vvv XXX@localhost
...
debug1: Entering interactive session.
debug1: pledge: network

And here it hangs for ~30s then proceeds ok but then within the next few minutes X will crash due to systemd crashing.
This also happens if I ssh into a different machine on the network.

This only happens for a NIS user.
Not for local accounts and I’m guessing this line from the journalctl above is the root cause:

Oct 13 16:20:58 jop85 systemd-logind[369]: do_ypcall: clnt_call: RPC: Unable to send; errno = Operation not permitted

I am at a loss even where to continue from here so any advice is appreciated!
Again this all worked fine a few days ago.
Thanks!
Jay

Last edited by jaythespacehound (2017-10-26 10:33:38)

Offline

#2 2017-10-26 10:32:45

jaythespacehound
Member
Registered: 2013-05-29
Posts: 11

Re: [SOLVED] Xorg crashing triggered by systemd-logind on SSH

Solved, anyone else running into this see here for more information:
https://www.bountysource.com/issues/502 … d-suchlike

Suggested solution is installing nscd (caching nis locally).
But I went with commenting out IPAddressDeny=any in /usr/lib/systemd/system/systemd-logind.service

Offline

Board footer

Powered by FluxBB