From: Tobias Geerinckx-Rice <me@tobias.gr>
To: ludo@gnu.org
Cc: 26489@debbugs.gnu.org
Subject: bug#26489: [PATCH] substitute: Ignore bad responses.
Date: Fri, 28 Apr 2017 22:56:34 +0200 [thread overview]
Message-ID: <ca4baf38-3b11-1c8a-a7b1-167f6500c247@tobias.gr> (raw)
In-Reply-To: <87lgr3gvqf.fsf@gnu.org>
[-- Attachment #1.1: Type: text/plain, Size: 1959 bytes --]
Ludo',
I should really send this message in my Drafts folder since 14/4... :-/
On 14/04/17 11:54, Ludovic Courtès wrote:
> Tobias Geerinckx-Rice <me@tobias.gr> skribis:
>> One weird HTTP response from a server will kill ‘guix substitute’:
>>
>> updating list of substitutes from 'https://foo'... 50.0%Backtrace:
>> ... guix/ui.scm:1229:8: In procedure run-guix-command:
>> guix/ui.scm:1229:8: Throw to key `bad-response' with args `("Bad
>> Response-Line: ~s" (""))'. error: build failed: substituter
>> `substitute' died unexpectedly
>>
>> Attached is a patch to ignore such bad responses. The offending
>> .narinfo will be ignored for that session, and not cached at all.
>> The result:
>
> I’m sure you expect this question: what bad responses did you get in
> practice? :-)
In fact, not really. The error message looked unambiguous to me: the
HTTP response (the first line returned to the client, e.g. "HTTP/1.1 200
OK") was simply empty, throwing an exception.
Interestingly, a newline seems to be required.
Using http://bad.http.response.tobias.gr as a substitute server triggers
it. http://no.http.response.tobias.gr does not.
> Usually that is a sign of a broken HTTP server.
I think it's actually something in-between me and the server. I'll take
a closer look next time this happens.
> Of course it’s widespread enough, we’d better handle it, either in
> Guix or directly in (web client) in Guile;
As I read it, (web client) considers throwing a BAD-RESPONSE exception
the best or only way to deal with an error like this. I agree.
> OTOH, if it’s a genuine problem, we’d better not hide it.
Well, we don't hide it, per se. Hence the error message.
I think throwing an unhandled exception is definitely the wrong thing to
do here — this kills even ‘guix --keep-going --fallback’. I'm less sure
about the right place to do it
Kind regards,
T G-R
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 504 bytes --]
next prev parent reply other threads:[~2017-04-28 20:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-14 0:27 bug#26489: [PATCH] substitute: Ignore bad responses Tobias Geerinckx-Rice
2017-04-14 9:54 ` Ludovic Courtès
2017-04-28 20:56 ` Tobias Geerinckx-Rice [this message]
2017-05-01 13:14 ` Ludovic Courtès
2020-12-18 20:19 ` [bug#26489] " zimoun
2020-12-20 13:39 ` Ludovic Courtès
2021-01-11 13:08 ` zimoun
2021-01-15 19:52 ` Julien Lepiller
2021-02-09 1:05 ` zimoun
2021-02-09 8:42 ` bug#26489: " 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=ca4baf38-3b11-1c8a-a7b1-167f6500c247@tobias.gr \
--to=me@tobias.gr \
--cc=26489@debbugs.gnu.org \
--cc=ludo@gnu.org \
/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).