GNU bug report logs - #60116
‘herd stop guix-daemon’ doesn’t stop running sessions

Previous Next

Package: guix;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Fri, 16 Dec 2022 11:13:02 UTC

Severity: normal

To reply to this bug, email your comments to 60116 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#60116; Package guix. (Fri, 16 Dec 2022 11:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludo <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 16 Dec 2022 11:13:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: bug-guix <at> gnu.org
Subject: ‘herd stop guix-daemon’ doesn’t stop running sessions
Date: Fri, 16 Dec 2022 12:12:06 +0100
Suppose you run a bunch of clients, ‘guix shell’, ‘guix build’,
whatever.  For each of these connections, guix-daemon creates a child
process to handle it.  (You can see them as “SessionPID” in the output
of ‘guix processes’.)

‘herd stop guix-daemon’ won’t stop these guix-daemon child processes,
only the parent process.

This is because those sub-processes put themselves in a separate process
group by calling ‘setsid’ (see ‘daemonLoop’ in ‘nix-daemon.cc’);
shepherd terminates the whole process group, but that group contains
nothing but the parent guix-daemon process.  I traced back this ‘setsid’
call to 2006 in Nix (Nix commit
0130ef88ea280e67037fa76bcedc59db17d9a8ca), but there’s no justification.

I would be tempted to just remove that ‘setsid’ call, but I wonder if
there’s something subtle I’m overlooking.

Thoughts?

Ludo’.




This bug report was last modified 1 year and 124 days ago.

Previous Next


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