GNU bug report logs - #67839
shepherd: sometimes hangs on `guix system reconfigure`

Previous Next

Package: guix;

Reported by: Attila Lendvai <attila <at> lendvai.name>

Date: Fri, 15 Dec 2023 19:22:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 67839 <at> debbugs.gnu.org (full text, mbox):

From: Attila Lendvai <attila.lendvai <at> gmail.com>
To: 67839 <at> debbugs.gnu.org
Cc: Attila Lendvai <attila <at> lendvai.name>
Subject: [PATCH 2/2] service: Add two asserts that will make
 tests/replacement.sh fail.
Date: Fri, 15 Dec 2023 20:37:10 +0100
* 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





This bug report was last modified 1 year and 207 days ago.

Previous Next


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