GNU bug report logs -
#55444
elogind startup race between shepherd and dbus-daemon
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Mon, 16 May 2022 08:27:01 UTC
Severity: important
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #16 received at 55444 <at> debbugs.gnu.org (full text, mbox):
Hi,
Liliana Marie Prikler <liliana.prikler <at> gmail.com> skribis:
> Am Montag, dem 16.05.2022 um 10:26 +0200 schrieb Ludovic Courtès:
>> [...]
>> So it would seem that the solution to this is to prevent dbus-daemon
>> from starting elogind. We can do that by changing
>> org.freedesktop.login1.service so that it has “Exec=true” instead of
>> “Exec=elogind --daemon”.
>>
>> “Exec=true” is a bit crude because it doesn’t guarantee that elogind
>> is really started; if that isn’t good enough, we could instead wait
>> for the PID file or something (as of Shepherd 0.9.0, invoking ‘herd
>> start elogind’ potentially leads shepherd to start a second instance
>> if the first one is still being started, so we can’t really do that).
> Why does shepherd race with itself here? That sounds like a very evil
> bug. Rather than waiting for a log file, I'd suggest writing an ad-hoc
> Guile script that communicates with shepherd and blocks until shepherd
> signals that elogind has been started, but this script too would have
> to work around shepherd racing against itself.
Right. Currently services have two states: stopped, and started.
Fixing that needs non-trivial changes to how shepherd handles state.
We’ll have to do that (the way I see it, we’ll move state out of
<service> and have a fiber explicitly handle state, including
distinguishing between “stopped” and “starting”), but I think/hope we
can fix this bug without first addressing this issue.
>> Depending on what we end up with, we might also revisit whether
>> xorg-server needs to explicitly depend on elogind.
> At least in the case of GDM I think it does heavily depend on elogind.
> For the future, I think we also should take over dbus-daemon's
> autostart in the same way systemd already has.
Agreed, though that one is trickier: we’d need an implementation of the
D-Bus protocol. There’s guile-ac-d-bus but it’s probably under-tested.
Thanks,
Ludo’.
This bug report was last modified 2 years and 363 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.