From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Cournoyer Subject: bug#39708: nfs-service-type broken: rpc.mountd respawns too quickly Date: Sun, 08 Mar 2020 00:39:57 -0500 Message-ID: <87lfob5rrm.fsf@gmail.com> References: <878skw382o.fsf@apteryx.i-did-not-set--mail-host-address--so-tickle-me> <87a75azxu2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34925) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAogS-0004cR-Hg for bug-guix@gnu.org; Sun, 08 Mar 2020 00:41:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAogR-0003TZ-71 for bug-guix@gnu.org; Sun, 08 Mar 2020 00:41:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41864) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jAogR-0003TJ-46 for bug-guix@gnu.org; Sun, 08 Mar 2020 00:41:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jAogQ-0002KT-B7 for bug-guix@gnu.org; Sun, 08 Mar 2020 00:41:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: 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") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 39708@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer 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 =E2=80=98loopback= =E2=80=99? > > No answers, but a lot of questions. :-) > > Ludo=E2=80=99. 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-doc-Note-that-make-forkexec-constructor-requires-a-n.patch Content-Transfer-Encoding: quoted-printable From=208f84ce9abe12b49340befbeee663896d226bb869 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer 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 . =2D-- 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 =2D-- 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 =2Ddescriptors except the standard output and standard error descriptors, s= ets =2Dthe current directory to @var{directory}, changes the environment to =2D@var{environment-variables} (using the @code{environ} procedure), sets t= he =2Dcurrent user to @var{user} and the current group to @var{group} unless t= hey =2Dare @code{#f}, and executes @var{command} (a list of strings.) The resu= lt of =2Dthe 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. =20 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 =2D-=20 2.25.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJ9WGpPiQCFQyn/CfEmDkZILmNWIFAl5khS0ACgkQEmDkZILm NWKSjg/+OSOi86h/1XLQr1966cJyPlapn/lr7Ay9utocr81DgfDeGvDz4gu+MHrw KCbz+abitj+PI4Iaau4nXda3FPRvNlVouX6kPZnmoQKf5Zv/yjPtQi1U/vTepUR6 wLQwpq90c2rh4Qkp0mkRwkutHg8il1LpqguAHIHW+VkRIHDKT2bt+kJgV4/lapF+ 3q5qXGzxBEhrAqlcYeVT+uRb7s/+nFNA8Dl17xNUvcQA6MBC2D1sPa/1xY4etDmL iwVjPNRM+8o2JtXeZ3qZ5BRGpvoy+jRi6xO7UgyOv1VOGRnmCAhtaDB7OFl5lB3/ FlsAaNlaXpnTMbNK9NT0XmbZhcuZ/x38kf1Wztys8c8HS316F6fVPbdu2iJHNrWZ sdyMnw9gNsIyBKY+ERBx5f1bDJn/uYLdQnQ0lu9bX6RZhIRTJ2awuqRNJz9B9pyx jKEcViZn8yIYcEu2hNt5Xo/h8jKUKmHmjhz77XtQAZzPuXiHZNVCjyi6H0oIS9qb 5Hnq7pUk49sq3HUTpQwujmf42TZoGtYTFcGzbbaidChlXB8FQwGD31rHC0RGEpo6 ru7bQ8hwSJG3SHppDFyiMMcf/NrgMzJhZ01v7QKGfNXSa+c2COtME6o17cmfi8KU 6wf6nptwO/c9cYhtwxOY8XWGpG2NTL5T8YunZ0f35VeDMVrXcc8= =OrFL -----END PGP SIGNATURE----- --==-=-=--