From patchwork Thu Aug 15 16:18:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 30080 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A8E2927BBE9; Thu, 15 Aug 2024 17:19:51 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0DADC27BBE2 for ; Thu, 15 Aug 2024 17:19:51 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sedCH-0005q1-5g; Thu, 15 Aug 2024 12:19:33 -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 1sedCE-0005pm-0Q for guix-patches@gnu.org; Thu, 15 Aug 2024 12:19:30 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sedCD-0005jU-4l; Thu, 15 Aug 2024 12:19:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=yiVK7xbBrgMU8PEhQItGNkzOtEIcrx0usFaEuIFJXqA=; b=PCDvs1KQNQh1jdOc8XC/LFUkqSWW8QCkrStKgjvygcudYMR0ELEESjKg9PHxf1nVxVRBY+YQ1qd5TvW2p+iRSZifOAZTErLpYhXT/1vKBExzzxKU6/ez1MICo9yH+uB5oVCENN1Ma90I3Ph9TQTm1F+XKiSBT2XzQdDxCITQ+Zpj5kb3b5AQu9h5jFa/3mAmB7Bcl85jPaahtITT6VuY2PCSphwa/g1AQV9LiKmeyXnku+oK/Uu/Ktm+YUF6gAnVMatmDSYtu4/rCBexvu6Vr2NNVfmMTeRkdqEJiCX4xx8tZ2T40HaSF9u8uUT/pX7TifulG55L1US7gvnCwqJoQw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sedCj-0002L2-Qa; Thu, 15 Aug 2024 12:20:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72642] [PATCH] substitute: Reopen connection upon =?utf-8?b?4oCcRXJyb3I=?= in the push =?utf-8?b?ZnVuY3Rpb27igJ0=?= from GnuTLS. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Thu, 15 Aug 2024 16:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72642 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72642@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by submit@debbugs.gnu.org id=B.17237387508914 (code B ref -1); Thu, 15 Aug 2024 16:20:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Aug 2024 16:19:10 +0000 Received: from localhost ([127.0.0.1]:49576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sedBt-0002Ji-VD for submit@debbugs.gnu.org; Thu, 15 Aug 2024 12:19:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:60906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sedBs-0002Ja-3g for submit@debbugs.gnu.org; Thu, 15 Aug 2024 12:19:08 -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 1sedBH-0005lO-5P for guix-patches@gnu.org; Thu, 15 Aug 2024 12:18:31 -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 1sedBG-0005UO-T9; Thu, 15 Aug 2024 12:18:30 -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:Subject:To:From:in-reply-to: references; bh=yiVK7xbBrgMU8PEhQItGNkzOtEIcrx0usFaEuIFJXqA=; b=GLNJ7L4igWoheO qQS/N8CJ2iM5vUD15VRnO+W+jpyZUKwzzNl9WnAzGiWA3gWWZj0iZEsvwbMCGjmmRXJWRujXJtgcp KSz6w9SG/8k5YhhqyWgyvAPaGzeCWQ9fjeO0QGSBttDyVhCJ+uxlEv+CbKqEnbmJmNaSszhIZZmGG ZiVMUSUQYY/4bcFsFRVDv7Vz9+cRA1A2gvW9JwUIIb4WRZGMDxS5X5MYSZmXdQtAySyGbbEbxEoYt zXLXrHorXXdKgpYug4AoOB2x1U0hL3d/uyZoG0lg+xSWcfWB+4jJHY4rKyPiBVDYfxUj/wOmuJt9U Hn7j7z1ftBf/VZOEGn/A==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Thu, 15 Aug 2024 18:18:19 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This works around an occasional issue where substitution stops abruptly due to “Error in the push function” from GnuTLS, as reported at by Richard Sent. * guix/scripts/substitute.scm (call-with-cached-connection): Add ‘error/push-error’ and ‘error/pull-error’ to the list of gnutls-error values for which the connection is reopened. Change-Id: Icf079dd10b16739f62fee15bc3d90bab77110576 --- guix/scripts/substitute.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) Hi! This is an attempt to work around the dreaded “Error in the push function” coming from GnuTLS and that would cause substitution to fail (“‘guix substitute’ died unexpectedly”). With this patch, a new connection attempt is made. This is not fully satisfactory since we don’t understand yet what causes that error, which is not supposed to happen AIUI. But at least, it should provide more graceful handling. Thoughts? Thanks, Ludo’. base-commit: 72e586fcae78e467d01e2add09c1db26be6bfa93 diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index 8bcbca5e7a..8db730a9c0 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -43,7 +43,11 @@ (define-module (guix scripts substitute) #:select (uri-abbreviation nar-uri-abbreviation (open-connection-for-uri . guix:open-connection-for-uri))) - #:autoload (gnutls) (error/invalid-session error/again error/interrupted) + #:autoload (gnutls) (error/invalid-session + error/again + error/interrupted + error/push-error + error/pull-error) #:use-module (guix progress) #:use-module ((guix build syscalls) #:select (set-thread-name)) @@ -426,6 +430,11 @@ (define (call-with-cached-connection uri proc) (memq (first args) (list error/invalid-session + ;; "Error in the push function" is + ;; usually a transient error. + error/push-error + error/pull-error + ;; XXX: These two are not properly handled in ;; GnuTLS < 3.7.3, in ;; 'write_to_session_record_port'; see