GNU bug report logs - #58485
[shepherd] EADDRINUSE while restarting ssh-daemon

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Severity: important; Reported by: Lars-Dominik Braun <lars@HIDDEN>; dated Thu, 13 Oct 2022 07:53:01 UTC; Maintainer for guix is bug-guix@HIDDEN.
Changed bug title to '[shepherd] EADDRINUSE while restarting ssh-daemon' from '[shepherd] Restarting guix-publish fails' Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.
bug unarchived. Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug archived. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 58485 <at> debbugs.gnu.org:


Received: (at 58485) by debbugs.gnu.org; 20 Feb 2023 13:25:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 20 08:25:32 2023
Received: from localhost ([127.0.0.1]:51001 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pU6Ae-0002gP-BR
	for submit <at> debbugs.gnu.org; Mon, 20 Feb 2023 08:25:32 -0500
Received: from mail-wm1-f42.google.com ([209.85.128.42]:55855)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ldb@HIDDEN>) id 1pU6Ab-0002gA-EM
 for 58485 <at> debbugs.gnu.org; Mon, 20 Feb 2023 08:25:31 -0500
Received: by mail-wm1-f42.google.com with SMTP id m23so903581wms.5
 for <58485 <at> debbugs.gnu.org>; Mon, 20 Feb 2023 05:25:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=leibniz-psychology-org.20210112.gappssmtp.com; s=20210112;
 h=in-reply-to:content-disposition:mime-version:references:message-id
 :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;
 bh=rqVAWa+gNcTyC25GemznIJ9BDGDawMGUXlHtClDjOfg=;
 b=Rxq/q663KL9KSxFpnyQ36HgyydgPGDJQvW2KvRrxhCzCT5Ste6UrfjXFMVfTTND5MN
 fxScRqXXZGd9tg2YqvGxsCHYPwmC4QrBe9by63j/qaJv1rzjvLLaieofFHEPOoLtvkv9
 +3QVO+QhdR+/ejY/UnxWALb6/vdbtg8KogVWbsmPL5itVOn46xfgvoOKa5ERUAYudrs7
 2GEk8ctBGZ+roVPVRckVIp03SczJUS7rMTEi01dVtZ5Vc4ZasVWCR9Rza/sxcoEoNBJR
 eIx+UTCeJgDBHxkXwx8NPgBnsEP9ThTVsq5UrRPOi7vCRP0Z5fd/5A6sJ7+h6icfxaGn
 1YYg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=in-reply-to:content-disposition:mime-version:references:message-id
 :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=rqVAWa+gNcTyC25GemznIJ9BDGDawMGUXlHtClDjOfg=;
 b=bGepy7VSO/J/HG11iNitqoS+6WUZ6tgB+nilhv5BMUCs9gaAfpN6nIZv3AAVrKcJbw
 rSpja1GFsfHxP2yhCUf2DjrJEOEJ0Brp9ZRad/HTMdUrdwfyZMCGdBomQoj1P0s+uJqK
 /daR5lSkFGf2krRKHjOGqJoOerXPl9H92RTZCVgVNcQ2ZKECDyD5hqVuR3oxywE0kNNd
 ELMlacfk8dnRmaB50O2AyOWypiJTdRKg8UEr8oOXguJ+Oje04/vt0nTMEbBReb7tFgWX
 0iA8mCa3m1fCf5BIn0WDDFqtALjni4ukB3HA58Xy16VyyvEqjARgYPT6UbscJV/i2Kif
 4RvQ==
X-Gm-Message-State: AO0yUKVQfclZuW3xlXl6MTs+VENi7LG3Cvo2sO+SkntnW+sThZ4s6xXv
 PVMpRct2K7UOjlJL7ERRDOCN+ZTiN4UX/UxMNdJ/1Kz3EhG0QxznQZ0I1+Oa2/4kppHhXdBRWSQ
 KkZ2koIqSGjv5tqKHZxOLrtPuWQDD/yToIj2g8LTI/ItDZjoBVaqiS6afo8zk8MmNm+PT+WKpR6
 V/3Xg=
X-Google-Smtp-Source: AK7set8vU2l5HfBRmQ/MT/e7wvQ6J38DwpZ31nXAFVOgnNlIOFVu9ZVqBjHbPuX9EyEoy0SfBJ+hEA==
X-Received: by 2002:a05:600c:331b:b0:3e2:6c6:31a6 with SMTP id
 q27-20020a05600c331b00b003e206c631a6mr229873wmp.9.1676899523310; 
 Mon, 20 Feb 2023 05:25:23 -0800 (PST)
Received: from localhost (opensense.uni-trier.de. [136.199.1.50])
 by smtp.gmail.com with ESMTPSA id
 u7-20020a05600c19c700b003e21f20b646sm1315086wmq.21.2023.02.20.05.25.22
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 20 Feb 2023 05:25:22 -0800 (PST)
Date: Mon, 20 Feb 2023 14:25:22 +0100
From: Lars-Dominik Braun <ldb@HIDDEN>
To: Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN>
Subject: Re: bug#58485: [shepherd] Restarting guix-publish fails
Message-ID: <Y/N0wj0CQGRuxmwj@zpidnb93>
References: <Y0fDnizcW8UsBxKh@HIDDEN> <875yfekmze.fsf@HIDDEN>
 <Y+IM4IrO4V05o3V9@zpidnb93> <878rgsljtx.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="r8XOVDpvTgY0dkFL"
Content-Disposition: inline
In-Reply-To: <878rgsljtx.fsf@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58485
Cc: 58485 <at> debbugs.gnu.org, Lars-Dominik Braun <lars@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--r8XOVDpvTgY0dkFL
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Ludo,

> Can you confirm shepherd (PID 1) is 0.9.3?
it is:

root         1  0.2  0.2 308148 76816 ?        Sl   Feb07  52:08 /gnu/store=
/kphp5d85rrb3q1rdc2lfqc1mdklwh3qp-guile-3.0.9/bin/guile --no-auto-compile /=
gnu/store/4nw0zb4swga0cb8i35nvng3rg6z5qm8p-shepherd-0.9.3/bin/shepherd --co=
nfig /gnu/store/cvrai6z8777jf7860rnvppfznl1lcxi1-shepherd.conf

> =E2=80=98sudo herd restart ssh-daemon=E2=80=99 works fine on my laptop FW=
IW.
This works fine too. Only unattended-upgrades seems to have this issue :/

The strace looks unsuspicious right now:

