From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UIH4F7rFS2TE6wAASxT56A (envelope-from ) for ; Fri, 28 Apr 2023 15:10:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 4EbvFrrFS2QSXgAAG6o9tA (envelope-from ) for ; Fri, 28 Apr 2023 15:10:18 +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 5E88E2A29D for ; Fri, 28 Apr 2023 15:10:17 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psNrV-00036j-9x; Fri, 28 Apr 2023 09:10:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1psNrO-00036I-28 for bug-guix@gnu.org; Fri, 28 Apr 2023 09:10:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1psNrN-0007GO-Pb for bug-guix@gnu.org; Fri, 28 Apr 2023 09:10:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1psNrN-0008CG-HS for bug-guix@gnu.org; Fri, 28 Apr 2023 09:10:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#58485: [shepherd] EADDRINUSE while restarting ssh-daemon Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 13:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58485 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Lars-Dominik Braun Cc: 58485@debbugs.gnu.org, Lars-Dominik Braun Received: via spool by 58485-submit@debbugs.gnu.org id=B58485.168268739131486 (code B ref 58485); Fri, 28 Apr 2023 13:10:01 +0000 Received: (at 58485) by debbugs.gnu.org; 28 Apr 2023 13:09:51 +0000 Received: from localhost ([127.0.0.1]:60743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psNrD-0008Bi-0R for submit@debbugs.gnu.org; Fri, 28 Apr 2023 09:09:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psNr6-0008BO-Pi for 58485@debbugs.gnu.org; Fri, 28 Apr 2023 09:09:49 -0400 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 ) id 1psNqz-0007C7-Sa; Fri, 28 Apr 2023 09:09:37 -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=9LFgbENW9sp+qcQ5YfcKlo1cFyodoBlkYowoHVOvCr8=; b=gRKF2asmhERDCD1tCEQl rYo6mHBscuuPUeZ2uhOSpti1E8MngOv8HE2W4/2fe6gZZxzGehrUIXveWNmV8UWItsSGFV/vE9urc kWMDWDgNRZ1eyF1Ia4TiXbu3xhC6b1XzG/hTjVINPzaezLzuQ+WCWSkUWWD867NZ4P/WMi3135c/o u2Ze3bB6Mkr1OFnX4rRiVDKzvIxp+Xy46Mbsogx4DMqvcS80HRWiobWTJTnI2Ph7pK588o25rGkdq D65sH2f9igTvRj5hO7ysbc/X34UlLtbVMlW8uw+NsuyR5pXkALljWZ/FzqPLF2mbTsOc7OJ4yr6CX RwiUmVnE83ot9w==; 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 ) id 1psNqy-00020R-VK; Fri, 28 Apr 2023 09:09:37 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <875yfekmze.fsf@gnu.org> <878rgsljtx.fsf@gnu.org> <87pm7puihd.fsf@gnu.org> Date: Fri, 28 Apr 2023 15:09:34 +0200 In-Reply-To: <87pm7puihd.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Thu, 27 Apr 2023 23:23:58 +0200") Message-ID: <87h6t0up9t.fsf_-_@gnu.org> 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-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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682687417; a=rsa-sha256; cv=none; b=PZcsP9Rz31GU82m+Fs4Jp8urFEPN5HIsZA7omJd5S0F19H+4n45/dmwt8Hxz2OjUjizLBs owaMwdm+lLp9obEUJ2I8T7UO8kxbfiGyz/pYrmGp0tA3LsJyZC35tWTQe6nP3VaU/QBgYV BeHA9irvAtXpeG9KutjyMIm/xiWqa3AzgdMWi1U0lNzOLKzbHQSSZo1mr899jo/HhvBYKo Q1O4WvS5TOGWmMFNvio9rtmSbPD3fUjZvH8Qa9PlmE97AEM/1sOD/I+qCav730XGc735gz lg0yV0khWGQlG0FwJjzjghlHSewTIq9E326pTVnK0/8k3TttXaPZtS2/HNd9+g== 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=gRKF2asm; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682687417; 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=9LFgbENW9sp+qcQ5YfcKlo1cFyodoBlkYowoHVOvCr8=; b=nN9dgMdioHGGPu0Jk2Ir5YFsQgB6kG579BaN+J2Ix4obE4pta0fJHazsQOXezpV9AN2bL+ skx74GgCALuaImmZVPtGNBHTd41W8FrBPD2dHz/MlN6kkq9gLTyGuSFUsAu7tcmcqfUsFl n97hROWD2cZU31PB5gvR+ADaFk9VWHnFQJcLPMVxeEOPYS9jBgQCccu/w6X0XFmECG+s9J WTew2QsNtliBxN+KB2svqNwBZn1Y0Op8Yj1/OoOSeCeXiiHY/FP+a0oUh5N9t2YBPZL0Jl wlNODpGVR7teAyAq4+Ew3KeDZbcDMRAtZ/oXGxAItAafoiufPGmN+odI3f4OBA== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=gRKF2asm; 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: -4.10 X-Spam-Score: -4.10 X-Migadu-Queue-Id: 5E88E2A29D X-TUID: 7iboY3OCtv6l Hi, Ludovic Court=C3=A8s skribis: >> 1 14:12:15.117035 read(21, "(shepherd-command (version 0) (action re= start) (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=3Dm= akedev(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+01= 00 */, st_atime_nsec=3D338746772, st_mtime=3D1676898664 /* 2023-02-20T14:11= :04.874743456+0100 */, st_mtime_nsec=3D874743456, st_c >> time=3D1676898664 /* 2023-02-20T14:11:04.874743456+0100 */, st_ctime_nse= c=3D874743456}, 0) =3D 0 >> 1 14:12:15.117475 write(17, "shepherd[1]: Service ssh-daemon has bee= n stopped.\n", 50) =3D 50 >> 1 14:12:15.117524 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONB= LOCK, 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(22= 22), sin_addr=3Dinet_addr("0.0.0.0")}, 16) =3D -1 EADDRINUSE (Address alrea= dy in use) >> 1 14:12:15.117724 write(21, "(reply (version 0) (result #f) (error (= error (version 0) action-exception start ssh-daemon system-error (\"bind\" = \"~A\" (\"Address already in use\") (98)))) (messages (\"Service ssh-daemon= has been stopped.\")))", 204) =3D 204 >> 1 14:12:15.117754 close(21) =3D 0 [...] > Maybe we should just have shepherd retry upon EADDRINUSE (like nginx > does, as you wrote), though I=E2=80=99d like to understand under what con= ditions > we can get EADDRINUSE in the first place. Done: https://git.savannah.gnu.org/cgit/shepherd.git/commit/?id=3D41789ee8d0e16= 4967f9ca196db4e9601400a462e Ludo=E2=80=99.