From unknown Fri Aug 15 16:19:27 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#44669 <44669@debbugs.gnu.org> To: bug#44669 <44669@debbugs.gnu.org> Subject: Status: Shepherd loses track of elogind Reply-To: bug#44669 <44669@debbugs.gnu.org> Date: Fri, 15 Aug 2025 23:19:27 +0000 retitle 44669 Shepherd loses track of elogind reassign 44669 guix submitter 44669 Marius Bakke severity 44669 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 15 16:51:27 2020 Received: (at submit) by debbugs.gnu.org; 15 Nov 2020 21:51:27 +0000 Received: from localhost ([127.0.0.1]:54420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kePvi-0006vs-S2 for submit@debbugs.gnu.org; Sun, 15 Nov 2020 16:51:27 -0500 Received: from lists.gnu.org ([209.51.188.17]:55702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kePvg-0006vj-Cq for submit@debbugs.gnu.org; Sun, 15 Nov 2020 16:51:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kePvg-0007fG-4f for bug-guix@gnu.org; Sun, 15 Nov 2020 16:51:24 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48754) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kePvf-00063L-Rv for bug-guix@gnu.org; Sun, 15 Nov 2020 16:51:23 -0500 Received: from host-37-191-236-253.lynet.no ([37.191.236.253]:52516 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kePvf-0008CR-Dt for bug-guix@gnu.org; Sun, 15 Nov 2020 16:51:23 -0500 From: Marius Bakke To: bug-guix@gnu.org Subject: Shepherd loses track of elogind Date: Sun, 15 Nov 2020 22:51:17 +0100 Message-ID: <877dqmb86i.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-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello, On a newly-installed i7 system, Shepherd believes that the "elogind" service is not running. Yet there is an 'elogind-daemon' process, spawned by PID 1, preventing subsequent "herd start elogind" invocations from succeeding. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFDBAEBCgAtFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl+xotUPHG1hcml1c0Bn bnUub3JnAAoJEKKgbfKjOlT6LA4H/jx+gakwRXnsuI2tN1PGWURcpLOnnpqKrgCK vk8dFcFRpisBeg3rUSEfpC2EPQrD4mx90mEvZ9wTxhUrLdLrx0pqKnQ0hfowbKf3 OIHkHAD7FF4rmZ+8D76VI3OrLb4iilQ9IMqDyIxEOIVYiTWgJDw5PFLdi6xJdWy0 kHKfxov0otmrejkexJesPz/WgHay7mMaFleFFSdkijVGlIJkZTzNNQMok9zinzHv dlgFhO7w/LgSPslEt9Qd/6zHku0GUkca1MKWJrzcYENKOM6+BrNAMtT/guFGEdqd L0n7FKeVNblAE8yTVkJgseneCg6vDXHsZohrw3ySinqwCoQ7Nlo= =8rPq -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 16 09:58:52 2020 Received: (at 44669) by debbugs.gnu.org; 16 Nov 2020 14:58:52 +0000 Received: from localhost ([127.0.0.1]:56731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kefy0-00060a-AH for submit@debbugs.gnu.org; Mon, 16 Nov 2020 09:58:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kefxw-00060L-FK for 44669@debbugs.gnu.org; Mon, 16 Nov 2020 09:58:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34723) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kefxr-0008P8-4p for 44669@debbugs.gnu.org; Mon, 16 Nov 2020 09:58:43 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48044 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kefxo-0005hb-3a; Mon, 16 Nov 2020 09:58:40 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Marius Bakke Subject: Re: bug#44669: Shepherd loses track of elogind References: <877dqmb86i.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 26 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: Mon, 16 Nov 2020 15:58:38 +0100 In-Reply-To: <877dqmb86i.fsf@gnu.org> (Marius Bakke's message of "Sun, 15 Nov 2020 22:51:17 +0100") Message-ID: <873619wdpd.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-Debbugs-Envelope-To: 44669 Cc: 44669@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Marius, Marius Bakke skribis: > On a newly-installed i7 system, Shepherd believes that the "elogind" > service is not running. Yet there is an 'elogind-daemon' process, > spawned by PID 1, preventing subsequent "herd start elogind" invocations > from succeeding. Could you show the relevant /var/log/messages bits? That should show when/why elogind stopped. That=E2=80=99s from 1.2.0rc1? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 16 12:37:42 2020 Received: (at 44669) by debbugs.gnu.org; 16 Nov 2020 17:37:42 +0000 Received: from localhost ([127.0.0.1]:57091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keiRh-0006wR-Ln for submit@debbugs.gnu.org; Mon, 16 Nov 2020 12:37:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keiRf-0006wE-FM for 44669@debbugs.gnu.org; Mon, 16 Nov 2020 12:37:40 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37654) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keiRZ-0004k8-Pw; Mon, 16 Nov 2020 12:37:33 -0500 Received: from host-37-191-236-253.lynet.no ([37.191.236.253]:33326 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1keiRP-0003iX-C7; Mon, 16 Nov 2020 12:37:24 -0500 From: Marius Bakke To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#44669: Shepherd loses track of elogind In-Reply-To: <873619wdpd.fsf@gnu.org> References: <877dqmb86i.fsf@gnu.org> <873619wdpd.fsf@gnu.org> Date: Mon, 16 Nov 2020 18:37:20 +0100 Message-ID: <87pn4d9p9r.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-Debbugs-Envelope-To: 44669 Cc: 44669@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hi Marius, > > Marius Bakke skribis: > >> On a newly-installed i7 system, Shepherd believes that the "elogind" >> service is not running. Yet there is an 'elogind-daemon' process, >> spawned by PID 1, preventing subsequent "herd start elogind" invocations >> from succeeding. > > Could you show the relevant /var/log/messages bits? That should show > when/why elogind stopped. 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. --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=elogind.log Nov 15 21:16:18 localhost dbus-daemon[427]: [system] Activating service name='org.freedesktop.login1' requested by ':1.2' (uid=0 pid=449 comm="/gnu/store/x577n8rs9zcf6ri4aka4pccyj74qxhwh-sddm-0") (using servicehelper) Nov 15 21:16:18 localhost vmunix: [ 46.137561] elogind-daemon[462]: New seat seat0. Nov 15 21:16:18 localhost vmunix: [ 46.138052] elogind-daemon[462]: Watching system buttons on /dev/input/event2 (Power Button) Nov 15 21:16:18 localhost vmunix: [ 46.193372] elogind-daemon[462]: Watching system buttons on /dev/input/event1 (Lid Switch) Nov 15 21:16:18 localhost vmunix: [ 46.193428] elogind-daemon[462]: Watching system buttons on /dev/input/event0 (Sleep Button) Nov 15 21:16:18 localhost avahi-daemon[444]: Server startup complete. Host name is sirius.local. Local service cookie is 3083842416. Nov 15 21:16:18 localhost vmunix: [ 46.496547] elogind-daemon[462]: Watching system buttons on /dev/input/event3 (AT Translated Set 2 keyboard) Nov 15 21:16:18 localhost vmunix: [ 46.496598] elogind-daemon[462]: Watching system buttons on /dev/input/event4 (ThinkPad Extra Buttons) Nov 15 21:16:18 localhost dbus-daemon[427]: [system] Successfully activated service 'org.freedesktop.login1' Nov 15 21:16:18 localhost vmunix: [ 46.498084] elogind-daemon[462]: New session c1 of user marius. Nov 15 21:16:18 localhost shepherd[1]: Service avahi-daemon has been started. Nov 15 21:16:18 localhost shepherd[1]: Service mcron has been started. Nov 15 21:16:18 localhost shepherd[1]: Service elogind has been started. Nov 15 21:16:18 localhost shepherd[1]: Respawning elogind. --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > That=E2=80=99s from 1.2.0rc1? Yes, and also 'master'. The initial i3 install with 1.2.0rc1 went fine, it was when I switched to SDDM + autologin (+ sway) that it failed. Now I no longer use SDDM (or any DM), but I was able to work around it by adding #:pid-file: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=diff Content-Transfer-Encoding: quoted-printable diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 265cf9f35f..6b7d832a44 100644 =2D-- 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 =2D config))))) + config))) + #:pid-file "/run/systemd/elogind.pid")) (stop #~(make-kill-destructor))))) =20 (define elogind-service-type --=-=-= Content-Type: text/plain The race between D-Bus and elogind should probably be handled by having org.freedesktop.login1 consumers depend on the 'elogind' service instead? --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFDBAEBCgAtFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl+yuNEPHG1hcml1c0Bn bnUub3JnAAoJEKKgbfKjOlT60q4H/R0UqEVOeIlvci9YFDdnViBX4P4/8cryV9Cf tcLFGSqMLg/XFZmeCG9khwZomBROkel4OIK17QKwIg/dfPc3z3zEiDXhE7iV7Oc9 kUDq23k5jbB0WQ4GjPXqyAYC2M9TzO8OtSN4AvMd3p+04zz4ikAYFzJRypXL/fXX JYihU+IYyBMsyOzMeP+QTWpwCxfb/d9Tkmr2LjbO54nGLWt3AXcv3KUPVkLf5i+s GvZGWYn8uma11e4Y6odQYtkBApq+D37GhV9UBKLIawf5n05JbhUNyDQTyuP0lf+F lOE8bTG9cwVzTuy+3vqhpF9nm2XNesnfyI4V6ZDStJLjQl1Xc8E= =ESOy -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 16 12:49:40 2020 Received: (at 44669) by debbugs.gnu.org; 16 Nov 2020 17:49:40 +0000 Received: from localhost ([127.0.0.1]:57105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keidI-0007E4-DB for submit@debbugs.gnu.org; Mon, 16 Nov 2020 12:49:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keidG-0007Dp-6B for 44669@debbugs.gnu.org; Mon, 16 Nov 2020 12:49:38 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37876) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keid9-0000ez-7h; Mon, 16 Nov 2020 12:49:32 -0500 Received: from host-37-191-236-253.lynet.no ([37.191.236.253]:33406 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1keid8-0005Th-Pl; Mon, 16 Nov 2020 12:49:31 -0500 From: Marius Bakke To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#44669: Shepherd loses track of elogind In-Reply-To: <87pn4d9p9r.fsf@gnu.org> References: <877dqmb86i.fsf@gnu.org> <873619wdpd.fsf@gnu.org> <87pn4d9p9r.fsf@gnu.org> Date: Mon, 16 Nov 2020 18:49:28 +0100 Message-ID: <87mtzh9opj.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-Debbugs-Envelope-To: 44669 Cc: 44669@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Marius Bakke writes: > Ludovic Court=C3=A8s writes: > >> Hi Marius, >> >> Marius Bakke skribis: >> >>> On a newly-installed i7 system, Shepherd believes that the "elogind" >>> service is not running. Yet there is an 'elogind-daemon' process, >>> spawned by PID 1, preventing subsequent "herd start elogind" invocations >>> from succeeding. >> >> Could you show the relevant /var/log/messages bits? That should show >> when/why elogind stopped. > > 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. Interestingly I suspected this exact scenario and checked the PPID of the running elogind process, which was '1'. When I then found that adding #:pid-file worked, I did not bother checking the log ... I would have expected D-Bus to be the parent PID. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFDBAEBCgAtFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl+yu6gPHG1hcml1c0Bn bnUub3JnAAoJEKKgbfKjOlT69tUIAKicBE2vtkPeBiOxm1rAQ8sTtGnw0M9gM9sN 50zSpUTBbQcQyz53AXQTq1aldxs+/NaXGJyn8I6x+36D25KwofXBqnubjzqRP2e4 DhU9FWWMfTgUTjAdLHctYoHLC4cyPXr5tf0v43T3pVkxjQht/JApg32I7LShhvSl 5sitWCvhlqHtAfwSjRyPjBk3k0zFQttJzHo5hkB7DtKU73+nQnsQD4xzwIFUGVMl fIC/FYxIaE10YITskfBwlAmJH5nz+oByityqhH4STNbFoau7n4rAvHi47gBdJYjz ysVcdeijeaT2S9tdxRZB7MKqzM8Yqd40JUdOfuw5dfBS/XluFW0= =bw6r -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 17 03:31:48 2020 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: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Marius Bakke Subject: Re: bug#44669: Shepherd loses track of elogind 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-Debbugs-Envelope-To: 44669 Cc: 44669@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 18 16:41:54 2020 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 To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#44669: Shepherd loses track of elogind 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-Debbugs-Envelope-To: 44669-done Cc: 44669-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= 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----- --=-=-=-- From unknown Fri Aug 15 16:19:27 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 17 Dec 2020 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator