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


View this message in rfc822 format

From: Attila Lendvai <attila.lendvai <at> gmail.com>
To: 67839 <at> debbugs.gnu.org
Cc: Attila Lendvai <attila <at> lendvai.name>
Subject: bug#67839: [PATCH v2 1/2] shepherd: Make sure with-process-monitor covers everything needed.
Date: Sun, 17 Dec 2023 01:44:24 +0100
* modules/shepherd.scm (main): Switch with-service-registry and
with-process-monitor.  This way the parameterize of the process monitor covers
everything else.  This fixes the bug that caused `guix system reconfigure` to
hang in certain situations.  Fix proposed by @emixa-d at:
https://github.com/wingo/fibers/issues/29#issuecomment-1858922276.
---
 modules/shepherd.scm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/shepherd.scm b/modules/shepherd.scm
index efc5517..3303de3 100644
--- a/modules/shepherd.scm
+++ b/modules/shepherd.scm
@@ -450,13 +450,13 @@ fork in the child process."
         ;; because POSIX threads and 'fork' cannot be used together.
         (run-fibers
          (lambda ()
-           (with-service-registry
+           (with-process-monitor
+             (with-service-registry
 
-             ;; Register and start the 'root' service.
-             (register-services (list root-service))
-             (start-service root-service)
+               ;; Register and start the 'root' service.
+               (register-services (list root-service))
+               (start-service root-service)
 
-             (with-process-monitor
                ;; Replace the default 'system*' binding with one that
                ;; cooperates instead of blocking on 'waitpid'.  Replace
                ;; 'primitive-load' (in C as of 3.0.9) with one that does
-- 
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.