From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 4MvnJWEjjmIQCAAAbAwnHQ (envelope-from ) for ; Wed, 25 May 2022 14:38:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id WE+6JWEjjmIoVwEA9RJhRA (envelope-from ) for ; Wed, 25 May 2022 14:38:57 +0200 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 393822D4FA for ; Wed, 25 May 2022 14:38:57 +0200 (CEST) Received: from localhost ([::1]:36254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntqHv-0005WA-Qu for larch@yhetil.org; Wed, 25 May 2022 08:38:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntq6Q-0006VS-Q1 for bug-guix@gnu.org; Wed, 25 May 2022 08:27:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntq6Q-0006CC-GO for bug-guix@gnu.org; Wed, 25 May 2022 08:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ntq6Q-0000kR-8G for bug-guix@gnu.org; Wed, 25 May 2022 08:27:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#55444: elogind startup race between shepherd and dbus-daemon Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 25 May 2022 12:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55444 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Liliana Marie Prikler Cc: 55444@debbugs.gnu.org Received: via spool by 55444-submit@debbugs.gnu.org id=B55444.16534815922831 (code B ref 55444); Wed, 25 May 2022 12:27:02 +0000 Received: (at 55444) by debbugs.gnu.org; 25 May 2022 12:26:32 +0000 Received: from localhost ([127.0.0.1]:54571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntq5w-0000ja-4z for submit@debbugs.gnu.org; Wed, 25 May 2022 08:26:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntq5o-0000jF-Jg for 55444@debbugs.gnu.org; Wed, 25 May 2022 08:26:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60164) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntq5i-00062q-1H; Wed, 25 May 2022 08:26:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=KJKP7UiqU8UzaVkabqZ9zVaZVPw9ql4C+NfB/YmjN8c=; b=rdww5oFwX+vCaBSclSUh 8RSQFUP5UnFNUOi4454e6kv0S+yCL5mJbiydJLUUynRnzbqR0vDaJtIy5QTpbgbQy/QEVYpg7Kz0l zQE52AKzdvQ1t5Hd7H7TuLS2ljGTKTqZDthpBVPAXG0qix8Hv4r0Yr/yKXzR9/MWcZQipW8tOAJRg 54hNmZ+HyUJjlGN0Kxlkop9ZEWOlKUwA4PWb9ODNOWKwmzA8HTqfrfYj8tO5bH9k4nG88j7M06M1s pSQlEyUvv6x03Lef9FD48us9NwUskQxt3zPsBvtShv8ulNB01WDtDftHqaa13rXO/vGzBdX2KW6iA VJBYBHLQNsV19g==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=47620 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntq5f-0003QG-Cr; Wed, 25 May 2022 08:26:17 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <877d6lc28o.fsf@inria.fr> <5a8b5f20da2676e03c696e33c029895292ed397e.camel@gmail.com> Date: Wed, 25 May 2022 14:26:13 +0200 In-Reply-To: <5a8b5f20da2676e03c696e33c029895292ed397e.camel@gmail.com> (Liliana Marie Prikler's message of "Tue, 24 May 2022 21:25:57 +0200") Message-ID: <87zgj5hk7u.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653482337; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=KJKP7UiqU8UzaVkabqZ9zVaZVPw9ql4C+NfB/YmjN8c=; b=XYsLxEOCVb5uy6N/2p0D50pGBasEahd9AwP0i3ZHMsWnHWJ1bp5jXxcS83SWTcSv+MmbUU BOJLO8bYX0f8LWk5jmLjv61OcS+VEPOcBTCzKCQuikXt/Za3d7Zs5BAjRAMUvln0ZJGDZ6 hTL6hJmd1UAYP4v0SLVtuNIE3an7XqodeOhafJgca9eGl5nVJZldBV4ZO7UTc7rqNWm1z3 mYx/GfFmtpZqzFmj8DMw38F2OmWglTD7A5nA1AXzI+71cK0VBfCQNF8udZ79vy0w3ch5Ct XKKGSWQyRwK/9fdBIbuEfvh0m3LiOTE2lbRsYynAu7YismgIHoMi67IzeNrxyQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653482337; a=rsa-sha256; cv=none; b=WhDkmoqtRjwX7dEitAT6GQ5C6kfnSFSVIaLrsPQ90TKuMBbszJz1vNJFGrpuji7y+rhNyI D/iIOJeQCi84/FQWD20eGsWxRPxZK+MIiOGDMpmraV24I2p8wcfBEMqFBGkGYjKflXca9Q MVgPRrd15nV9JmqZ1mBXdNVM73Xts5HjxUyiQsMG8jGa9aug2FEthVDvd7/FDfaxXIxBGj /IKT+FtBENemE3LHJN/Awhr3lCvpcZgdeopRajO4KETEf+kv9YswrTJt5Bect3+09ei2Ij uMv77OcQeoy2QURdHQFtGbjGCaE2UmtjZCPC+hF9IKOHMkmjEKD4++5SKt8gqg== 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=rdww5oFw; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -2.44 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=rdww5oFw; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: 393822D4FA X-Spam-Score: -2.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3tAN2+pUEmSG Hi, Liliana Marie Prikler skribis: > Am Montag, dem 16.05.2022 um 10:26 +0200 schrieb Ludovic Court=C3=A8s: >> [...] >> So it would seem that the solution to this is to prevent dbus-daemon >> from starting elogind.=C2=A0 We can do that by changing >> org.freedesktop.login1.service so that it has =E2=80=9CExec=3Dtrue=E2=80= =9D instead of >> =E2=80=9CExec=3Delogind --daemon=E2=80=9D. >>=20 >> =E2=80=9CExec=3Dtrue=E2=80=9D is a bit crude because it doesn=E2=80=99t = guarantee that elogind >> is really started; if that isn=E2=80=99t good enough, we could instead w= ait >> for the PID file or something (as of Shepherd 0.9.0, invoking =E2=80=98h= erd >> start elogind=E2=80=99 potentially leads shepherd to start a second inst= ance >> if the first one is still being started, so we can=E2=80=99t really do t= hat). > Why does shepherd race with itself here? That sounds like a very evil > bug. Rather than waiting for a log file, I'd suggest writing an ad-hoc > Guile script that communicates with shepherd and blocks until shepherd > signals that elogind has been started, but this script too would have > to work around shepherd racing against itself. Right. Currently services have two states: stopped, and started. Fixing that needs non-trivial changes to how shepherd handles state. We=E2=80=99ll have to do that (the way I see it, we=E2=80=99ll move state o= ut of and have a fiber explicitly handle state, including distinguishing between =E2=80=9Cstopped=E2=80=9D and =E2=80=9Cstarting=E2= =80=9D), but I think/hope we can fix this bug without first addressing this issue. >> Depending on what we end up with, we might also revisit whether >> xorg-server needs to explicitly depend on elogind. > At least in the case of GDM I think it does heavily depend on elogind. > For the future, I think we also should take over dbus-daemon's > autostart in the same way systemd already has. Agreed, though that one is trickier: we=E2=80=99d need an implementation of= the D-Bus protocol. There=E2=80=99s guile-ac-d-bus but it=E2=80=99s probably u= nder-tested. Thanks, Ludo=E2=80=99.