From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Zero-length files cached by nginx Date: Tue, 03 Jan 2017 14:16:23 +0100 Message-ID: <87a8b85lnc.fsf@gnu.org> References: <20170103081718.GA1660@jocasta.intra> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOOx6-0004Nd-UU for guix-devel@gnu.org; Tue, 03 Jan 2017 08:16:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOOx2-0007Fy-Ik for guix-devel@gnu.org; Tue, 03 Jan 2017 08:16:32 -0500 In-Reply-To: <20170103081718.GA1660@jocasta.intra> (John Darrington's message of "Tue, 3 Jan 2017 09:17:18 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: John Darrington Cc: guix-devel@gnu.org John Darrington skribis: > and if I try to manually download https://mirror.hydra.gnu.org/nar/ciqw5z= 470c8ihl1kfswj1j3ix6hs092d-module-import > > I get a zero length file. :( Indeed: --8<---------------cut here---------------start------------->8--- $ wget -q -O - https://mirror.hydra.gnu.org/nar/ciqw5z470c8ihl1kfswj1j3ix6h= s092d-module-import |wc -c 0 $ wget -q -O - https://hydra.gnu.org/nar/ciqw5z470c8ihl1kfswj1j3ix6hs092d-m= odule-import |wc -c 0 --8<---------------cut here---------------end--------------->8--- So the problem is that nginx on hydra.gnu.org cached a zero-length file, and then nginx on mirror.hydra.gnu.org cached that too. On hydra.gnu.org, we have: --8<---------------cut here---------------start------------->8--- /var/cache/nginx/nar# cat 09/87d4a93959df3b0c82baed615b578109 X=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD:k= X`=EF=BF=BD=EF=BF=BD KEY: http://127.0.0.1:3000/nar/ciqw5z470c8ihl1kfswj1j3ix6hs092d-module-impo= rt HTTP/1.1 200 OK Content-Type: application/x-nix-archive Set-Cookie: hydra_session=3D437ad1277e047114d0a49212805fd1867c0cf914; path= =3D/; expires=3DTue, 10-Jan-2017 05:43:20 GMT; HttpOnly Transfer-Encoding: chunked Date: Tue, 03 Jan 2017 05:43:43 GMT Connection: close --8<---------------cut here---------------end--------------->8--- Hydra (the software) produces HTTP chunked-encoded nars, as can be seen above. Rereading , it seems that HTTP clients can detect truncated chunks, but they cannot detect missing chunks since the total number of chunks is unknown and the trailer is optional. Presumably, what happened is that hydra.gnu.org was loaded and Hydra dropped the connection, and then nginx cached what it got (i.e., nothing.) Seems like the only way to fix it is by using =E2=80=98Content-Length=E2=80= =99. At the very least, we should do that in =E2=80=98guix publish=E2=80=99. For now, I=E2=80=99ve removed the faulty cached item from the nginx cache on both machines. Thanks, Ludo=E2=80=99.