unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 39708@debbugs.gnu.org
Subject: bug#39708: nfs-service-type broken: rpc.mountd respawns too quickly
Date: Sun, 08 Mar 2020 00:39:57 -0500	[thread overview]
Message-ID: <87lfob5rrm.fsf@gmail.com> (raw)
In-Reply-To: <87a75azxu2.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 22 Feb 2020 12:05:25 +0100")


[-- Attachment #1.1: Type: text/plain, Size: 991 bytes --]

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

> Hi,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> The rpc.mountd service, one of the required services for
>> nfs-service-type, respawns the process quickly until disabled.
>
> Does /var/log/messages contain hints?  Is rpc.statd running?
> Could it be that all these services need to depend on ‘loopback’?
>
> No answers, but a lot of questions.  :-)
>
> Ludo’.

OK, I've managed to find the problem.  rpc.mountd daemonizes itself upon
starting by default, which is not supported by Shepherd (at least not
its `make-forkexec-constructor' procedure).  I had to pass the
'--foreground' option to workaround this limitation (c.f.: commit
5fdc5b2d57d2e7ab04dbaf9c85e7f34eebe81495).

It'd be interesting to see what systemd does when a service is hinted as
forking in its configuration file.  We should also document that
limitation in the Shepherd info manual (see attached patch for
Shepherd).

Maxim

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-doc-Note-that-make-forkexec-constructor-requires-a-n.patch --]
[-- Type: text/x-patch, Size: 1970 bytes --]

From 8f84ce9abe12b49340befbeee663896d226bb869 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sun, 8 Mar 2020 00:34:36 -0500
Subject: [PATCH] doc: Note that make-forkexec-constructor requires a
 non-forking process.

This merits to be documented as it can be confusing, as demonstrated by
<https://bugs.gnu.org/39708>.
---
 doc/shepherd.texi | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/doc/shepherd.texi b/doc/shepherd.texi
index fbd1a3f..a0ac11b 100644
--- a/doc/shepherd.texi
+++ b/doc/shepherd.texi
@@ -898,12 +898,14 @@ execution of the @var{command} was successful, @code{#t} if not.
   [#:directory (default-service-directory)] @
   [#:environment-variables (default-environment-variables)]
 Return a procedure that forks a child process, closes all file
-descriptors except the standard output and standard error descriptors, sets
-the current directory to @var{directory}, changes the environment to
-@var{environment-variables} (using the @code{environ} procedure), sets the
-current user to @var{user} and the current group to @var{group} unless they
-are @code{#f}, and executes @var{command} (a list of strings.)  The result of
-the procedure will be the PID of the child process.
+descriptors except the standard output and standard error descriptors,
+sets the current directory to @var{directory}, changes the environment
+to @var{environment-variables} (using the @code{environ} procedure),
+sets the current user to @var{user} and the current group to @var{group}
+unless they are @code{#f}, and executes @var{command} (a list of
+strings.)  The result of the procedure will be the PID of the child
+process.  The child process must not fork (daemonize) itself for this to
+work correctly.
 
 When @var{pid-file} is true, it must be the name of a PID file
 associated with the process being launched; the return value is the PID
-- 
2.25.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2020-03-08  5:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-21  3:58 bug#39708: nfs-service-type broken: rpc.mountd respawns too quickly Maxim Cournoyer
2020-02-22 11:05 ` Ludovic Courtès
2020-03-08  3:19   ` Maxim Cournoyer
2020-03-08  3:41   ` Maxim Cournoyer
2020-03-08  4:03     ` Maxim Cournoyer
2020-03-08  4:27       ` Maxim Cournoyer
2020-03-08 11:13       ` Ludovic Courtès
2020-03-08 14:37         ` Maxim Cournoyer
2020-03-08 14:43           ` Ludovic Courtès
2020-03-08 16:59             ` Ricardo Wurmus
2020-03-08 17:29               ` Maxim Cournoyer
2020-03-08  5:39   ` Maxim Cournoyer [this message]
2020-03-08 11:21     ` 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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87lfob5rrm.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=39708@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).