From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 wG1COklOAWZLIwEAqHPOHw:P1 (envelope-from ) for ; Mon, 25 Mar 2024 11:13:30 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id wG1COklOAWZLIwEAqHPOHw (envelope-from ) for ; Mon, 25 Mar 2024 11:13:30 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=cDK15zhC; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711361609; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ITGhj0ucPsSNF1pEDxcMNbor8E8vTLAblc8vueJZfOA=; b=G6N6Ltv3Yeu7I/ReHtYMeLsot+Tr0wrVFZ2AyOAJU9i2vOX93CfL2ZMLSYoLB0NilArd/k o6e+pZfNS++GV+x0CgebWNIgf4uhohLhmmD6uXw9iADQwAgQsbzqmYqTLMmv5xCHrGZMW/ I8D636PfIgXfOkNde2ZxrpGntxhf2Hm8/bbOv1fDmMOtaM29uJQdp/h/1SphRi51Zx21ZP 4ZVmNLS5N8FCfBiGmDhDpJeM7h4cb7K17sleJ/BfNIXSaj23BbOGfsKaIpO2epoQgArPv7 kFgSwt5wl4bbei3lnWq5ZmLAW3oATh+b3LaektlIIFy9ot4qb74foxVCDEFpdg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=cDK15zhC; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711361609; a=rsa-sha256; cv=none; b=KJ5L2yxfQFJMazlGvNY/Z58LS8E5VjTbI9dE0XT8DGD7LrH63RL/DhNGBPZ9SGzgl127P6 W0buu+hxysCSle1bRzF5GK4TjQaQqxJhYqdZgfNUcB7Tfi7JJWQCdxmlNXGN2miKVcJtJg S479CTpNSNtbempi3USnET1bcaC4gteb2OKxnnf/uodN33Ti7Z0MEFYwHVFC15ihNGISJr P7gUT88Z4bZ+xbFGK9Q4RTuWWMJacRA9eUP/FPMpRCsixl8LdwygNueXh8rydBqKnjDMdf qAfLlxTawyT4v4nZoK5lQPzsdZO43O/IW8BjDPIDqEUE308zQEdDbny4YviWKw== 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 8D5A53D2D5 for ; Mon, 25 Mar 2024 11:13:29 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rohJm-0003Ki-R5; Mon, 25 Mar 2024 06:12:38 -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 1rohJl-0003KY-Qr for guix-devel@gnu.org; Mon, 25 Mar 2024 06:12:37 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rohJk-0004Gu-77; Mon, 25 Mar 2024 06:12:37 -0400 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1e0bfc42783so4251875ad.0; Mon, 25 Mar 2024 03:12:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711361552; x=1711966352; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ITGhj0ucPsSNF1pEDxcMNbor8E8vTLAblc8vueJZfOA=; b=cDK15zhCdvNx9ZLPdlqwNCoW9eiu3xuFw0pKcEtDqGNQ93vR2o7B/CSKT0jTjtzXWV xN85/WqhpvYMJFu3G7K3GVFu9mT1i8jkoAzKM8lMPvzj5IRf/mtCIFPFNsa/fB9s6KOV T5ZCKKe3lCZ7Rseh5ufuFOSHIUc4SuWnQaQJ2jO487/DKxXmjozLNUezhC8AdNxs7aqg IId5u2fA1WFwHNSYIFn8Ey9JWHEvb/0UJvTi/TQMJA3PtdXqNG/ZxfobSyRkFgh5lSoL ByppTT0CALZ02PuCyVX11EAiKKFyz9/8ZXE2QejfVfsPey+hGsnH2iFGHvU3i2EOpiei J/8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711361552; x=1711966352; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ITGhj0ucPsSNF1pEDxcMNbor8E8vTLAblc8vueJZfOA=; b=IbHbvALlTGPq8pSFxikZpSJGVJW+b/pAMQkkF1LqK4U0ACju0qZUhynjxazB2Dbq+9 4/L7Aazz3xRJti7vyGHfcEOy5eulE7m2WIaHc3ssR8TrazXJQuhXjp9+Gkr61/RdAR/P 5dS6eg50A/JSZ25fzih7Da0Zdj0KaelsN2cUUoAhhrEn4rc7ojeKfiXNXOBuQfJQaGQq HwMOND0qxBC57pgNh9wzsAuDIS4INcM7GdOdRc5u8i3rT44A32E1SFXGPFN5E4FTx6/H BmFVOCZ3t8Ll+cL/13qg2H6Jt2Ym3+stECcqfW6cUZfLidUj9uctAeoL384dyNIzuLD0 h8Ig== X-Gm-Message-State: AOJu0YzhuORdKZ2DYi7nIgK6OjzzyM2IVg5cgocPs9Vs0KazGMhv05Wa Ev/kVTQNvRQHa1V7zEjlBjvuBoQ20ypYJjxRJ9Lh/vR2rznBa1Jf4wEVykS5 X-Google-Smtp-Source: AGHT+IFcMfgfSFUMM0DWpMwzqtGKaEyh/zoMoC0iuIevCbRHyye3h883t+bol+urmKTQdgTQeJThig== X-Received: by 2002:a17:902:eac6:b0:1e0:9a95:a230 with SMTP id p6-20020a170902eac600b001e09a95a230mr5577265pld.65.1711361551908; Mon, 25 Mar 2024 03:12:31 -0700 (PDT) Received: from [10.130.203.123] ([134.7.244.123]) by smtp.gmail.com with ESMTPSA id j17-20020a170902c3d100b001dd707d5fe6sm4368220plj.158.2024.03.25.03.12.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Mar 2024 03:12:31 -0700 (PDT) Message-ID: <4a012f56-b4d9-5ec6-e062-3f39aff5f055@gmail.com> Date: Mon, 25 Mar 2024 10:12:22 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: Error handling when 'guix substitute' dies Content-Language: en-US To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= Cc: Guix Devel References: <1843db1b-0ed0-7e77-5a31-de8ee9ca56a5@gmail.com> <87le67rica.fsf@gnu.org> From: Ada Stevenson In-Reply-To: <87le67rica.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=adanskana@gmail.com; helo=mail-pl1-x632.google.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 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, FREEMAIL_FROM=0.001, NICE_REPLY_A=-2.996, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: 8D5A53D2D5 X-Spam-Score: -9.62 X-Migadu-Spam-Score: -9.62 X-Migadu-Scanner: mx11.migadu.com X-TUID: Sb0Cpn1t8tSL Hi Ludo', On 3/24/24 11:15 AM, Ludovic Courtès wrote: > 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 > ‘guix pull’ or via another distro? > > I’ve seen this before but I haven’t experienced it in a long time, so I > wonder if I’m just lucky or if there are other factors at play. I'm running the up-to-date daemon, 1.4.0-18.4c94b9e, on Guix System. > >> 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=no.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. > ‘guix substitute’ is a ‘guix-daemon’ helper, which automatically > (re)starts it when needed. > > Now, what we could do is have ‘guix substitute’ gracefully handle those > errors and keep going. I believe this one-liner should do it: > > > 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))) > > I’ll go ahead with this change if there are no objections. Looks good to me! Thanks for looking into this :) > > Thanks, > Ludo’. Thanks, Ada