Subject: bug#63190: [Shepherd] Nested calls lead to a hang

From: Ludovic Courtès <[email-masked]>
Date: Mon, 08 May 2023 12:27:20 +0200

Ludovic Courtès <[email-masked]> skribis:

> Bruno Victal <[email-masked]> skribis:
>
>> Original discussion (IRC): <https://logs.guix.gnu.org/guix/2023-04-29.log#180735>
>
> [...]
>
>>               (procedure
>>                #~(lambda (x)
>>                    ;; Scenario 1: using code from (gnu services herd), this hangs shepherd
>>                    #;(start-service 'dummy)  ; hangs shepherd
>
> (gnu services herd) provides a client to talk to the shepherd process.
> However, the code of actions runs in the shepherd process itself, so
> there’s no need to use the client library.  Don’t do that.  :-)

Also, the socket created in (gnu services herd) lacks SOCK_NONBLOCK so
the code above is bound to block forever.

Ludo’.