From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Cvt-0003ja-DB for guix-patches@gnu.org; Fri, 28 Apr 2017 16:56:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Cvq-0000iX-75 for guix-patches@gnu.org; Fri, 28 Apr 2017 16:56:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:46942) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d4Cvp-0000iP-VP for guix-patches@gnu.org; Fri, 28 Apr 2017 16:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d4Cvp-0001z5-Mo for guix-patches@gnu.org; Fri, 28 Apr 2017 16:56:01 -0400 Subject: bug#26489: [PATCH] substitute: Ignore bad responses. Resent-Message-ID: From: Tobias Geerinckx-Rice References: <20170414002755.32672-1-me@tobias.gr> <87lgr3gvqf.fsf@gnu.org> Message-ID: Date: Fri, 28 Apr 2017 22:56:34 +0200 MIME-Version: 1.0 In-Reply-To: <87lgr3gvqf.fsf@gnu.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="npVXO4qtCh3ejtBqxp5mOos9q2kBDJBPH" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: ludo@gnu.org Cc: 26489@debbugs.gnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --npVXO4qtCh3ejtBqxp5mOos9q2kBDJBPH Content-Type: multipart/mixed; boundary="vflTNfUvuReHV58fGNUqghpgn50k4jVmN"; protected-headers="v1" From: Tobias Geerinckx-Rice To: ludo@gnu.org Cc: 26489@debbugs.gnu.org Message-ID: Subject: Re: bug#26489: [PATCH] substitute: Ignore bad responses. References: <20170414002755.32672-1-me@tobias.gr> <87lgr3gvqf.fsf@gnu.org> In-Reply-To: <87lgr3gvqf.fsf@gnu.org> --vflTNfUvuReHV58fGNUqghpgn50k4jVmN Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludo', I should really send this message in my Drafts folder since 14/4... :-/ On 14/04/17 11:54, Ludovic Court=C3=A8s wrote: > Tobias Geerinckx-Rice skribis: >> One weird HTTP response from a server will kill =E2=80=98guix substitu= te=E2=80=99: >>=20 >> updating list of substitutes from 'https://foo'... 50.0%Backtrace: >> ... guix/ui.scm:1229:8: In procedure run-guix-command:=20 >> guix/ui.scm:1229:8: Throw to key `bad-response' with args `("Bad=20 >> Response-Line: ~s" (""))'. error: build failed: substituter=20 >> `substitute' died unexpectedly >>=20 >> Attached is a patch to ignore such bad responses. The offending=20 >> .narinfo will be ignored for that session, and not cached at all.=20 >> The result: >=20 > I=E2=80=99m sure you expect this question: what bad responses did you g= et in=20 > 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=E2=80=99s widespread enough, we=E2=80=99d better handle i= t, either in=20 > 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=E2=80=99s a genuine problem, we=E2=80=99d better not hide i= t. 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 =E2=80=94 this kills even =E2=80=98guix --keep-going --fallback=E2= =80=99. I'm less sure about the right place to do it Kind regards, T G-R --vflTNfUvuReHV58fGNUqghpgn50k4jVmN-- --npVXO4qtCh3ejtBqxp5mOos9q2kBDJBPH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQFBBAEBCgArFiEEeqzfDJ8DWw5d4xcqkczbm0hUG5kFAlkDrIMNHG1lQHRvYmlh cy5ncgAKCRCRzNubSFQbmWMfCACXx9L0VyzmtAs0U/tG6fQWpRlpPeCxQSUGqCmT XoFFroX+fZi2EGiL1n5RVsgY0p0CMETK69+TbLQT18nFnzgP1pa8ZD2BCFzgE/sl TQsHPtTbslF6KfFJlefd2WeNNSjSjr1NhHTzLywjShIFFj659p1ju/W0FJMOEgrd n99WxofOxN1vyX+Cp5CCTzRpx5gmFmFmyohBzEKOzismJuhE2i2+lAQE6m92DI+7 ldPfxBaLf5vVZ8VF+xHLD0GqKKt1fQ4RHhEf7xa27A4rM6f+2v6l/8WxACq+xjYf KuystEXSTg0pMphT9sGa7fgdZbqIjcE8db8Q2bp0YJy+8FBH =y+3J -----END PGP SIGNATURE----- --npVXO4qtCh3ejtBqxp5mOos9q2kBDJBPH--