- Package:
- cabal-install
- Source:
- haskell-cabal-install
- Description:
- command-line interface for Cabal and Hackage
- Submitter:
- Zhang Zengbo
- Date:
- 2013-11-09 09:09:04 UTC
- Severity:
- important
Dear Maintainer, I am a new user of haskell-platform. After I installed it, I simply run: cabal update, it hangs, then I try to use --verbose=3 to see what happend: $ cabal update --verbose=3 Downloading the latest package list from hackage.haskell.org Sending: GET /packages/archive/00-index.tar.gz HTTP/1.1 Host: hackage.haskell.org User-Agent: cabal-install/1.16.0.2 Creating new connection to hackage.haskell.org Received: HTTP/1.1 301 Moved Permanently Server: nginx/1.4.2 Date: Sun, 03 Nov 2013 11:28:43 GMT Content-Type: text/plain; charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive Location: /packages/index.tar.gz Content-Length: 0 301 - redirect Redirecting to http://hackage.haskell.org/packages/index.tar.gz ... Sending: GET /packages/index.tar.gz HTTP/1.1 Host: hackage.haskell.org User-Agent: cabal-install/1.16.0.2 Recovering connection to hackage.haskell.org It hangs after the last output line of "Recovering connecton to hackage.haskell.org" I don't know if it is related to cabal-install itself or something else. however I did additional tests: 1) proxychains cabal update, $ proxychains cabal update --verbose=3 ProxyChains-3.1 (http://proxychains.sf.net) Downloading the latest package list from hackage.haskell.org Sending: GET /packages/archive/00-index.tar.gz HTTP/1.1 Host: hackage.haskell.org User-Agent: cabal-install/1.16.0.2 Creating new connection to hackage.haskell.org |DNS-request| hackage.haskell.org |S-chain|-<>-127.0.0.1:7070-<><>-4.2.2.2:53-<><>-OK |DNS-response| hackage.haskell.org is 88.198.224.242 Segmentation fault Note: my proxychains works well with wget. 2) install Wheezy (7.2) using debootstrap, chroot to it, install haskell platform and proxychains, do cabal update with and without proxychains, same results : hang without proxychains, Segmentation fault with proxychains. 3) install Wheezy (7.2) using kvm, do same as 2), once again get same results. So I guess there is something wrong in the network part of cabal-install.
Hi, Am Sonntag, den 03.11.2013, 19:41 +0800 schrieb Zhang Zengbo: unfortuately, I cannot reproduce it here. Is there anything special about your network setup? E.g. forced proxies or something of the kind? Greetings, Joachim
HI Joachim and all, I guess two situations may help to reproduce it: 1. I am behind two NATs, one is a home router, one is the connection point from ISP to Internet (maybe more, depends on ISP). 2. The network speed is slow from my pc to hackage server (about 10KB/s) And there is another phenomenon after I reported the bug: I tried again (3 times) to do cabal update, with two times get partial content (almost full, let me say, only ~200k lost compared to a wget-ed and verified version but I didn't record the number ) after about 10 minutes then it reported the tarball is broken; and the last time it hangs with 3 hours so I did Ctrl-C to exit (same as the bug report itself). If you need I can do more times and give some accurate data (time/size). From the new phenomenon, I guess again it is about a weak design of tcp itself: when there is only one direction of data flow, the sender may close the tcp link more quickly than the receiver at certain condition: for some point the sender lose all data packages (and re-transmissions) to the receiver, and the receiver don't know it at all. Although it is a tcp weakness, AFAIK, this should be overcome by some upper layer protocol implementation. And another thing I am surprised is about proxychains, it is 100% segmentation fault on my side. I just use a ssh dynamic port forwarding and in wget case it can speed up the download to hackage server. It should be easy to reproduce in my opinion. Best, Zengbo 2013/11/4 Joachim Breitner <nomeata@debian.org>
Dear Joachim and all mentainers: I have more information on this bug. When I changed ~/.cabal/config file to use remote-repo: old.hackage.haskell.org:http://old.hackage.haskell.org/ instead of remote-repo: hackage.haskell.org:http:// hackage.haskell.org/packages/archive cabal update successed; When I changed back to default, the issue is then reproducable again. In both case, proxychains cabal update will get segmentation fault. Hope it helps. Best, Zengbo 2013/11/4 张增波 <zengbo.zhang@gmail.com>