Subject: bug#52051: [core-updates-frozen] cannot login ('org.freedesktop.login1' service times out)

From: ison <[email-masked]>
Date: Thu, 16 Dec 2021 06:09:01 -0700

I may have found a clue about what's happening.

After updating I ran into this same issue (I login from TTY), and I see
the same "elogind is already running" error.
However, if I boot into an older generation (before the
core-updates-frozen merge), and then again reboot back into the newest
generation (after core-updates-frozen merge) then I am able to login.

I was able to reproduce those exact steps too. Reboot to new generation,
can't login again. Reboot to old generation, then reboot back to new
generation and I can log in.

Note that even when I'm able to login on the new generation I still see
the "elogind is already running" error printed, but only before the
login prompt shows up, not after.

Also I'm not sure if this matters, but another difference I notice
during the attempts when I can successfully login on the new generation
is that I see Herd restart the `nscd` service.
Perhaps someone else experiencing this issue should try to restart nscd
(via SSH) and see if that works for you.

Maxim Cournoyer <[email-masked]> writes:

> Hello,
>
> I'm not 100% sure this is the cause, but these are the last messages I
> have before I rebooted:
>
> Nov 23 01:09:14 localhost dbus-daemon[383]: [system] Activating service name='org.freedesktop.login1' requested by ':1.17' (uid=0 pid=370
>     comm="/gnu/store/ximad0zvg12r4x0x80mvym8hzg0n33jl-shadow") (using servicehelper)
> Nov 23 01:09:14 localhost elogind[1189]: elogind is already running as PID 390
> Nov 23 01:09:20 localhost shepherd[1]: Respawning term-tty1. 
> Nov 23 01:09:20 localhost shepherd[1]: Service host-name has been started. 
> Nov 23 01:09:20 localhost shepherd[1]: Service term-tty1 has been started.
> Nov 23 01:09:39 localhost dbus-daemon[383]: [system] Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)
>
> I don't remember if I saw the slim login screen; but in any case I
> couldn't successfully login even via a ptty.
>
> It may have to do with polkit.
>
> To be investigated.
>
> This happened on a system *not* using gdm (it uses slim) and with
> ratpoison as the WM, on commit f42bc604547d9ee8e35fcd66d5db7786954cfac3
> of the core-updates-frozen branch.
>
> To be investigated.
>
> Thanks,
>
> Maxim