GNU bug report logs - #77373
[shepherd] Deadlock between service-controller and service-builtin-logger

Previous Next

Package: guix;

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


View this message in rfc822 format

From: nathan <nathan_mail <at> nborghese.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 77373 <at> debbugs.gnu.org
Subject: bug#77373: [shepherd] Deadlock between service-controller and service-builtin-logger
Date: Sat, 5 Apr 2025 17:08:23 +0000
looks good to me and works. thanks

On 3/30/25 4:44 PM, Ludovic Courtès wrote:
> Hey,
> 
> nathan <nathan_mail <at> nborghese.com> skribis:
> 
>> happy sunday
>>
>>> 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.
>>
>> doesn't get cached if no output is read while service is 'running.
>> fork+exec-command: if the pid-file doesnt show up immediately, there is an entire 1 second sleep. The logger can easily read the output while the service is still in 'starting
>> also: if the service doesn't flush stdout, we dont get its output until it dies. ('stopping)
>>
>>> Could you explain exactly how that happens (sequence of actions leading
>>> to the deadlock) and share the relevant /var/log/messages excerpt?
>>
>> ./shepherd --socket /tmp/s2/mysocket --config <path>
> 
> Yup, I see.
> 
> I believe a5d9a41aa0bfadea9617df4411b86c6ea0c525bd fixes it.  I added a
> test case that’s similar to what you have: the service only starts
> logging when being stopped, which makes it very likely that the logger
> will receive lines of log after the service has terminated.  It would
> trigger the deadlock 100% of the time.
> 
> Let me know what you think.
> 
> Thanks a lot!
> 
> Ludo’.




This bug report was last modified 100 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.