GNU bug report logs - #72642
[PATCH] substitute: Reopen connection upon “Error in the push function” from GnuTLS.

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Thu, 15 Aug 2024 16:20:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72642 in the body.
You can then email your comments to 72642 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix <at> cbaines.net, dev <at> jpoiret.xyz, ludo <at> gnu.org, othacehe <at> gnu.org, zimon.toutoune <at> gmail.com, me <at> tobias.gr, guix-patches <at> gnu.org:
bug#72642; Package guix-patches. (Thu, 15 Aug 2024 16:20:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludo <at> gnu.org>:
New bug report received and forwarded. Copy sent to guix <at> cbaines.net, dev <at> jpoiret.xyz, ludo <at> gnu.org, othacehe <at> gnu.org, zimon.toutoune <at> gmail.com, me <at> tobias.gr, guix-patches <at> gnu.org. (Thu, 15 Aug 2024 16:20:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH] substitute: Reopen connection upon “Error in the push function” from GnuTLS.
Date: Thu, 15 Aug 2024 18:18:19 +0200
This works around an occasional issue where substitution stops abruptly
due to “Error in the push function” from GnuTLS, as reported at
<https://issues.guix.gnu.org/71238> 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’.

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

base-commit: 72e586fcae78e467d01e2add09c1db26be6bfa93
-- 
2.45.2





bug closed, send any further explanations to 72642 <at> debbugs.gnu.org and Ludovic Courtès <ludo <at> gnu.org> Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 31 Aug 2024 17:11:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 29 Sep 2024 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 265 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.