---snip---
1     14:12:15.117035 read(21, "(shepherd-command (version 0) (action resta=
rt) (service ssh-daemon) (arguments ()) (directory \"/root\"))", 1024) =3D =
103
1     14:12:15.117254 close(27)         =3D 0
1     14:12:15.117283 close(30)         =3D 0
1     14:12:15.117416 newfstatat(AT_FDCWD, "/etc/localtime", {st_dev=3Dmake=
dev(0x8, 0x2), st_ino=3D110100491, st_mode=3DS_IFREG|0444, st_nlink=3D1, st=
_uid=3D0, st_gid=3D0, st_blksize=3D4096, st_blocks=3D8, s
t_size=3D2298, st_atime=3D1676898665 /* 2023-02-20T14:11:05.338746772+0100 =
*/, st_atime_nsec=3D338746772, st_mtime=3D1676898664 /* 2023-02-20T14:11:04=
=2E874743456+0100 */, st_mtime_nsec=3D874743456, st_c
time=3D1676898664 /* 2023-02-20T14:11:04.874743456+0100 */, st_ctime_nsec=
=3D874743456}, 0) =3D 0
1     14:12:15.117475 write(17, "shepherd[1]: Service ssh-daemon has been s=
topped.\n", 50) =3D 50
1     14:12:15.117524 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOC=
K, IPPROTO_IP) =3D 26
1     14:12:15.117561 setsockopt(26, SOL_SOCKET, SO_REUSEADDR, [1], 4) =3D 0
1     14:12:15.117598 bind(26, {sa_family=3DAF_INET, sin_port=3Dhtons(2222)=
, sin_addr=3Dinet_addr("0.0.0.0")}, 16) =3D -1 EADDRINUSE (Address already =
in use)
1     14:12:15.117724 write(21, "(reply (version 0) (result #f) (error (err=
or (version 0) action-exception start ssh-daemon system-error (\"bind\" \"~=
A\" (\"Address already in use\") (98)))) (messages (\"Service ssh-daemon ha=
s been stopped.\")))", 204) =3D 204
1     14:12:15.117754 close(21)         =3D 0
---snap---

But nginx seems to have the same issue, except that it does not fail
entirely and succeeds after waiting a short period of time:

---snip---
2023/02/20 14:12:14 [notice] 7136#0: signal 15 (SIGTERM) received from 6644=
, exiting
2023/02/20 14:12:14 [notice] 7137#0: exiting
2023/02/20 14:12:14 [notice] 7137#0: exit
2023/02/20 14:12:14 [notice] 7136#0: signal 17 (SIGCHLD) received from 7137
2023/02/20 14:12:14 [notice] 7136#0: worker process 7137 exited with code 0
2023/02/20 14:12:14 [emerg] 6645#0: bind() to 0.0.0.0:443 failed (98: Addre=
ss already in use)
2023/02/20 14:12:14 [emerg] 6645#0: bind() to 0.0.0.0:80 failed (98: Addres=
s already in use)
2023/02/20 14:12:14 [emerg] 6645#0: bind() to [::]:80 failed (98: Address a=
lready in use)
2023/02/20 14:12:14 [notice] 7136#0: exit
2023/02/20 14:12:14 [notice] 6645#0: try again to bind() after 500ms
2023/02/20 14:12:14 [notice] 6645#0: using the "epoll" event method
2023/02/20 14:12:14 [notice] 6645#0: nginx/1.23.3
2023/02/20 14:12:14 [notice] 6645#0: OS: Linux 6.1.9
2023/02/20 14:12:14 [notice] 6645#0: getrlimit(RLIMIT_NOFILE): 1024:4096
2023/02/20 14:12:14 [notice] 6648#0: start worker processes
2023/02/20 14:12:14 [notice] 6648#0: start worker process 6649
2023/02/20 14:12:32 [info] 6649#0: epoll_wait() failed (4: Interrupted syst=
em call)
---snap---

I see we=E2=80=99re already using SO_REUSEADDR, so all of this is a bit of a
mystery to me.

Thanks,
Lars

--=20
Lars-Dominik Braun
Wissenschaftlicher Mitarbeiter/Research Associate

www.leibniz-psychology.org
ZPID - Leibniz-Institut f=C3=BCr Psychologie /
ZPID - Leibniz Institute for Psychology
Universit=C3=A4tsring 15
D-54296 Trier - Germany
Tel.: +49=E2=80=93651=E2=80=93201-4964

--r8XOVDpvTgY0dkFL
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQGzBAABCAAdFiEEyk+M9DfXR4/aBV/UQhN3ARo3hEYFAmPzdLcACgkQQhN3ARo3
hEaZsAv+LM5XHA/LZnBM5CxiZq39HJFExQ13RybQ41w/kpm8khpGXYbJWpS+U2t9
tTpbq7Mge9BPQT6uk9jb0qDBnGKRmKWS+LCkL7HQvzbmOi0sxV418nejZlRv5Igf
mxbtkD2aztIXfxqEa+ZO8sO7H16qoZHtcmwaEqpCU9+kAELq+FxO6L1RKvIKAS7S
dXuEgHCx92LlUbnxPYK2vbKn7Y93ruKukd+nIze9UhtcwAXrhiirUdgVcZ4oDmoK
cYmm5H1wJv21sPB0/GXD9KRBmXteRqYpYmi6fj/sFY9WH35ILvuqpDe7sS8GcEqF
db/jfHI5dNoNDSKQzO/bS/Copr0HSADWD6oLnSuab1UCyVLM+amekclEs+BaPg6f
3TMG+DPBboMf4oGr7cCyr0KWxHf58V9v36R30N8U1UkYzhIveovoWMOX2nb0lwZW
ypbCHjmpxvpGU7PBHZNOkcChLF/DkkCg22rwYP41CnxxrfYAjx5vh8Vca6WHAv9q
EraAcxx9
=JBDq
-----END PGP SIGNATURE-----

--r8XOVDpvTgY0dkFL--




Information forwarded to bug-guix@HIDDEN:
bug#58485; Package guix. Full text available.

Message received at 58485 <at> debbugs.gnu.org:


