From: "Ludovic Courtès" <ludo@gnu.org>
To: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
Cc: guix-devel@gnu.org, jcguu95 <jcguu95@gmail.com>, 47867@debbugs.gnu.org
Subject: Re: bug#47867: [1.2.1 pre-release testing] substitute downloading and TLS errors
Date: Wed, 21 Apr 2021 00:38:58 +0200 [thread overview]
Message-ID: <8735vk8ttp.fsf@gnu.org> (raw)
In-Reply-To: <20210420152754.a3ucylrdugrmxu57@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Tue, 20 Apr 2021 17:27:54 +0200")
[-- Attachment #1: Type: text/plain, Size: 1656 bytes --]
Hi Florian,
"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> skribis:
> On Tue, Apr 20, 2021 at 03:21:13AM +0200, pelzflorian (Florian Pelz) wrote:
>> > git revert be5a75ebb5988b87b2392e2113f6590f353dd6cd
>
> It seems this is the bad commit. Downloading the enlightenment
> substitute got stuck and after a few minutes displayed the usual TLS
> error.
Note that on master there have been changes in this area since this
commit, in particular 20c08a8a45d0f137ead7c05e720456b2aea44402.
I assume the error we’re after is still this one:
>> | substitute: updating substitutes from 'https://ci.guix.gnu.org'... 0.0%guix substitute: error: TSL error in procedure 'write_to_session_port': Resource temporarily unavailable, try again.
I believe the attached patch “addresses” this problem.
Now, I’m a bit skeptical: the error above is GNUTLS_E_AGAIN, which
happens if sendmsg(2) returns EAGAIN, which supposedly only happens on
datagram (UDP) sockets or on non-blocking sockets, neither of which
applies here.
This change should be safe, though since I’m not sure why we’re getting
EAGAIN in the first place, I wonder what could happen (infinite loop?).
Could you give it a try?
Can you reproduce the substitute issue in a simpler environment?
For instance, by running:
rm -rf ~/.cache/guix/substitute/
./pre-inst-env guix weather $(guix package -A |head -2000 |cut -f1)
This makes 2000 pipelined GETs to https://ci.guix.gnu.org, which is
probably similar to what you observe during system installation.
Thanks for the thorough debugging and bisecting, as always!
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2170 bytes --]
diff --git a/guix/http-client.scm b/guix/http-client.scm
index a2e11a1b73..51bba250d5 100644
--- a/guix/http-client.scm
+++ b/guix/http-client.scm
@@ -38,7 +38,7 @@
#:use-module (guix utils)
#:use-module (guix base64)
#:autoload (gcrypt hash) (sha256)
- #:autoload (gnutls) (error/invalid-session)
+ #:autoload (gnutls) (error/invalid-session error/again)
#:use-module ((guix build utils)
#:select (mkdir-p dump-port))
#:use-module ((guix build download)
@@ -163,7 +163,8 @@ reusing stale cached connections."
(if (or (and (eq? key 'system-error)
(= EPIPE (system-error-errno `(,key ,@args))))
(and (eq? key 'gnutls-error)
- (eq? (first args) error/invalid-session))
+ (memq (first args)
+ (list error/again error/invalid-session)))
(memq key
'(bad-response bad-header bad-header-component)))
#f
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 48309f9b3a..65940591a9 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -45,7 +45,7 @@
#:select (uri-abbreviation nar-uri-abbreviation
(open-connection-for-uri
. guix:open-connection-for-uri)))
- #:autoload (gnutls) (error/invalid-session)
+ #:autoload (gnutls) (error/invalid-session error/again)
#:use-module (guix progress)
#:use-module ((guix build syscalls)
#:select (set-thread-name))
@@ -417,7 +417,8 @@ server certificates."
(if (or (and (eq? key 'system-error)
(= EPIPE (system-error-errno `(,key ,@args))))
(and (eq? key 'gnutls-error)
- (eq? (first args) error/invalid-session))
+ (memq (first args)
+ (list error/again error/invalid-session)))
(memq key '(bad-response bad-header bad-header-component)))
(proc (open-connection-for-uri/cached uri
#:verify-certificate? #f
next prev parent reply other threads:[~2021-04-20 22:39 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-17 3:40 1.2.1 pre-release testing jcguu95
2021-04-17 5:43 ` Leo Famulari
2021-04-17 11:35 ` GIT_EXEC_PATH " François
2021-04-17 17:24 ` Leo Famulari
2021-04-17 18:07 ` François
2021-04-17 9:32 ` pelzflorian (Florian Pelz)
2021-04-17 12:58 ` Guu, Jin-Cheng
2021-04-17 13:17 ` pelzflorian (Florian Pelz)
2021-04-17 17:27 ` Leo Famulari
2021-04-17 21:57 ` pelzflorian (Florian Pelz)
2021-04-18 0:09 ` Guu, Jin-Cheng
2021-04-18 0:19 ` Leo Famulari
2021-04-18 8:57 ` pelzflorian (Florian Pelz)
2021-04-18 9:38 ` [1.2.1 pre-release testing] substitute downloading and TLS errors pelzflorian (Florian Pelz)
2021-04-18 9:44 ` bug#47867: " pelzflorian (Florian Pelz)
2021-04-18 9:48 ` pelzflorian (Florian Pelz)
2021-04-18 9:57 ` pelzflorian (Florian Pelz)
2021-04-18 10:15 ` Ludovic Courtès
2021-04-18 11:33 ` pelzflorian (Florian Pelz)
2021-04-18 12:10 ` pelzflorian (Florian Pelz)
2021-04-19 8:05 ` pelzflorian (Florian Pelz)
2021-04-19 8:22 ` pelzflorian (Florian Pelz)
2021-04-19 11:02 ` pelzflorian (Florian Pelz)
2021-04-20 1:21 ` pelzflorian (Florian Pelz)
2021-04-20 15:27 ` pelzflorian (Florian Pelz)
2021-04-20 17:03 ` pelzflorian (Florian Pelz)
2021-04-20 18:00 ` Leo Famulari
2021-04-20 19:41 ` pelzflorian (Florian Pelz)
2021-04-20 22:38 ` Ludovic Courtès [this message]
2021-04-21 20:17 ` pelzflorian (Florian Pelz)
2021-04-23 9:19 ` Ludovic Courtès
2021-04-23 14:07 ` pelzflorian (Florian Pelz)
2021-04-24 17:13 ` Ludovic Courtès
2021-04-25 0:20 ` pelzflorian (Florian Pelz)
2021-06-21 19:18 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8735vk8ttp.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=47867@debbugs.gnu.org \
--cc=guix-devel@gnu.org \
--cc=jcguu95@gmail.com \
--cc=pelzflorian@pelzflorian.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).