Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<socket: 8>: hClose: resource vanished (Broken pipe) #1937

Open
psibi opened this issue Jun 12, 2014 · 15 comments
Open

<socket: 8>: hClose: resource vanished (Broken pipe) #1937

psibi opened this issue Jun 12, 2014 · 15 comments

Comments

@psibi
Copy link

psibi commented Jun 12, 2014

I get the following error when I try to install a package using latest cabal:

Resolving dependencies...
sibi::sibi-desktop { ~/sandbox-test }-> cabal install --only-dependencies
Downloading attoparsec-0.12.1.0...
Failed to install attoparsec-0.12.1.0
cabal: Error: some packages failed to install:
attoparsec-0.12.1.0 failed while downloading the package. The exception was:
<socket: 8>: hClose: resource vanished (Broken pipe)

Cabal version used:

sibi::sibi-desktop { ~/sandbox-test }-> cabal --version
cabal-install version 1.20.0.2
using version 1.20.0.1 of the Cabal library

Additional information: I'm working under proxy. If I switch to older version of cabal (the one shipped with Ubuntu distribution), It installs the package without any problem.

Let me know if you need any additional information.

@psibi
Copy link
Author

psibi commented Jun 12, 2014

It is working if I connect to the Internet directly. (Just verified)

@tibbe
Copy link
Member

tibbe commented Jun 12, 2014

Does this always happen? It looks like your connection was dropped, which leads to a "broken pipe" error.

@psibi
Copy link
Author

psibi commented Jun 12, 2014

@tibbe Yes, it always happen.

If I remove the new version and re-install the cabal which was distributed with my distribution, it starts working again.

@tibbe
Copy link
Member

tibbe commented Jun 12, 2014

Could you run with -v3 and see if it tells you anything. Looking at the HTTP traffic on the wire (e.g. using Wireshark) might tell you if something funky is going on with the proxying. I cannot really debug this from here.

@psibi
Copy link
Author

psibi commented Jun 12, 2014