Received: (at 58485) by debbugs.gnu.org; 20 Feb 2023 10:20:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 20 05:20:23 2023
Received: from localhost ([127.0.0.1]:50555 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pU3HT-0003Ka-Dj
	for submit <at> debbugs.gnu.org; Mon, 20 Feb 2023 05:20:23 -0500
Received: from eggs.gnu.org ([209.51.188.92]:55284)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1pU3HQ-0003KK-OZ
 for 58485 <at> debbugs.gnu.org; Mon, 20 Feb 2023 05:20:21 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1pU3HK-00038p-RW; Mon, 20 Feb 2023 05:20:14 -0500
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=kswpdm3XlNViPj4htTRUj8cjFu4ThwGUfXo0ta15qBQ=; b=fZqaKTFkom36UsgJB4B2
 sk49zmQ+CE+wMxeWl/T5evjDfDJntYGeQwv30177JdD23M6LehhsOGlcYglHnfqlg435/FaaZdNI4
 8SLDHocIJwBId5N4a+VbRCe3pKxyGvyfcxgY+PbqowK/9qVZuOXnx4dpPCJ12EqppMNRkJ1wVVfAF
 nOYAoijK2SBT/ue8TiT3WC3cx3xM5jjAtt42cEzQmk9hrdVaB7gXSu87oC16eDIuM2zzylt9hGEzi
 VoN0k6z+CGmHdhhxhrurzsSJXZSDi14Ogw0k7ccd2IjYaiwSyKCEl1oEUIqfBfU172riLg6dWBKY5
 +PlTqLwaDfUung==;
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1pU3HJ-00064U-JA; Mon, 20 Feb 2023 05:20:14 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Lars-Dominik Braun <ldb@HIDDEN>
Subject: Re: bug#58485: [shepherd] Restarting guix-publish fails
References: <Y0fDnizcW8UsBxKh@HIDDEN> <875yfekmze.fsf@HIDDEN>
 <Y+IM4IrO4V05o3V9@zpidnb93>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Duodi 2 =?utf-8?Q?Vent=C3=B4se?= an 231 de la
 =?utf-8?Q?R=C3=A9volution=2C?= jour du Cornouiller
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, 20 Feb 2023 11:20:10 +0100
In-Reply-To: <Y+IM4IrO4V05o3V9@zpidnb93> (Lars-Dominik Braun's message of
 "Tue, 7 Feb 2023 09:33:36 +0100")
Message-ID: <878rgsljtx.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (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: 58485
Cc: 58485 <at> debbugs.gnu.org, Lars-Dominik Braun <lars@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi Lars,

Lars-Dominik Braun <ldb@HIDDEN> skribis:

>> Indeed.  This is fixed by Shepherd commit
>> d97592f58603ff51cb280ae57d413c8731e601b3, which will be in the upcoming
>> 0.9.3 release.
> I=E2=80=99m on 0.9.3 and it works fine with `herd restart` now. But ssh-d=
aemon
> has the same issue when being restarted by unattended-upgrades (which
> is fatal, because unable to use SSH I have to restart the entire box):
>
> ---snip---
> shepherd: Service nginx has been stopped.
> shepherd: Service nginx has been started.
> shepherd: Service collectd has been stopped.
> shepherd: Service collectd has been started.
> shepherd: Service ntpd has been stopped.
> shepherd: Service ntpd has been started.
> shepherd: Service guix-publish has been stopped.
> shepherd: Service guix-publish has been started.
> shepherd: Service ssh-daemon has been stopped.
> Backtrace:
>            7 (primitive-load "/gnu/store/ip5m1n8kb6p0rfglzpkk17k060a?")
> In ice-9/boot-9.scm:
>     724:2  6 (call-with-prompt ("prompt") #<procedure 7f89a11f3840 ?> ?)
>   1752:10  5 (with-exception-handler _ _ #:unwind? _ # _)
> In ice-9/eval.scm:
>     619:8  4 (_ #(#(#<directory (guile-user) 7f89a11ffc80>)))
> In ice-9/boot-9.scm:
>    260:13  3 (for-each #<procedure restart-service (name)> _)
> In gnu/services/herd.scm:
>     168:4  2 (invoke-action ssh-daemon restart () #<procedure 7f89a0?>)
>     176:7  1 (failure)
> In ice-9/boot-9.scm:
>   1685:16  0 (raise-exception _ #:continuable? _)
>
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> ERROR:
>   1. &action-exception-error:
>       service: ssh-daemon
>       action: start
>       key: system-error
>       args: ("bind" "~A" ("Address already in use") (98)
> ---snap---
>
> Maybe I can strace herd and see what happens exactly.

Can you confirm shepherd (PID 1) is 0.9.3?

=E2=80=98sudo herd restart ssh-daemon=E2=80=99 works fine on my laptop FWIW.

Note that the situation is different from that of =E2=80=98guix publish=E2=
=80=99: here
it=E2=80=99s inetd style, as opposed to systemd style for =E2=80=98guix pub=
lish=E2=80=99.

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#58485; Package guix. Full text available.

Message received at 58485 <at> debbugs.gnu.org:


Received: (at 58485) by debbugs.gnu.org; 7 Feb 2023 08:39:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 07 03:39:25 2023
Received: from localhost ([127.0.0.1]:51022 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pPJVd-0003jz-1v
	for submit <at> debbugs.gnu.org; Tue, 07 Feb 2023 03:39:25 -0500
Received: from mail-ed1-f45.google.com ([209.85.208.45]:38634)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ldb@HIDDEN>) id 1pPJVa-0003jl-QL
 for 58485 <at> debbugs.gnu.org; Tue, 07 Feb 2023 03:39:23 -0500
Received: by mail-ed1-f45.google.com with SMTP id ee13so7816404edb.5
 for <58485 <at> debbugs.gnu.org>; Tue, 07 Feb 2023 00:39:22 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=leibniz-psychology-org.20210112.gappssmtp.com; s=20210112;
 h=in-reply-to:content-disposition:mime-version:references:message-id
 :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to;
 bh=BEevK7vOZbwWRPuQbZLSt9UmVu/TYfqHzGJZ3NFBdac=;
 b=0qlz0TqMhARm4vB4+oEFY10wS1YEIh24/lGb59c0Mki80mqmvdEx92NeiLCXMYO1V8
 qT1lNiTKB747UvgY3f6IumosEch/hbC3yh2l0+hx8p9ctaCMwFxhNkiwpMKioSQRG7Oi
 +6RyW3bQs8DeTi5IQ0fPDMBApVN8xzVnLKhZsThi3+md7JqvO0TEmjni3h+lQDL7NKw2
 LSZ5035j2WYxi+i+NqbEk+3Cl6nxXO0NbJLq7Ph44HH2kxfhlpAsyOsgUN6EE+S+CXBD
 JtqYyRhXHGBJTrHs8E4PRf6RNl76ObFoYR5qOcp75pvhENCnJjlsZ9lNwB8ZgPN1pFcg
 EQhg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=in-reply-to:content-disposition:mime-version:references:message-id
 :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=BEevK7vOZbwWRPuQbZLSt9UmVu/TYfqHzGJZ3NFBdac=;
 b=h6RPJpsP4jWv8AweKh1S/VqEEbo48pHst6b0ywF9ztp0v+A6SeGBCwagQl6q0ni2Z7
 YbAzpbmVGLd2HoS4BlbtVFQwG+Sg7qCN9BtTTnIszoGqjWlKsuRSSQ6PTf0MVG8PJ/AA
 Yf3g7TQmsTkcRHw+CZ2DMc3l/FlM5g9KGo0B9Op3XwNde6EN2mZqDpw+W1CK7Xt9ftkZ
 b8gJHpG7kn1/xfeLNSn/EzkqxMnvEj9vi/ve21OtY+LhVRVmtqbblxcPHuZdA0D6oGCL
 ysOd3rCfIoyTfPdZCip0CjkKyd3S6300BFCR4yhEechYgdQLd2UEKXr1HQfXUDa5dRlY
 TZFQ==
X-Gm-Message-State: AO0yUKXhtwJmWX/MRzAUeqBU6FPJV99bU+qP2T6SKW7EAHIoETVQDpku
 nqXizrCTDRm2BtODB9xq+yDyiOOQQg0fvigdayKoHRatVV3Iyojfnv4Lmq9VPtygMtnA8JCXm5i
 8D+e6pN+cuW76jLjlg1snZtHZ7hoj+zIACzewD3SMux9O/l5a7OwYNQSGRdBb7Ol4YEAFiF6yU5
 NvpaLwkOzXAbG63w==
X-Google-Smtp-Source: AK7set9bdESaJgfG+c8MDNiPgyRZfpg7JhYknnKurj+vz2CTkLr+ICgyZQxrFrM7p9/lwSvsdMhbTw==
X-Received: by 2002:a50:99c7:0:b0:4aa:c4b9:5b0 with SMTP id
 n7-20020a5099c7000000b004aac4b905b0mr2339976edb.18.1675759157108; 
 Tue, 07 Feb 2023 00:39:17 -0800 (PST)
Received: from localhost (opensense.uni-trier.de. [136.199.1.50])
 by smtp.gmail.com with ESMTPSA id
 i26-20020a05640200da00b004a7e9ec2087sm6133526edu.76.2023.02.07.00.39.16
 for <58485 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 07 Feb 2023 00:39:16 -0800 (PST)
Date: Tue, 7 Feb 2023 09:39:16 +0100
From: Lars-Dominik Braun <ldb@HIDDEN>
To: 58485 <at> debbugs.gnu.org
Subject: Re: bug#58485: [shepherd] Restarting guix-publish fails
Message-ID: <Y+IONFTuvQMz0LAU@zpidnb93>
References: <Y0fDnizcW8UsBxKh@HIDDEN>
 <875yfekmze.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="6ypyuX7qKU8dyD6V"
Content-Disposition: inline
In-Reply-To: <875yfekmze.fsf@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58485
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--6ypyuX7qKU8dyD6V
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Ludo,

> Indeed.  This is fixed by Shepherd commit
> d97592f58603ff51cb280ae57d413c8731e601b3, which will be in the upcoming
> 0.9.3 release.
I=E2=80=99m on 0.9.3 and it works fine with `herd restart` now. But ssh-dae=
mon
has the same issue when being restarted by unattended-upgrades (which
is fatal, because unable to use SSH I have to restart the entire box):

---snip---
shepherd: Service nginx has been stopped.
shepherd: Service nginx has been started.
shepherd: Service collectd has been stopped.
shepherd: Service collectd has been started.
shepherd: Service ntpd has been stopped.
shepherd: Service ntpd has been started.
shepherd: Service guix-publish has been stopped.
shepherd: Service guix-publish has been started.
shepherd: Service ssh-daemon has been stopped.
Backtrace:
           7 (primitive-load "/gnu/store/ip5m1n8kb6p0rfglzpkk17k060a?")
In ice-9/boot-9.scm:
    724:2  6 (call-with-prompt ("prompt") #<procedure 7f89a11f3840 ?> ?)
  1752:10  5 (with-exception-handler _ _ #:unwind? _ # _)
In ice-9/eval.scm:
    619:8  4 (_ #(#(#<directory (guile-user) 7f89a11ffc80>)))
In ice-9/boot-9.scm:
   260:13  3 (for-each #<procedure restart-service (name)> _)
In gnu/services/herd.scm:
    168:4  2 (invoke-action ssh-daemon restart () #<procedure 7f89a0?>)
    176:7  1 (failure)
In ice-9/boot-9.scm:
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
ERROR:
  1. &action-exception-error:
      service: ssh-daemon
      action: start
      key: system-error
      args: ("bind" "~A" ("Address already in use") (98)
---snap---

Maybe I can strace herd and see what happens exactly.

Thanks,
Lars

--=20
Lars-Dominik Braun
Wissenschaftlicher Mitarbeiter/Research Associate

www.leibniz-psychology.org
ZPID - Leibniz-Institut f=C3=BCr Psychologie /
ZPID - Leibniz Institute for Psychology
Universit=C3=A4tsring 15
D-54296 Trier - Germany
Tel.: +49=E2=80=93651=E2=80=93201-4964

--6ypyuX7qKU8dyD6V
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQGzBAABCAAdFiEEyk+M9DfXR4/aBV/UQhN3ARo3hEYFAmPiDjEACgkQQhN3ARo3
hEaTXAwAs287VvnJyKW5DCE+ZcH2zMv7OxTdskznDCa4YP61wjL5fGeS+KdyX/GS
lqQ0AcnDC6UKuweh/JTFucVWkdY+N35lhAH27xkJDMQAXTk+CjuMSfiPv6asOQ4t
SIGX+yH5RVKTlhBAhDgd8csZipuoVjp6/vL3x3jo65/7sKN0oYJFpq0LqrT4oxbb
Gg9K+tGTqup5rdpjN/IciO8rjxDmncl5ubOJ1vFEX4ufyfw1Q99W0xEsL/mh764a
fBgP3LlhRdE2F8GZ/ZvdMw5TgxGEpWRPJepTzQiIMf6PC2ZRgsPrhGTWHUryAFZK
9AdBc7B5cxmvEPdb9UyYUNA2eFGiDPikGZ+Y66sf4rUY9ya+ryNONdUgepiGYp4v
p6PHW48GWoR4tsdhw6ibUax29k/LB6AEDPnpXEf3Veoncm/bbqOWS0Krw5RQZA5z
R7qSjKT6IgGQWabnktUibNsk+jO6PFsl1qFwcfDuhBpyZExtU7fLDPAYLvjVEmfY
jhsYiy+0
=/zFv
-----END PGP SIGNATURE-----

--6ypyuX7qKU8dyD6V--




Information forwarded to bug-guix@HIDDEN:
bug#58485; Package guix. Full text available.
bug unarchived. Request was from Lars-Dominik Braun <ldb@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug archived. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 58485-done <at> debbugs.gnu.org:


Received: (at 58485-done) by debbugs.gnu.org; 17 Nov 2022 10:19:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 17 05:19:14 2022
Received: from localhost ([127.0.0.1]:59207 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovbzG-0003XZ-Jq
	for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 05:19:14 -0500
Received: from eggs.gnu.org ([209.51.188.92]:54980)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1ovbzF-0003XM-5g
 for 58485-done <at> debbugs.gnu.org; Thu, 17 Nov 2022 05:19:13 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1ovbz9-0000WG-I5; Thu, 17 Nov 2022 05:19:07 -0500
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=Iotlgz36NWQL39sWPTaT49D60B9sVxFB6Y3UIL++TpA=; b=alEKKMQvbVdN6KsBpPu/
 /n0tRw5nn2OmrH4pPt98yaRp9msGocHY96I+Nzao0boSv+/LBi/EFn3Sz6F9Fy5VcrmFhGWcoeIgT
 IvRLwxl/KrCozIM/Q+pxDdE17QL98dhIKf8noWymBM30mTIKgpA0XDP6mlFdeVwXyQur+ljYWT63a
 MmnsUJU6zhuAVw+M4BMSt/9BvV9vEuKaSESltfExW/88R5s1IzQs2LU++OE5FfvmqCW9etZyiZbyb
 GbmdihkhIIDy8wjHQofYg/AFMRDp/VaeFsFSiqDIYNgm1/PvH0ZWs2ARLgfEGqW0vSHN80Mrzz6tl
 2of3CZaqL+tBkA==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1ovbz9-0004Zt-5E; Thu, 17 Nov 2022 05:19:07 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Lars-Dominik Braun <lars@HIDDEN>
Subject: Re: bug#58485: [shepherd] Restarting guix-publish fails
References: <Y0fDnizcW8UsBxKh@HIDDEN> <875yfekmze.fsf@HIDDEN>
Date: Thu, 17 Nov 2022 11:19:04 +0100
In-Reply-To: <875yfekmze.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Thu, 17 Nov 2022 09:24:05 +0100")
Message-ID: <87h6yxkhnr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (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: 58485-done
Cc: 58485-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> Indeed.  This is fixed by Shepherd commit
> d97592f58603ff51cb280ae57d413c8731e601b3, which will be in the upcoming
> 0.9.3 release.

The Shepherd 0.9.3 has landed in Guix commit
283d7318c5b312d7129adb6dbeea6ad205ce89d1.

Ludo=E2=80=99.




Notification sent to Lars-Dominik Braun <lars@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Ludovic Courtès <ludo@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 58485 <at> debbugs.gnu.org:


Received: (at 58485) by debbugs.gnu.org; 17 Nov 2022 08:24:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 17 03:24:18 2022
Received: from localhost ([127.0.0.1]:59025 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovaC1-0000Xv-SN
	for submit <at> debbugs.gnu.org; Thu, 17 Nov 2022 03:24:18 -0500
Received: from eggs.gnu.org ([209.51.188.92]:45758)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1ovaBz-0000Xh-MK
 for 58485 <at> debbugs.gnu.org; Thu, 17 Nov 2022 03:24:16 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1ovaBt-0000m0-Qk; Thu, 17 Nov 2022 03:24:10 -0500
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=fEWiBpZo23p5z1lAbmjhGVOV3wbuMuK5tAAuLPTbtNs=; b=G5rKjSAsWw0a7MXWL9Q/
 btXd13T6aRs2drBVycSlWmVyn1PwOdnOkvODUDZGgzdVzOB5bEqs2yejlQHmHl2cLo5D3diroZ4X4
 CKKWeNt7lNrjzaAI+TJszo2EkM4Pw6Ml8HNE4JbS1JycAnE9XSnxJWTiDjDY7uED3GLD+Q9VTKjqJ
 cciprxf2eoaSiEMS0MQuO8t3LSDEvOetrZ3Wl+ofLIef5+l2deXy4EaiVv/XeElN8eIlhgHfA+5Fn
 Y8rNK8K3qaUZIc2u/ynXNwfXesV+i8VnOKYFMUZV72BSlky2VGZB5qrmM32DkaWk0qXgiEvoMKsnW
 5Cmw3NivQdA16Q==;
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1ovaBs-0001xB-6M; Thu, 17 Nov 2022 03:24:08 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Lars-Dominik Braun <lars@HIDDEN>
Subject: Re: bug#58485: [shepherd] Restarting guix-publish fails
References: <Y0fDnizcW8UsBxKh@HIDDEN>
Date: Thu, 17 Nov 2022 09:24:05 +0100
In-Reply-To: <Y0fDnizcW8UsBxKh@HIDDEN> (Lars-Dominik Braun's message
 of "Thu, 13 Oct 2022 09:51:58 +0200")
Message-ID: <875yfekmze.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (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: 58485
Cc: 58485 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Lars-Dominik Braun <lars@HIDDEN> skribis:

> 1     kill(-18096, SIGTERM)             =3D 0
> 1     newfstatat(AT_FDCWD, "/etc/localtime", {st_mode=3DS_IFREG|0444, st_=
size=3D2298, ...}, 0) =3D 0
> 1     write(17, "shepherd[1]: Service guix-publish has been stopped.\n", =
52) =3D 52
> 1     socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP)=
 =3D 36
> 1     setsockopt(36, SOL_SOCKET, SO_REUSEADDR, [1], 4) =3D 0
> 1     bind(36, {sa_family=3DAF_INET, sin_port=3Dhtons(8082), sin_addr=3Di=
net_addr("127.0.0.1")}, 16) =3D -1 EADDRINUSE (Address already in use)
> 1     write(23, "(reply (version 0) (result #f) (error (error (version 0)=
 action-exception start guix-publish system-error (\"bind\" \"~A\" (\"Addre=
ss already in use\") (98)))) (messages (\"Service guix-publish has been sto=
pped.\")))", 208) =3D 208
> 1     close(23)
> ---snap---
>
> The obvious explanation would be that stopping does not wait for the
> process to actually exit. make-kill-destructor does not waitpid it seems
> and 'running is set unconditionally to #f after 'stop has finished.

Indeed.  This is fixed by Shepherd commit
d97592f58603ff51cb280ae57d413c8731e601b3, which will be in the upcoming
0.9.3 release.

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#58485; Package guix. Full text available.
Severity set to 'important' from 'normal' Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 58485 <at> debbugs.gnu.org:


Received: (at 58485) by debbugs.gnu.org; 14 Oct 2022 06:57:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 14 02:57:17 2022
Received: from localhost ([127.0.0.1]:35615 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ojEdB-0006NM-1T
	for submit <at> debbugs.gnu.org; Fri, 14 Oct 2022 02:57:17 -0400
Received: from mailrelay.tugraz.at ([129.27.2.202]:14595)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1ojEd8-0006ND-NU
 for 58485 <at> debbugs.gnu.org; Fri, 14 Oct 2022 02:57:16 -0400
Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101])
 by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4MpcdL6kVbz3wj6;
 Fri, 14 Oct 2022 08:57:10 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at;
 s=mailrelay; t=1665730631;
 bh=QXz3wBer2R2R7VWQQjxzucAx+uOhBQCqtMzF5tqH68A=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=UfFdiJZWu+J6Di/wI5hqZsykPqrw2OIx5KAnRjFQrZkS6qCRWZQnPSqaiLGy4TVOG
 AKv1BN3xi1BtdhbcZBjRY6XvpCqP4ABC7RAeVrk5Ftw+mEzmtPwLsS48E0vgPkj9wc
 C5cSkYQeVetE6GiKOy+5Q4AFuiktgauL1RieqZ+g=
Message-ID: <44ef002a53713d84cb57dbc7bc5f3eb9f8422290.camel@HIDDEN>
Subject: Re: [shepherd] Restarting guix-publish fails
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
To: Lars-Dominik Braun <lars@HIDDEN>
Date: Fri, 14 Oct 2022 08:57:10 +0200
In-Reply-To: <Y0j/J2ARzOYa2YUM@HIDDEN>
References: <Y0fDnizcW8UsBxKh@HIDDEN>
 <7f56da61347bc101230cb65b17643b700464006a.camel@HIDDEN>
 <Y0f4G97mIZehPNlJ@HIDDEN>
 <6449fe424fed49c89ff25e505607f8ea27739e5b.camel@HIDDEN>
 <Y0j/J2ARzOYa2YUM@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.46.0 
MIME-Version: 1.0
X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ
X-Spam-Scanner: SpamAssassin 3.003001 
X-Spam-Score-relay: -1.9
X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58485
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>, 58485 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Am Freitag, dem 14.10.2022 um 08:18 +0200 schrieb Lars-Dominik Braun:
> Hi,
>=20
> > Ahh, so the issue is that shepherd waits neither for the process to
> > be
> > actually killed nor for the socket to become available, isn't it?
> I would argue it=E2=80=99s the former, but having either of them would so=
lve
> the problem, I think.
I think you need both: if the process is killed, but the socket
remains, you need to clean it up.  As far as I'm aware, that does not
happen automatically.

Cheers




Information forwarded to bug-guix@HIDDEN:
bug#58485; Package guix. Full text available.

Message received at 58485 <at> debbugs.gnu.org:


Received: (at 58485) by debbugs.gnu.org; 14 Oct 2022 06:18:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 14 02:18:26 2022
Received: from localhost ([127.0.0.1]:35575 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ojE1a-0005Ao-Kt
	for submit <at> debbugs.gnu.org; Fri, 14 Oct 2022 02:18:26 -0400
Received: from mout-p-101.mailbox.org ([80.241.56.151]:40558)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <lars@HIDDEN>) id 1ojE1Y-0005AX-Jj
 for 58485 <at> debbugs.gnu.org; Fri, 14 Oct 2022 02:18:25 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4MpbmT1zm2z9sQr;
 Fri, 14 Oct 2022 08:18:17 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001;
 t=1665728297;
 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:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=M2N6J0KR1WQHI5iNdzZbZuWwpnGHP2bO2ELdfKC11us=;
 b=sz0BRKKYW4bIeJ00tu2PsNn2zzC3M+NeJrqyw+Pw0V0Vk3bZLQ8isyrNHRPr960OUZOiYn
 6fNJGe8yJo2UOYe+7mVukLJbIUFVRVoH0cX/4lmqM/1yy2wqSp4421/QvGCAqlv1Puh3hM
 Je1yQkuQZotzOeXsD+dBCbvUXUg18zZ0aOF/emvS6ttUFhlzM1mUzMxLyeiqfpK08ydEZ6
 KAgE+mw1Lwc4Nfnxc53A3DG6lblentJIqB74+v0QVqQo9A/d3QWWO7TUn7KmH2xEocJHKR
 t2eFgHG5YJRhwKRaQfpqcaLt0DKuxpXXqHNocSRtreW6IeAtqjF1FObeUofRXg==
Date: Fri, 14 Oct 2022 08:18:15 +0200
From: Lars-Dominik Braun <lars@HIDDEN>
To: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Subject: Re: [shepherd] Restarting guix-publish fails
Message-ID: <Y0j/J2ARzOYa2YUM@HIDDEN>
References: <Y0fDnizcW8UsBxKh@HIDDEN>
 <7f56da61347bc101230cb65b17643b700464006a.camel@HIDDEN>
 <Y0f4G97mIZehPNlJ@HIDDEN>
 <6449fe424fed49c89ff25e505607f8ea27739e5b.camel@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <6449fe424fed49c89ff25e505607f8ea27739e5b.camel@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 58485
Cc: Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN>, 58485 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi,

> Ahh, so the issue is that shepherd waits neither for the process to be
> actually killed nor for the socket to become available, isn't it?
I would argue it’s the former, but having either of them would solve
the problem, I think.

Lars





Information forwarded to bug-guix@HIDDEN:
bug#58485; Package guix. Full text available.

Message received at 58485 <at> debbugs.gnu.org:


Received: (at 58485) by debbugs.gnu.org; 13 Oct 2022 13:38:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 13 09:38:34 2022
Received: from localhost ([127.0.0.1]:59981 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oiyPx-0004vg-P7
	for submit <at> debbugs.gnu.org; Thu, 13 Oct 2022 09:38:34 -0400
Received: from mailrelay.tugraz.at ([129.27.2.202]:8190)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1oiyPv-0004vW-7W
 for 58485 <at> debbugs.gnu.org; Thu, 13 Oct 2022 09:38:32 -0400
Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101])
 by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4Mp9Zp2yp3z1LZWn;
 Thu, 13 Oct 2022 15:38:26 +0200 (CEST)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4Mp9Zp2yp3z1LZWn
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at;
 s=mailrelay; t=1665668306;
 bh=X8lY7y3KWIOBhcoTQ4SLnKwNAy77Hp6FitaxGjp+o9M=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References:From;
 b=XvYLAz5ROsIFBPp76iIvYRa4OyYXCxg7q6XNII7nQGtMcDH6gIfP2kVPkKacZ5XXz
 ZU1FX615dRHCEerI6VVHlULt5ALWwD93WO9Bt6YxqowA9B2ZshXp071E12OA4hHQ7w
 phS5TkqtuX8jidkdLxe+7KnT2nuHyZ399Wfb015Q=
Message-ID: <6449fe424fed49c89ff25e505607f8ea27739e5b.camel@HIDDEN>
Subject: Re: [shepherd] Restarting guix-publish fails
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
To: Lars-Dominik Braun <lars@HIDDEN>
Date: Thu, 13 Oct 2022 15:38:24 +0200
In-Reply-To: <Y0f4G97mIZehPNlJ@HIDDEN>
References: <Y0fDnizcW8UsBxKh@HIDDEN>
 <7f56da61347bc101230cb65b17643b700464006a.camel@HIDDEN>
 <Y0f4G97mIZehPNlJ@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.46.0 
MIME-Version: 1.0
X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ
X-Spam-Scanner: SpamAssassin 3.003001 
X-Spam-Score-relay: -0.4
X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58485
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>, 58485 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Am Donnerstag, dem 13.10.2022 um 13:35 +0200 schrieb Lars-Dominik
Braun:
> Hi Liliana,
>=20
> > Shouldn't [1] address this very issue?
> > [1]
> > http://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D2a37f174becbafd7=
0591f6eb1d98493c5c1df0e2
> no, if the process is running make-systemd-destructor is just an
> alias for make-kill-destructor. So it does not matter which one we
> use in this case.
Ahh, so the issue is that shepherd waits neither for the process to be
actually killed nor for the socket to become available, isn't it?




Information forwarded to bug-guix@HIDDEN:
bug#58485; Package guix. Full text available.

Message received at 58485 <at> debbugs.gnu.org:


Received: (at 58485) by debbugs.gnu.org; 13 Oct 2022 11:36:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 13 07:36:09 2022
Received: from localhost ([127.0.0.1]:59744 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oiwVU-0001g3-Ns
	for submit <at> debbugs.gnu.org; Thu, 13 Oct 2022 07:36:08 -0400
Received: from mout-p-103.mailbox.org ([80.241.56.161]:55028)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <lars@HIDDEN>) id 1oiwVS-0001fX-55
 for 58485 <at> debbugs.gnu.org; Thu, 13 Oct 2022 07:36:07 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4Mp6sT5sScz9sRL;
 Thu, 13 Oct 2022 13:35:57 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001;
 t=1665660957;
 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:
 in-reply-to:in-reply-to:references:references;
 bh=9/jYRxJv2dc3RPEH0h8cc1XEEC/Qb/D+G36iGi9BHj0=;
 b=wW3Z47dsRJJr8YUan+t408tVBLMkpP210PpIfswVfB8byDajxIF83AHN/XlgT5IvT+/m+n
 TGteK1VmArVwyR27IlC/FpWteBbE6YbBp3QM3RrWYsP7U0+/JKUSdjPqlx1AUOJ+T3leUP
 EjlRqZ/1T9Y0cRDJpyw8sn5uM6rk2obabUKoQrgIkkbjEq/ATBgWTdbr8doX2ljONfhCAU
 u8AyD/QVSy7cJX9xGvIZiRvu4kGe0JXmKnsOyDB7o+/pTxIvmeHrNtc4SpWbM5UcDJ2KNo
 XZKzvQSY6pxGobZaJLpLuXDVstgbSCpeChkoNjLV6Ac3xraLY+/ZTLsJCqoDZg==
Date: Thu, 13 Oct 2022 13:35:55 +0200
From: Lars-Dominik Braun <lars@HIDDEN>
To: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Subject: Re: [shepherd] Restarting guix-publish fails
Message-ID: <Y0f4G97mIZehPNlJ@HIDDEN>
References: <Y0fDnizcW8UsBxKh@HIDDEN>
 <7f56da61347bc101230cb65b17643b700464006a.camel@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <7f56da61347bc101230cb65b17643b700464006a.camel@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 58485
Cc: Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN>, 58485 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi Liliana,

> Shouldn't [1] address this very issue?
> [1]
> http://git.savannah.gnu.org/cgit/guix.git/commit/?id=2a37f174becbafd70591f6eb1d98493c5c1df0e2
no, if the process is running make-systemd-destructor is just an alias
for make-kill-destructor. So it does not matter which one we use in this case.

Lars




Information forwarded to bug-guix@HIDDEN:
bug#58485; Package guix. Full text available.

Message received at 58485 <at> debbugs.gnu.org:


Received: (at 58485) by debbugs.gnu.org; 13 Oct 2022 09:29:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 13 05:29:07 2022
Received: from localhost ([127.0.0.1]:59554 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oiuWY-0004O8-M2
	for submit <at> debbugs.gnu.org; Thu, 13 Oct 2022 05:29:06 -0400
Received: from mailrelay.tugraz.at ([129.27.2.202]:63274)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1oiuWH-0004NK-TK
 for 58485 <at> debbugs.gnu.org; Thu, 13 Oct 2022 05:29:05 -0400
Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101])
 by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4Mp42j5N9jz3wGD;
 Thu, 13 Oct 2022 11:28:44 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at;
 s=mailrelay; t=1665653326;
 bh=CLiQD/S2qz8xC77a+0/6K5eTx49XMxNJoorbLC/JANU=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=Wk+983bq8fRbHQoVdrJlBvqWksKS0znXK8qACcAzJ2Qb+IOcFb9a4dYaat3t6BJB9
 38TlnQppnckU3KStBKp9UxhhOdjRLe9PcYy4uievJBOnFFVcsDtPKdb3HLKipfscXU
 imJIlqplxDaVNPfhWGcB/KvkLqUfd42wmfeD4Rck=
Message-ID: <7f56da61347bc101230cb65b17643b700464006a.camel@HIDDEN>
Subject: Re: [shepherd] Restarting guix-publish fails
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
To: Lars-Dominik Braun <lars@HIDDEN>, 58485 <at> debbugs.gnu.org
Date: Thu, 13 Oct 2022 11:28:43 +0200
In-Reply-To: <Y0fDnizcW8UsBxKh@HIDDEN>
References: <Y0fDnizcW8UsBxKh@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.46.0 
MIME-Version: 1.0
X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ
X-Spam-Scanner: SpamAssassin 3.003001 
X-Spam-Score-relay: -0.4
X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58485
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Am Donnerstag, dem 13.10.2022 um 09:51 +0200 schrieb Lars-Dominik
Braun:
> The obvious explanation would be that stopping does not wait for the
> process to actually exit. make-kill-destructor does not waitpid it
> seems and 'running is set unconditionally to #f after 'stop has
> finished.
Shouldn't [1] address this very issue?

[1]
http://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D2a37f174becbafd70591=
f6eb1d98493c5c1df0e2




Information forwarded to bug-guix@HIDDEN:
bug#58485; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Oct 2022 07:52:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 13 03:52:20 2022
Received: from localhost ([127.0.0.1]:59323 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oit0t-0003e5-VF
	for submit <at> debbugs.gnu.org; Thu, 13 Oct 2022 03:52:20 -0400
Received: from lists.gnu.org ([209.51.188.17]:40908)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <lars@HIDDEN>) id 1oit0s-0003dy-Dp
 for submit <at> debbugs.gnu.org; Thu, 13 Oct 2022 03:52:18 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:58942)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <lars@HIDDEN>) id 1oit0s-0007iw-6t
 for bug-guix@HIDDEN; Thu, 13 Oct 2022 03:52:18 -0400
Received: from mout-p-101.mailbox.org ([80.241.56.151]:35356)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <lars@HIDDEN>)
 id 1oit0p-0006z4-KS; Thu, 13 Oct 2022 03:52:17 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Mp1v42TyZz9sQZ;
 Thu, 13 Oct 2022 09:52:00 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001;
 t=1665647520;
 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=SMqqMpHn961PiS0hBZWdIlSPBYOeAlSPqkbO8gVO4l8=;
 b=k4WGz2+Tj4BGi83ztOm3PSII4DymTcfhZjc8AtzYc1Q2Enp8qy6855ZBzvo4Io9hk8LKpk
 7SPZl/VaINsW4qb7IUVdKgQwuPxSHtycFFkP6se5O4U0t564X9FBPKDTS6lWaZn0OTL3BA
 tkRm3g32s3HNez/TippfJ7yvqxGBGf7Sxk+eXDsz96IfhSRoOchxjNlxI77/3wPt/nXF8w
 IKPwIDn+lEKnQ08xjuMJ+G0SSXCijgeu3UpVyHAKGjNX9buGJcwzjedJNGMbaHbR769pe0
 8ZU0KIuFISl2BZmTa0qD2A82g03xcnHb7UWq+BRXBBAsaZcw/inTIMb6u/dpVQ==
Date: Thu, 13 Oct 2022 09:51:58 +0200
From: Lars-Dominik Braun <lars@HIDDEN>
To: bug-guix@HIDDEN
Subject: [shepherd] Restarting guix-publish fails
Message-ID: <Y0fDnizcW8UsBxKh@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Rspamd-Queue-Id: 4Mp1v42TyZz9sQZ
Received-SPF: pass client-ip=80.241.56.151; envelope-from=lars@HIDDEN;
 helo=mout-p-101.mailbox.org
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
Cc: Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

Hi,

it seems that `herd restart guix-publish` stopped working after the
introduction of socket activation into shepherd. This is a problem,
because I restart guix-publish automatically after unattended-upgrades. It
fails with the following error for me:

---snip---
Backtrace:
           7 (primitive-load "/gnu/store/7xrg2sbb529ki6hv99n27svg0fi?")
In ice-9/boot-9.scm:
    724:2  6 (call-with-prompt ("prompt") #<procedure 7f8173184940 ?> ?)
  1752:10  5 (with-exception-handler _ _ #:unwind? _ # _)
In ice-9/eval.scm:
    619:8  4 (_ #(#(#<directory (guile-user) 7f817318ac80>)))
In ice-9/boot-9.scm:
   260:13  3 (for-each #<procedure restart-service (name)> _)
In gnu/services/herd.scm:
    168:4  2 (invoke-action guix-publish restart () #<procedure 7f81?>)
    176:7  1 (failure)
In ice-9/boot-9.scm:
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
ERROR:
  1. &action-exception-error:
      service: guix-publish
      action: start
      key: system-error
      args: ("bind" "~A" ("Address already in use") (98))
---snap---

Note that due to the socket activation you must visit the URL at least
once to start up the guix-publish process. Otherwise a restart will
work fine. It also works fine the second time I invoke `herd restart
guix-publish`, because `guix-publish` is dead by that time.

Looking at an strace shepherd is indeed trying to kill `guix-publish`
and re-bind to the same address:

---snip---
1     read(23, "(shepherd-command (version 0) (action restart) (service guix-publish) (arguments ()) (directory \"/root\"))", 1024) = 105
1     getpgid(18096)                    = 18096
1     getpgid(0)                        = 0
1     kill(-18096, SIGTERM)             = 0
1     newfstatat(AT_FDCWD, "/etc/localtime", {st_mode=S_IFREG|0444, st_size=2298, ...}, 0) = 0
1     write(17, "shepherd[1]: Service guix-publish has been stopped.\n", 52) = 52
1     socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 36
1     setsockopt(36, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
1     bind(36, {sa_family=AF_INET, sin_port=htons(8082), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EADDRINUSE (Address already in use)
1     write(23, "(reply (version 0) (result #f) (error (error (version 0) action-exception start guix-publish system-error (\"bind\" \"~A\" (\"Address already in use\") (98)))) (messages (\"Service guix-publish has been stopped.\")))", 208) = 208
1     close(23)
---snap---

The obvious explanation would be that stopping does not wait for the
process to actually exit. make-kill-destructor does not waitpid it seems
and 'running is set unconditionally to #f after 'stop has finished.

Cheers,
Lars





Acknowledgement sent to Lars-Dominik Braun <lars@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#58485; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 27 Apr 2023 20:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.