GNU bug report logs - #76811
[PATCH] services: nginx: Replace invoke with spawn-command.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Fri, 7 Mar 2025 13:04:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Christopher Baines <mail <at> cbaines.net>
Subject: bug#76811: closed (Re: [bug#76811] [PATCH] services: nginx:
 Replace invoke with spawn-command.)
Date: Fri, 07 Mar 2025 17:19:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#76811: [PATCH] services: nginx: Replace invoke with spawn-command.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 76811 <at> debbugs.gnu.org.

-- 
76811: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76811
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Christopher Baines <mail <at> cbaines.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 76811-close <at> debbugs.gnu.org
Subject: Re: [bug#76811] [PATCH] services: nginx: Replace invoke with
 spawn-command.
Date: Fri, 07 Mar 2025 17:18:52 +0000
[Message part 3 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Christopher Baines <mail <at> cbaines.net> skribis:
>
>> I'm not sure where invoke is coming from here, but it could be from (guix
>> build utils), that uses system* which uses waitpid, which might cause problems
>> with recent versions of the shepherd?
>>
>> At least I'm seeing issues on multiple machines where attempting to restart
>> the nginx service sometimes causes the shepherd to hang.
>>
>> * gnu/services/web.scm (nginx-shepherd-service): Replace invoke with
>> spawn-command.
>>
>> Change-Id: Ie9ce4be9a4df121465b28148612b4fbc45fb5126
>
> Hi!  ‘invoke’ uses ‘system*’, which is an alias for ‘spawn-command’ (see
> ‘replace-core-bindings!’ in ‘shepherd.scm’) so the only effect of this
> patch is that errors from “nginx -c nginx.conf …” would be ignored.

Ah, yes, I see, I've tried to verify this and it does seem that the
nginx server is using this system* replacement.

> I think we need a reproducer for the hang so we can pinpoint the
> problem because it’s a pretty serious bug!

I did try restarting nginx over and over again in the system test os,
but that seemed to work.

On a VM I have though, it only takes a few restarts for it to hang, I'm
not sure why though.
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] services: nginx: Replace invoke with spawn-command.
Date: Fri,  7 Mar 2025 13:02:15 +0000
I'm not sure where invoke is coming from here, but it could be from (guix
build utils), that uses system* which uses waitpid, which might cause problems
with recent versions of the shepherd?

At least I'm seeing issues on multiple machines where attempting to restart
the nginx service sometimes causes the shepherd to hang.

* gnu/services/web.scm (nginx-shepherd-service): Replace invoke with
spawn-command.

Change-Id: Ie9ce4be9a4df121465b28148612b4fbc45fb5126
---
 gnu/services/web.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 7593cd2eaa..b46a4db73f 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -870,7 +870,8 @@ (define (nginx-shepherd-service config)
           (nginx-action
            (lambda args
              #~(lambda _
-                 (invoke #$nginx-binary "-c" #$config-file #$@args)
+                 (spawn-command
+                  (list #$nginx-binary "-c" #$config-file #$@args))
                  (match '#$args
                    (("-s" . _) #t)
                    (_

base-commit: 9bc4c9f521caab8aa8d88aa948a650945bb55838
-- 
2.48.1




This bug report was last modified 123 days ago.

Previous Next


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