Re: [patch] #562: cabal-install update fails going through a HTTP proxy

Valery V. Vorotyntsev wrote:
Sorry, Sigbjorn, it didn't work.
Sigbjorn Finne wrote:
Thanks - that's good, now we know :)
I'm not so sure any more.
I've rolled back to patched HTTP-4000.0.8, the one with connection closing commented out in `sendHTTP_notify'. I need this proxy downloading thing to just work...
Cabal client reinstalled with "patched" HTTP-4000.0.8 was still having occasional failures today. My proxy-POC.hs always succeeded, while cabal failed quite often with familiar cabal: Codec.Compression.Zlib: premature end of compressed stream This means that proxy-POC.hs is not trustworthy: it doesn't expose the bug in 100% cases. I am going to roll back even further tomorrow: I'll patch [1] cabal-install to use strict ByteStrings and see if /that/ does the job. (I'm not sure in anything any more.) [1] http://hpaste.org/fastcgi/hpaste.fcgi/view?id=9447#a9504
I suspect tempering the notion of close and doing a socket shutdown is the way forward here.
So do I... If my suspicions are of any significance after several delusive "Wolf!" cries [2,3]. [2] http://hackage.haskell.org/trac/hackage/ticket/562#comment:9 [3] http://trac.haskell.org/http/ticket/8#comment:7
I'll see if I can play with this some tonight.
I've installed squid proxy server. Gotta make this bug exposable... -- Regards, vvv

On Mon, Nov 16, 2009 at 11:15 PM, Valery V. Vorotyntsev
Cabal client reinstalled with "patched" HTTP-4000.0.8 was still having occasional failures today. My proxy-POC.hs always succeeded, while cabal failed quite often with familiar
cabal: Codec.Compression.Zlib: premature end of compressed stream
This means that proxy-POC.hs is not trustworthy: it doesn't expose the bug in 100% cases.
I am going to roll back even further tomorrow: I'll patch [1] cabal-install to use strict ByteStrings and see if /that/ does the job. (I'm not sure in anything any more.)
[1] http://hpaste.org/fastcgi/hpaste.fcgi/view?id=9447#a9504
Strict bytestrings in cabal-install do the job, yes.
I've installed squid proxy server. Gotta make this bug exposable...
Downloading through local squid did not manifest the bug. * * * Sigbjorn, I am stuck. If you have some idea on how to pursue this bug (print debugging with Debug.Trace?), I'll be delighted to test it. The bug is reproducible from within office LAN (read: ``business hours, 8 am to 16 pm UTC''): $ cabal update -v3 Downloading the latest package list from hackage.haskell.org Sending: GET http://hackage.haskell.org/packages/archive/00-index.tar.gz HTTP/1.1 Proxy-Authorization: Basic SG93IGFyZSB5b3U/ User-Agent: cabal-install/0.6.2 Host: hackage.haskell.org proxy uri host: xproxy, port: :3128 Creating new connection to xproxy:3128 Received: HTTP/1.0 200 OK Date: Mon, 23 Nov 2009 12:15:23 GMT Server: Apache/2.2.3 (Debian) Last-Modified: Mon, 23 Nov 2009 01:21:45 GMT ETag: "388dda-141754-a6117c40" Accept-Ranges: bytes Content-Length: 1316692 Content-Type: application/x-tar Content-Encoding: x-gzip X-Cache: MISS from xproxy.foo.bar.ua X-Cache-Lookup: MISS from xproxy.foo.bar.ua:3128 Via: 1.1 xproxy.foo.bar.ua:3128 (squid/2.7.STABLE6) Connection: close Downloaded to /home/vvv/.cabal/packages/hackage.haskell.org/00-index.tar.gz cabal: Codec.Compression.Zlib: premature end of compressed stream Have fun! -- vvv
participants (1)
-
Valery V. Vorotyntsev