From fa70c141552c76cf4dc9666f577bf6b471fa0d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 15 Aug 2024 18:07:52 +0200 Subject: [PATCH] =?UTF-8?q?substitute:=20Reopen=20connection=20upon=20?= =?UTF-8?q?=E2=80=9CError=20in=20the=20push=20function=E2=80=9D=20from=20G?= =?UTF-8?q?nuTLS.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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(-) diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index 8bcbca5e7aa..8db730a9c0a 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -43,7 +43,11 @@ #: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 @@ server certificates." (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