Everything now works after I started testing with -v3. (although it doesn't make sense.)

Closing the ticket as I'm not able to reproduce it anymore. Will re-open it, in case I'm able to reproduce this under certain conditions.

I'm not sure why it started working all of the sudden. But I have been facing the same problem from the day I upgraded to the latest version.

@psibi psibi closed this as completed Jun 12, 2014
@psibi
Copy link
Author

psibi commented Jun 19, 2014

Ok, this bug has started to reappear again. This is the full log I get with -v3 option:

sibi::sibi-desktop { ~/snapshot-analysis }-> cabal -v3 install --only-dependencies
Searching for ghc in path.
Found ghc at /usr/bin/ghc
("/usr/bin/ghc",["--numeric-version"])
/usr/bin/ghc is version 7.6.2
looking for tool ghc-pkg near compiler in /usr/bin
found ghc-pkg in /usr/bin/ghc-pkg
("/usr/bin/ghc-pkg",["--version"])
/usr/bin/ghc-pkg is version 7.6.2
("/usr/bin/ghc",["--supported-languages"])
("/usr/bin/ghc",["--info"])
Reading installed packages...
("/usr/bin/ghc-pkg",["dump","--global","-v0"])
("/usr/bin/ghc-pkg",["dump","--user","-v0"])
("/usr/bin/ghc",["--print-libdir"])
Reading available packages...
Warning: snapshot-analysis.cabal: Unknown fields: exposed-modules (line 20)
Fields allowed in this section:
main-is, buildable, build-tools, cpp-options, cc-options,
ld-options, pkgconfig-depends, frameworks, c-sources,
default-language, other-languages, default-extensions,
other-extensions, extensions, extra-libraries, extra-lib-dirs,
includes, install-includes, include-dirs, hs-source-dirs,
other-modules, ghc-prof-options, ghc-shared-options, ghc-options,
hugs-options, nhc98-options, jhc-options
Choosing modular solver.
Resolving dependencies...
[__0] trying: snapshot-analysis-0.1.0.0 (user goal)
[__1] trying: base-4.6.0.1/installed-e28... (dependency of snapshot-analysis-0.1.0.0)
[__2] trying: rts-1.0/installedbuil... (dependency of base-4.6.0.1/installed-e28...)
[__3] trying: integer-gmp-0.5.0.0/installed-49d... (dependency of base-4.6.0.1/installed-e28...)
[__4] trying: ghc-prim-0.3.0.0/installed-bd1... (dependency of base-4.6.0.1/installed-e28...)
[__5] trying: text-1.1.1.3/installed-0e8... (dependency of snapshot-analysis-0.1.0.0)
[__6] trying: deepseq-1.3.0.1/installed-5a5... (dependency of text-1.1.1.3/installed-0e8...)
[__7] trying: array-0.4.0.1/installed-bfd... (dependency of text-1.1.1.3/installed-0e8...)
[__8] trying: attoparsec-0.12.1.0/installed-5b4... (dependency of snapshot-analysis-0.1.0.0)
[__9] trying: scientific-0.3.2.1/installed-3ff... (dependency of attoparsec-0.12.1.0/installed-5b4...)
[_10] trying: hashable-1.2.2.0/installed-a0a... (dependency of scientific-0.3.2.1/installed-3ff...)
[_11] trying: containers-0.5.0.0/installed-835... (dependency of attoparsec-0.12.1.0/installed-5b4...)
[_12] trying: bytestring-0.10.0.2/installed-3da... (dependency of snapshot-analysis-0.1.0.0)
[_13] next goal: parsec (dependency of snapshot-analysis-0.1.0.0)
[_13] rejecting: parsec-3.1.3/installed-e11... (conflict: text==1.1.1.3/installed-0e8..., parsec => text==0.11.2.3/installed-86f...)
[_13] trying: parsec-3.1.5
[_14] trying: mtl-2.1.2/installed-36f... (dependency of parsec-3.1.5)
[_15] trying: transformers-0.3.0.0/installed-404... (dependency of mtl-2.1.2/installed-36f...)
[_16] trying: parsec-3.1.5:+base4
[_17] done
Ready to install parsec-3.1.5
Waiting for install task to finish...
Downloading parsec-3.1.5...
Sending:
GET
http://hackage.haskell.org/packages/archive/parsec/3.1.5/parsec-3.1.5.tar.gz
HTTP/1.1
User-Agent: cabal-install/1.20.0.2 (linux; x86_64)
Host: hackage.haskell.org

proxy uri host: 127.0.0.1, port: :3129
Creating new connection to 127.0.0.1:3129
Received:
HTTP/1.1 301 Moved Permanently
Server: nginx/1.6.0
Date: Thu, 19 Jun 2014 13:39:28 GMT
Content-Type: text/plain; charset=UTF-8
Location: /package/parsec-3.1.5/parsec-3.1.5.tar.gz
Content-Length: 0
Age: 3
Via: 1.1 localhost.localdomain
Connection: close

301 - redirect
Redirecting to
http://hackage.haskell.org/package/parsec-3.1.5/parsec-3.1.5.tar.gz ...
Sending:
GET http://hackage.haskell.org/package/parsec-3.1.5/parsec-3.1.5.tar.gz
HTTP/1.1
User-Agent: cabal-install/1.20.0.2 (linux; x86_64)
Host: hackage.haskell.org

proxy uri host: 127.0.0.1, port: :3129
Recovering connection to 127.0.0.1:3129
Failed to install parsec-3.1.5
cabal: Error: some packages failed to install:
parsec-3.1.5 failed while downloading the package. The exception was:
<socket: 8>: hClose: resource vanished (Broken pipe)

@psibi psibi reopened this Jun 19, 2014
@psibi
Copy link
Author

psibi commented Jun 19, 2014

Adding some additional information:

My local proxy is 127.0.0.1:3129. ( I have set this up using cntlm software. ) Let me know if you need any other additional information.

@nomeata
Copy link
Contributor

nomeata commented Jun 25, 2014

This seems to be a duplicate of #1602 and should go away with a fixed version of HTTP (see haskell/HTTP#14).

@tibbe tibbe closed this as completed Jun 25, 2014
@psibi
Copy link
Author

psibi commented Jul 11, 2014

This issue still doesn't seem to be fixed in the latest version.

@jackmaney
Copy link

I'm using OS X 10.9.5, and I'm having the same problem.

$ cabal --version
cabal-install version 1.22.6.0
using version 1.22.4.0 of the Cabal library
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.3

@arvidj
Copy link

arvidj commented Mar 29, 2017

I'm using Ubuntu 16.04.1 LTS, and I'm having the same problem.

$ cabal --version
cabal-install version 1.22.9.0
using version 1.22.5.0 of the Cabal library 
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.3

@insdami
Copy link

insdami commented May 15, 2017

Same here

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.2 LTS
Release:	16.04
Codename:	xenial
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.3
$ cabal --version
cabal-install version 1.22.6.0
using version 1.22.5.0 of the Cabal library 

@ezyang
Copy link
Contributor

ezyang commented May 29, 2017

I'm going to reopen this.

@ezyang ezyang reopened this May 29, 2017
@ezyang
Copy link
Contributor

ezyang commented May 29, 2017

Maybe you are all running into haskell/HTTP#68 which is still open.

@ezyang
Copy link
Contributor

ezyang commented May 29, 2017

See also #3073 which seems to be the recent ticket we are tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants