GNU bug report logs -
#77373
[shepherd] Deadlock between service-controller and service-builtin-logger
Previous Next
Reported by: nathan <nathan_mail <at> nborghese.com>
Date: Sat, 29 Mar 2025 23:42:02 UTC
Severity: normal
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 77373 <at> debbugs.gnu.org (full text, mbox):
Hi nathan,
nathan <nathan_mail <at> nborghese.com> skribis:
> I definitely have a deadlock problem with Shepherd and I do believe I've found it.
> shepherd 1.0.3
Could you explain exactly how that happens (sequence of actions leading
to the deadlock) and share the relevant /var/log/messages excerpt?
> This is in service-controller when the service has been stopped:
> (when logger
> (put-message logger 'terminate))
> But in service-builtin-logger, this is called every time a line is read:
> (or pid
> (and service
> (eq? 'running (service-status service))
> (match (service-running-value service)
> ((? process? process)
> (process-id process))
> (value
> value))))
>
> service-status -> service-control-message -> put-message to the service
> The fibers documentation says put-message is blocking. Surely this is a deadlock.
Yes, but only if ‘pid’ hasn’t been cached before, which I think would
mean that not a single line was logged before stopping the service.
I’ll take a closer look.
Thanks for reporting it and for investigating!
Ludo’.
This bug report was last modified 102 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.