From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ABQkMWXqUGPP4gAAbAwnHQ (envelope-from ) for ; Thu, 20 Oct 2022 08:27:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id yMI5MWXqUGPCwwAA9RJhRA (envelope-from ) for ; Thu, 20 Oct 2022 08:27:49 +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 3546E610F for ; Thu, 20 Oct 2022 08:27:49 +0200 (CEST) Received: from localhost ([::1]:54492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olP1w-0007Fy-5I for larch@yhetil.org; Thu, 20 Oct 2022 02:27:48 -0400 Received: from [::1] (port=59516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olOww-0005ZH-Gx for larch@yhetil.org; Thu, 20 Oct 2022 02:22:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olOvP-0005UY-1T for bug-guix@gnu.org; Thu, 20 Oct 2022 02:21:15 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33653) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olOvO-000254-QX for bug-guix@gnu.org; Thu, 20 Oct 2022 02:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1olOvO-0002Uk-9s for bug-guix@gnu.org; Thu, 20 Oct 2022 02:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#57844: Shepherd fails to start in user session ~50% of the time References: <871qscaz6c.fsf@ryuslash.org> In-Reply-To: <871qscaz6c.fsf@ryuslash.org> Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 20 Oct 2022 06:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57844 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tom Willemse Cc: 57844@debbugs.gnu.org Received: via spool by 57844-submit@debbugs.gnu.org id=B57844.16662468329541 (code B ref 57844); Thu, 20 Oct 2022 06:21:02 +0000 Received: (at 57844) by debbugs.gnu.org; 20 Oct 2022 06:20:32 +0000 Received: from localhost ([127.0.0.1]:60964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olOus-0002Tj-0f for submit@debbugs.gnu.org; Thu, 20 Oct 2022 02:20:32 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:34547) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olOum-0002TE-OC for 57844@debbugs.gnu.org; Thu, 20 Oct 2022 02:20:28 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 063D41C0005; Thu, 20 Oct 2022 06:20:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1666246819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=wDlw0A1K1V2qG8rP3AX+Q+XK3HaNvZxyg5reA+HgAIQ=; b=HFnMvYDaDjbTpLO7GPn6AJQ2eDjGqvW9ewi4mtJq8VEKbQg32qnOKSZMb9CSgPb3jzk76y Jm9BP2P1wrkME7ot4G6hbTW6YTCXwC1HLxwF4Ah+kPlDbvyXjiIwrJJ7qcFjGK1EseRckt V5a4NRWsJCBM81dmmgbvJMx/Vvc+tkJbw4iV+2ep9hIIkTNGYEbcU/K3kk3jqiM8qpDMUM zWYvOXK0cR2Vp503r0+7hnxcfJobPbF7VgQXBFKzJLBSWN/DV/WS0X35Ke8XPUh40O6gDo 0XWafFyznDp3fSlndxoPS/kRBCE+2VQrDO3PpkSO5yiu4lLS13JmHBmKObkqxw== From: Andrew Tropin Date: Thu, 20 Oct 2022 10:20:11 +0400 Message-ID: <87a65rf23o.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666247269; 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: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=wDlw0A1K1V2qG8rP3AX+Q+XK3HaNvZxyg5reA+HgAIQ=; b=D8nfUQuoOXItlxRVe6OOBGnTgAWmtTtWdU2WljofT/E01lqYkg5zkTEQY8hirkB/Q3R7e4 Va0s/MLwBrffTvpoBXQ+/4jfZoFTxYZolXOdqBVGuhyxht6xeH14TQ23721q26wOmW7A/+ I7nkogm/22PG2o3doIyhTKzfHTi7WPorGlapFhR9VpZs0uSL/HqtI9N0oul7IMBPl/H5Zo Jbp/jMZGbZd3c9mLx9ocj40CAj3CDkxX/LjBjVtLeWOSV71aokrf82J6DdX1d+pLJKy7Kw lzbKSP6BOfqJBOav2OwjGi0fEWP/dPbejz6ocEWNhp85FRdjOgooS42arFxKLw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666247269; a=rsa-sha256; cv=none; b=aaKwIdMhujaF/xOR4nMdejqRAfnWcuWp1QiG8xc2GWT6H2uwgGhMcfY9UBMDvIY7lwGIFF K2wuH6LMf6DoAHEqhGMwQLziG3SKvYrmDfkihXVbxw0BCP+mlSZGNudQUvJrqeCDQgNfec tB5Rh3HR+ewa2onJUIDuWvnGManymApi+NhrMxTFSzemVNlox4Lvd4VlrMJIhp84FKxclA 2Ra/p9zmbOYhbo90YpIS4dvDQ+5FSsF4BiriqFm7zWFFQptfjcKHSrJcMBFwIsHdtgWWmb MDBYbTbyf6CzsfMSBlqnyGcTNVVmYmBVds6gQcevwnSfTc25uCqPakJSgxsr3A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=HFnMvYDa; dmarc=none; 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: 0.37 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=HFnMvYDa; dmarc=none; 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: 3546E610F X-Spam-Score: 0.37 X-Migadu-Scanner: scn1.migadu.com X-TUID: mKzUS7woe8rI --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-10-19 18:21, Ludovic Court=C3=A8s wrote: > Hi, > > Andrew, does the bug report below ring a bell? > Yes, I don't remember if I created a thread on that (probably not) or just discussed it in some chat, but when shepherd stops it doesn't clean up its socket file, so you can't start shepherd again until manually remove socket. Checked it right now: =2D-8<---------------cut here---------------start------------->8--- herd stop root shepherd # fails with Address already in use =2D-8<---------------cut here---------------end--------------->8--- I found it out, when was experimenting with the place, where I start shepherd https://issues.guix.gnu.org/57692. To inherit graphical environment variables I start it by sway compositor, not login shell and if in addition to sway session I login on another tty, elogind won't remove XDG_RUNTIME_DIR =3D> shepherd/socket is not removed =3D> shepherd fails to start after sway restart. > https://issues.guix.gnu.org/57844 > > (I haven=E2=80=99t hit that problem myself.) > > Ludo=E2=80=99. > > Tom Willemse skribis: > >> Hi Guix! >> >> I've been using Guix on Archlinux for a little while now, and ever since >> I've started using Guix Home on my laptop to start up user-level >> services I've been having the issue that about 50% of the time when I >> boot my laptop shepherd fails to start.=20 >> >> My .xsession-errors says: >> >>> shepherd: while opening socket '/run/user/1000/shepherd/socket': bind: >>> Address already in use >> >> and looking at my shepherd log: >> >>> 2022-09-15 11:47:18 Service root has been started. >>> 2022-09-15 11:47:18 Service root has been started. >>> 2022-09-15 11:47:19 Starting services... >>> 2022-09-15 11:47:19 Starting services... >>> 2022-09-15 11:47:19 Exiting shepherd... >>> 2022-09-15 11:47:19 Service dunst has been started. >>> 2022-09-15 11:47:19 Service unclutter has been started. >>> 2022-09-15 11:47:19 Service syncthing has been started. >>> 2022-09-15 11:47:19 Service polybar has been started. >>> 2022-09-15 11:47:19 Service cmst has been started. >>> 2022-09-15 11:47:19 Service kdeconnect has been started. >>> 2022-09-15 11:47:20 Service xbindkeys has been started. >>> 2022-09-15 11:47:20 Service picom has been started. >>> 2022-09-15 11:47:20 Service xmodmap has been started. >>> 2022-09-15 11:47:20 Service redshift has been started. >>> 2022-09-15 11:47:20 Exiting shepherd... >>> 2022-09-15 11:47:20 Service syncthing has been stopped. >>> 2022-09-15 11:47:20 Service xbindkeys has been stopped. >>> 2022-09-15 11:47:20 Service redshift has been stopped. >>> 2022-09-15 11:47:20 Service cmst has been stopped. >>> 2022-09-15 11:47:20 Service kdeconnect has been stopped. >>> 2022-09-15 11:47:20 Service polybar has been stopped. >>> 2022-09-15 11:47:20 Service dunst has been stopped. >>> 2022-09-15 11:47:20 Service picom has been stopped. >>> 2022-09-15 11:47:20 Service unclutter has been stopped. >>> 2022-09-15 11:47:20 Exiting. >> >> It looks like it starts twice and then exits both, but I'm not sure why. >> I'm guessing it's the ~/.guix-home/activate and >> ~/.guix-home/on-first-login that are trying to start it. ~/.guix-home/activate should be launched only by guix home reconfigure, so it shouldn't be touched during startup of the session at all, also they both have a condition, which must prevent the start of shepherd if socket exists. https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/home/services/shepherd.= scm?h=3D883fb8f41b08a8455f16c736a83fb1ae8a3df0a1#n105 https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/home/services/shepherd.= scm?h=3D883fb8f41b08a8455f16c736a83fb1ae8a3df0a1#n131 Tom, can you show your startup scripts, please (like xsession or whatever you use for starting graphical environment)? Sharing home environment config can be useful as well. Do you use some display/login manager? >> >> I'm not sure what other information I can provide you that will help, so >> please let me know! >> =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmNQ6JsACgkQIgjSCVjB 3rA3yQ/+OA0sNDZc5m2bOcVca3CTMk+PeMnrY7it1fIl2hbnLNoR5F3beEWGoKd4 me5Gg4eP+apCEKG8X+idNYkknk9Rlw7KAuizgupSoc+GN/RzpO8LWXayKvPmGGP1 V01MP1Om2fh3eXFkJEKrzsjcR3AXv/EF2vlzad9MX//6EVxAXbhdvy5mg35udpXP gTGifrZTpweWdaKOtlaBw53daIQAD/JUrUyVCsZqG2oS1A7MXFBybr2b2ZSNoPok spJbnCmOFil6Gv7A3L5vtAKh6aLSIT+9JvXJKTNhyNEl1B2+0zskd1nFG+8fHhFT ffs3Y41xBPGW2rgaiKOakadtykqU54C3nrSCcXANX6OYsEdUHkEvI5rkNAzClwb/ Ux6ZtCNAvB1hRycQRG+QmdUsOAF2UATxzezE2GDYD9Bchl5tSDsFGt5A5IF9SH8Y mtikmE8cJ3GX7ZP/XmV3kTIusKkMCRz2F7KtqhgG6InbClgoFHGPv9Hq+v+vQvDP ftY1OuCDuRM8JNB35nhsr1SV5jKBu+QJOfkhv5NRWsUp4Vyxb1BXbtqqK9g83xGj ZOoB5dWhEhJJ3z/WHU0Suf5qt725uqSPhdbHet06V9NlrjAQq9v+j5p4UzaW8WeG UGLwKngyUlvMU0HWOeIIEf1DgZNBibgsztgnDk8efVoxqC63ZIg= =0TGL -----END PGP SIGNATURE----- --=-=-=--