From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 8JRQJYkLAGZnaAAAe85BDQ:P1 (envelope-from ) for ; Sun, 24 Mar 2024 12:16:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 8JRQJYkLAGZnaAAAe85BDQ (envelope-from ) for ; Sun, 24 Mar 2024 12:16:25 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b="aHxF/ZM0"; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711278985; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=qBqg+iacTXikGjRDAeHTpQWhzHPaUC/zBEpWWwlD62Y=; b=VoAebpl2RfQwt4T8I5H0/107ZEXfQI6jYwue1tptZ4Cg23xLO82hrZyeJYzZyqmEUfCYF3 4bGruqM4f7rymly0Q4pDBFJeLh8JnoxFY2M9IcHTOpEbf7R2o/hynVmyOdoufKm8cl3c7u m9XM1ohkyMUMwiP7E7M4SiHTDjdFeDoWt+5O4hklprrBU1PNV4sFjXfbFGMVZrbIvtwrUj hD9gcigrMxeh781gA2Hwy3wMs7Rk6ff1Ga7jG55V3+P+EWCKAukHFan+a28kaYyOE22z8j VyLCITfRzr93pYrYDk/s7bvjxrMTPGqFMaF0YZrfy3SrHd0bgkgjUW1EabeKdw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b="aHxF/ZM0"; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711278985; a=rsa-sha256; cv=none; b=ptpCTA3msGZpURtjPTad+Si78jQ9QShYnyJ8vbD5KTy7DqWTuC73E/xrnloHutmFo3Of3x 7+jeYEQMFMrCCq9rtDJkn5XE8ZM3mBcKTSelB9qZJmvbYfpuHcJp7F8hrZ72zlJh9cdgYm PFOX/Icvv1htBODWaflww6QBM1sGN98UM8LxbjMaPWX/9XxH1de7TD05LlvWR/nd42cEAq A+MYNyelT7dy1yQF1yrm//pp8upRLznK77Bm/NWo8pnDPDBU8RBPx/QlGTVVWYlJ5DnOld d9RjD0+L7ZTb/L3GDWR8u9vnbP6CxWnOoqTOP8yKHpLEtsfYYNvnjVETVfZ40Q== 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 4E9795AA11 for ; Sun, 24 Mar 2024 12:16:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1roLpT-0002Wx-Hq; Sun, 24 Mar 2024 07:15:55 -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 1roLpQ-0002VZ-IK for guix-devel@gnu.org; Sun, 24 Mar 2024 07:15:53 -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 1roLpP-00024j-VE; Sun, 24 Mar 2024 07:15:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=qBqg+iacTXikGjRDAeHTpQWhzHPaUC/zBEpWWwlD62Y=; b=aHxF/ZM04R9rP7tcUsRe PtxO0QEwdpEf9VeRQl0fD5//SZCNIEEF8rO6ensBYztM5iPCvqExNYexv4sNLbJsDywNtV0e646kX QhA9xvOdM0Ai07l7XCaMDvyleDI0rMwMp+jdWriIdAD2hanYW0gkR/P2vxGdyyzkpb3v3No6+FPkB f0QDCPjjcJIEisl99RTepn8YI7t9x4TUhLxtX/SIO2b2R7Eke67zUcFV2Tvcwf+hvrm3qqH5r+lef IHYJdYbZaLhrGtjllvBxhGDhXGF/2MBV1MT8d1TFdGPw1CrZ1wnk3l45eirnX999+/LSrXfIQqTJg y78539mO9Iu19g==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ada Stevenson Cc: Guix Devel Subject: Re: Error handling when 'guix substitute' dies In-Reply-To: <1843db1b-0ed0-7e77-5a31-de8ee9ca56a5@gmail.com> (Ada Stevenson's message of "Sun, 17 Mar 2024 06:18:51 +0000") References: <1843db1b-0ed0-7e77-5a31-de8ee9ca56a5@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 5 Germinal an 232 de la =?utf-8?Q?R=C3=A9vo?= =?utf-8?Q?lution=2C?= jour de la Poule 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: Sun, 24 Mar 2024 12:15:49 +0100 Message-ID: <87le67rica.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 4E9795AA11 X-Spam-Score: -9.58 X-Migadu-Spam-Score: -9.58 X-Migadu-Scanner: mx11.migadu.com X-TUID: GW1EcJCfuxt7 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ada, Ada Stevenson skribis: > Sometimes, usually when I'm on an enterprise network like my > university's of library's wifi, the `guix substitute` process dies > with a "TLS error in procedure 'write_to_session_record_port': Error > in the push function" error message. My connection is rock-solid > otherwise, and sometimes it doesn't happen at all. What version of guix-daemon are you using? Was it installed through =E2=80=98guix pull=E2=80=99 or via another distro? I=E2=80=99ve seen this before but I haven=E2=80=99t experienced it in a lon= g time, so I wonder if I=E2=80=99m just lucky or if there are other factors at play. > I'm not sure if this is a fault in the actual Guix code, or there's > some Guile library somewhere that has this bug. Anyway, I think it > would be a useful feature to have a way to automatically restart the > `guix substitute` process or otherwise recover from this error. Some > sort of `--restart=3Dno.restarts.permitted` flag. Whenever I'm updating > my system I tend to leave and do something else, and when this happens > I come back and nothing's actually been done, and the error is > transient so I don't gain anything from seeing this message. =E2=80=98guix substitute=E2=80=99 is a =E2=80=98guix-daemon=E2=80=99 helper= , which automatically (re)starts it when needed. Now, what we could do is have =E2=80=98guix substitute=E2=80=99 gracefully = handle those errors and keep going. I believe this one-liner should do it: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index 37cd08e289..3af0bf0019 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -494,7 +494,9 @@ (define* (download-nar narinfo destination (define (try-fetch choices) (match choices (((uri compression file-size) rest ...) - (guard (c ((and (pair? rest) (http-get-error? c)) + (guard (c ((and (pair? rest) + (or (http-get-error? c) + (network-error? c))) (warning (G_ "download from '~a' failed, trying next URL~%") (uri->string uri)) (try-fetch rest))) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I=E2=80=99ll go ahead with this change if there are no objections. Thanks, Ludo=E2=80=99. --=-=-=--