From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id cKPgOIqKs18zTwAA0tVLHw (envelope-from ) for ; Tue, 17 Nov 2020 08:32:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id gMG7NIqKs19XXgAAbx9fmQ (envelope-from ) for ; Tue, 17 Nov 2020 08:32:10 +0000 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 6B41C940118 for ; Tue, 17 Nov 2020 08:32:10 +0000 (UTC) Received: from localhost ([::1]:45256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kewPI-0004wv-Ro for larch@yhetil.org; Tue, 17 Nov 2020 03:32:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kewPC-0004wo-Fe for bug-guix@gnu.org; Tue, 17 Nov 2020 03:32:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46676) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kewPB-0006Wk-TX for bug-guix@gnu.org; Tue, 17 Nov 2020 03:32:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kewPB-0001uV-OC for bug-guix@gnu.org; Tue, 17 Nov 2020 03:32:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#44669: Shepherd loses track of elogind Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 17 Nov 2020 08:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44669 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Marius Bakke Received: via spool by 44669-submit@debbugs.gnu.org id=B44669.16056019087321 (code B ref 44669); Tue, 17 Nov 2020 08:32:01 +0000 Received: (at 44669) by debbugs.gnu.org; 17 Nov 2020 08:31:48 +0000 Received: from localhost ([127.0.0.1]:58222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kewOx-0001u1-QI for submit@debbugs.gnu.org; Tue, 17 Nov 2020 03:31:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kewOs-0001ti-P0 for 44669@debbugs.gnu.org; Tue, 17 Nov 2020 03:31:46 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50428) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kewOn-0006OW-HA for 44669@debbugs.gnu.org; Tue, 17 Nov 2020 03:31:37 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53882 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kewOl-0007Wy-UQ; Tue, 17 Nov 2020 03:31:36 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <877dqmb86i.fsf@gnu.org> <873619wdpd.fsf@gnu.org> <87pn4d9p9r.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 27 Brumaire an 229 de la =?UTF-8?Q?R=C3=A9volution?= 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: Tue, 17 Nov 2020 09:31:32 +0100 In-Reply-To: <87pn4d9p9r.fsf@gnu.org> (Marius Bakke's message of "Mon, 16 Nov 2020 18:37:20 +0100") Message-ID: <87tutotme3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 44669@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -1.51 X-TUID: JHdJGKTNyjyc Hi! Marius Bakke skribis: > Indeed. It was because I had 'sddm-service-type' configured, which > attempted to communicate with "org.freedesktop.login1" over D-Bus, which > in turn autostarted elogind before shepherd had gotten around to it. Oh. > Now I no longer use SDDM (or any DM), but I was able to work around it > by adding #:pid-file: > > diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm > index 265cf9f35f..6b7d832a44 100644 > --- a/gnu/services/desktop.scm > +++ b/gnu/services/desktop.scm > @@ -770,7 +770,8 @@ seats.)" > #:environment-variables > (list (string-append "ELOGIND_CONF_FILE=3D" > #$(elogind-configuration-file > - config))))) > + config))) > + #:pid-file "/run/systemd/elogind.pid")) > (stop #~(make-kill-destructor))))) LGTM. Now, if elogind is started behind the shepherd=E2=80=99s back, there= =E2=80=99s still a race: shepherd removes the PID file before spawning the process, and then waits for that PID file to show up. Chances are shepherd will not notice that another elogind is already running, and thus the service will fail to start. > The race between D-Bus and elogind should probably be handled by having > org.freedesktop.login1 consumers depend on the 'elogind' service instead? Yes, we could do that. Note that the only reason we just don=E2=80=99t let elogind be bus-activated is so it can handle events like lid close even before someone has attempted to log in (commit 94a881178af9a9a918ce6de55641daa245c92e73, ). Thanks, Ludo=E2=80=99.