all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Brian Cully via Bug reports for GNU Guix <bug-guix@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 63190@debbugs.gnu.org, Bruno Victal <mirai@makinata.eu>
Subject: bug#63190: [Shepherd] Nested calls lead to a hang
Date: Fri, 12 May 2023 19:01:08 -0400	[thread overview]
Message-ID: <87h6shduaw.fsf@psyduck.jhoto.kublai.com> (raw)
In-Reply-To: <87wn1lid69.fsf@gnu.org>


Ludovic Courtès <ludo@gnu.org> writes:

> (Whether that leads to a deadlock depends; at first sight, I’d 
> say
> there’s no reason for this to deadlock in general, but you can 
> of course
> end up with a logic bug like A starts B, which spawns a client 
> to start
> A, which doesn’t start because it’s waiting for B.)

It's been a while since I looked at this, but my rough 
recollection is the deadlock occurs because shepherd can only 
process one request over its socket at a time. If that request 
happens to *also* try to talk over the same socket, it'll hang 
indefinitely waiting for its turn to come off the accept queue.

I'm not sure there's much to be done in the 0.9 version of 
shepherd about it. I'm hoping that 0.10 and up will be able to 
cope with situations like this without completely deadlocking the 
shepherd itself. It's obviously pretty bad if pid 1 hangs for any 
reason at all, even user error.

-bjc




  parent reply	other threads:[~2023-05-12 23:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-30 15:21 bug#63190: [Shepherd] Nested calls lead to a hang Bruno Victal
2023-05-06 17:26 ` Ludovic Courtès
2023-05-08 10:27   ` Ludovic Courtès
2023-05-12 23:01   ` Brian Cully via Bug reports for GNU Guix [this message]
2023-05-13  9:45     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h6shduaw.fsf@psyduck.jhoto.kublai.com \
    --to=bug-guix@gnu.org \
    --cc=63190@debbugs.gnu.org \
    --cc=bjc@spork.org \
    --cc=ludo@gnu.org \
    --cc=mirai@makinata.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.