all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Attila Lendvai <attila.lendvai@gmail.com>
To: 67839@debbugs.gnu.org
Cc: Attila Lendvai <attila@lendvai.name>
Subject: bug#67839: [PATCH 2/2] service: Add two asserts that will make tests/replacement.sh fail.
Date: Fri, 15 Dec 2023 20:37:10 +0100	[thread overview]
Message-ID: <20231215193708.25169-4-attila@lendvai.name> (raw)
In-Reply-To: <20231215193708.25169-2-attila@lendvai.name>

* modules/shepherd/service.scm (spawn-service-controller): Add two asserts.
This is the bug that causes `guix system reconfigure ...` to sometimes hang,
and subsequently all shepherd commands, because a match-error flies out from
the service-controller of a replaced service, and thus its fiber dies.
---
 modules/shepherd/service.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index c3bdf44..0ee6929 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -382,9 +382,11 @@ denoting what the service provides."
 
 (define (spawn-service-controller service)
   "Return a channel over which @var{service} may be controlled."
+  (assert (current-process-monitor))
   (let ((channel (make-channel)))
     (spawn-fiber
      (lambda ()
+       (assert (current-process-monitor))
        ;; The controller writes to its current output port via 'local-output'.
        ;; Make sure that goes to the right port.  If the controller got a
        ;; wrong output port, it could crash and stop responding just because a
-- 
2.41.0





  reply	other threads:[~2023-12-15 19:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15 19:20 bug#67839: shepherd: sometimes hangs on `guix system reconfigure` Attila Lendvai
2023-12-15 19:37 ` bug#67839: [PATCH 1/2] shepherd: Move root-service start under with-process-monitor Attila Lendvai
2023-12-15 19:37   ` Attila Lendvai [this message]
2023-12-17  0:06 ` bug#67839: [PATCH 3/2] shepherd: Fix tests/replacement.sh Attila Lendvai
2023-12-17  0:44 ` bug#67839: [PATCH v2 1/2] shepherd: Make sure with-process-monitor covers everything needed Attila Lendvai
2023-12-17  0:44   ` bug#67839: [PATCH v2 2/2] service: Add asserts that used to make tests/replacement.sh fail Attila Lendvai
2023-12-17 21:59   ` bug#67839: shepherd: sometimes hangs on `guix system reconfigure` 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=20231215193708.25169-4-attila@lendvai.name \
    --to=attila.lendvai@gmail.com \
    --cc=67839@debbugs.gnu.org \
    --cc=attila@lendvai.name \
    /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.