From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8EuaM9NSnGNJXwEAbAwnHQ (envelope-from ) for ; Fri, 16 Dec 2022 12:13:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YMbOMtNSnGN7zQAAG6o9tA (envelope-from ) for ; Fri, 16 Dec 2022 12:13:23 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8D383F949 for ; Fri, 16 Dec 2022 12:13:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p68eG-0007Xl-Ia; Fri, 16 Dec 2022 06:13:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p68eF-0007XT-1v for bug-guix@gnu.org; Fri, 16 Dec 2022 06:13:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p68eE-0003DK-Qt for bug-guix@gnu.org; Fri, 16 Dec 2022 06:13:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p68eE-0007UO-8o for bug-guix@gnu.org; Fri, 16 Dec 2022 06:13:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#60116: =?UTF-8?Q?=E2=80=98herd?= stop =?UTF-8?Q?guix-daemon=E2=80=99_?= =?UTF-8?Q?doesn=E2=80=99t?= stop running sessions Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 16 Dec 2022 11:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60116 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 60116@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167118913328768 (code B ref -1); Fri, 16 Dec 2022 11:13:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Dec 2022 11:12:13 +0000 Received: from localhost ([127.0.0.1]:48629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p68dQ-0007Tw-Mf for submit@debbugs.gnu.org; Fri, 16 Dec 2022 06:12:12 -0500 Received: from lists.gnu.org ([209.51.188.17]:33104) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p68dO-0007Tq-UF for submit@debbugs.gnu.org; Fri, 16 Dec 2022 06:12:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p68dO-0007KE-JR for bug-guix@gnu.org; Fri, 16 Dec 2022 06:12:10 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p68dN-00037J-UF for bug-guix@gnu.org; Fri, 16 Dec 2022 06:12:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=hn2SF5RFI4KpSDWGuAvdajT4MGZ2l6QGIouaktQD1+w=; b=IqouMwgin3wNSY Mf/ihAhVmEnt6pwBJsx8LkblOiUKyXesRt6fEJKprasA91rJBKIKg9d2WQHn1w6nuuMkGq37bUhqU nefOJUOjDrUywJ0S/84c51eSKvNVB/i8f4sXShMBSZPjtI2BIhnOQPOTG8BPP21p7AnEfT0vNtYrG InKzmMEuLxWK6QMmpqfYI/fgx+Gs8rA+HzDormh304v+IxIa8lsE1PvK8OixQTOdUDvDUnq16l1be ExHW96rkuoybmH2xwY63dQqhQKD2xiqyEZZ1Fp2SJ2iAQYrICHpQGoce2aEPwS1pBnl5c9D9UxQgt S8HSzxxpyH1DHn+I/5Ug==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p68dN-00043C-4Y for bug-guix@gnu.org; Fri, 16 Dec 2022 06:12:09 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Sextidi 26 Frimaire an 231 de la =?UTF-8?Q?R=C3=A9volution, ?= jour du Pignon X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 16 Dec 2022 12:12:06 +0100 Message-ID: <877cyrk3g9.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671189203; a=rsa-sha256; cv=none; b=FuCy9BrpGYtRyyPsxBrjSFg6aFDDDwywjIsb2hucy8RpX4lUoIXQvhjs0BzdgX1UaAEL8E zwsge5CC+PC/B2Qv4l/82qgfwbVlbAXAmL/yyoC91+6FJBuGo6dalvVp/MnEVvnXYGknmX toWvDLlB1NGyO5VE6iFqUO6P8rZpg54o2ajxZmGlVmmAAocUcQiviK5y3yygVVhOonbYEZ 2pyx0teUjgRcmHw00pSWmYwVARyTgOi6y50DUfTUnbHVoO4bysQRrdKxNtCoG0A16FbPvL RdL7chaAEIDYcQV0O0yB1LXvxp0Ubo9zqLwUwM3fnIxhrE9dJ+1tGX7X+KQPvg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=IqouMwgi; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671189203; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=hn2SF5RFI4KpSDWGuAvdajT4MGZ2l6QGIouaktQD1+w=; b=Y+RNNNvo2eibACFrImEnds21JBJbNxedQsrhCZAuihDm0nkI8rltR2SZ90+78fidXRpnM8 sLQd+gGI5qb9X5+sBltEgdFigww6Jn79x8ESxU8lizsWcGr4d0OnxX7vjmO8iSL6xJIpqp Q31Wa3I2P5nnk22zjPM92uR1npWQCo4TZFyJ8KKk7DeW2oCivQb3EC8LK5msdU03OHdO3x wMgjjQ7xxbNTFnZ6eaISR8knE1yuR6cp7igJ/ENSD0MWgFsV1L11VtHqJktBFU81Qtnhre n20UlqVVVyIXq2bHPvWhA4GpRwpFkgGl0P5kE6BnOD0B1N0l1ORAQsT/ssCG/w== X-Migadu-Spam-Score: -3.87 X-Spam-Score: -3.87 X-Migadu-Queue-Id: 8D383F949 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=IqouMwgi; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn1.migadu.com X-TUID: HGF7ciLvfsZe Suppose you run a bunch of clients, =E2=80=98guix shell=E2=80=99, =E2=80=98= guix build=E2=80=99, whatever. For each of these connections, guix-daemon creates a child process to handle it. (You can see them as =E2=80=9CSessionPID=E2=80=9D in= the output of =E2=80=98guix processes=E2=80=99.) =E2=80=98herd stop guix-daemon=E2=80=99 won=E2=80=99t stop these guix-daemo= n child processes, only the parent process. This is because those sub-processes put themselves in a separate process group by calling =E2=80=98setsid=E2=80=99 (see =E2=80=98daemonLoop=E2=80=99= in =E2=80=98nix-daemon.cc=E2=80=99); shepherd terminates the whole process group, but that group contains nothing but the parent guix-daemon process. I traced back this =E2=80=98se= tsid=E2=80=99 call to 2006 in Nix (Nix commit 0130ef88ea280e67037fa76bcedc59db17d9a8ca), but there=E2=80=99s no justifica= tion. I would be tempted to just remove that =E2=80=98setsid=E2=80=99 call, but I= wonder if there=E2=80=99s something subtle I=E2=80=99m overlooking. Thoughts? Ludo=E2=80=99.