From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SGlNJDyVtV8dFwAA0tVLHw (envelope-from ) for ; Wed, 18 Nov 2020 21:42:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 8OUiIDyVtV/BPgAAB5/wlQ (envelope-from ) for ; Wed, 18 Nov 2020 21:42:20 +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 D1DB2940484 for ; Wed, 18 Nov 2020 21:42:19 +0000 (UTC) Received: from localhost ([::1]:37864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfVDW-00008t-PV for larch@yhetil.org; Wed, 18 Nov 2020 16:42:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfVDJ-000066-2G for bug-guix@gnu.org; Wed, 18 Nov 2020 16:42:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53406) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kfVDH-0003O1-5T for bug-guix@gnu.org; Wed, 18 Nov 2020 16:42:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kfVDH-00042N-35 for bug-guix@gnu.org; Wed, 18 Nov 2020 16:42:03 -0500 Subject: bug#44669: Shepherd loses track of elogind Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Date: Wed, 18 Nov 2020 21:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 44669 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Mail-Followup-To: 44669@debbugs.gnu.org, marius@gnu.org, marius@gnu.org Received: via spool by 44669-done@debbugs.gnu.org id=D44669.160573571415486 (code D ref 44669); Wed, 18 Nov 2020 21:42:02 +0000 Received: (at 44669-done) by debbugs.gnu.org; 18 Nov 2020 21:41:54 +0000 Received: from localhost ([127.0.0.1]:36716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfVD7-00041h-NW for submit@debbugs.gnu.org; Wed, 18 Nov 2020 16:41:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfVD5-00041U-Ra for 44669-done@debbugs.gnu.org; Wed, 18 Nov 2020 16:41:52 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34724) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfVD0-0003Mr-HG; Wed, 18 Nov 2020 16:41:46 -0500 Received: from host-37-191-224-14.lynet.no ([37.191.224.14]:40388 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kfVD0-0001MY-3t; Wed, 18 Nov 2020 16:41:46 -0500 From: Marius Bakke In-Reply-To: <87tutotme3.fsf@gnu.org> References: <877dqmb86i.fsf@gnu.org> <873619wdpd.fsf@gnu.org> <87pn4d9p9r.fsf@gnu.org> <87tutotme3.fsf@gnu.org> Date: Wed, 18 Nov 2020 22:41:43 +0100 Message-ID: <87mtzebaw8.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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-done@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: -3.61 X-TUID: wK8nrlyfGG/9 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s skriver: >> 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, the= re=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. Right. If Shepherd actually deletes the PID file before attempting to start the service, I think I just "won" the race in my testing... >> 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 l= et > elogind be bus-activated is so it can handle events like lid close even > before someone has attempted to log in (commit > 94a881178af9a9a918ce6de55641daa245c92e73, > ). Interesting. I wonder what other workarounds there are for this. For now, I made SDDM simply depend on elogind in commit 0ae9bbe4f5f89e6f597bdb1f6df646fc5f504876. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFDBAEBCgAtFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl+1lRcPHG1hcml1c0Bn bnUub3JnAAoJEKKgbfKjOlT6wcAH/Rs0xENFRrMkrW4PZVVI7UL/o9PsGWu4wECh PASaSoOy7aNNFtUsxq9WFKC2WAO2eN0OK0M/jOcCXyGzcP/MqBGZy5rfsklRI8yM QribvZzTMdz/c/2wf2S8UwHE7i181SB6dEo9Zk+kqOjIt4+UyWWBYynLK7D0Q9DS YBJJ7jttUydvuSFEu8z7A/W1x7izhlNBQ8WQndIB8Mtm5bAFn/yaI77HGsJEqpok dBriLnz0mYEEDBFpAJanGniUTruciErEj+hwPSTqyuO6zJP+UOBsELp9S1gDfQwh AA9LC8Cm+rDWdvDCYVlC0wODB0Js3Nrn9IgvLRLE73p7tv/Rn5E= =p6d/ -----END PGP SIGNATURE----- --=-=-=--