Comments (14)
Could you check if this is a regression between 4000.2.16 and 4000.2.17? It turns out #68 is a regression caused by 5c1c7ba, though we don't yet know the details. As this problem is in vaguely the same area it seems worth checking.
from http.
@hsenag Sure, I'll check.
from http.
@hsenag Still no luck.
http-test> dist\build\http-test\http-test.exe
Trying to download http://hackage.haskell.org/packages/archive/00-index.tar.gz
Sending:
GET /packages/archive/00-index.tar.gz HTTP/1.1
Host: hackage.haskell.org
User-Agent: cabal-install/1.18.0.5
Creating new connection to hackage.haskell.org
Received:
HTTP/1.1 301 Moved Permanently
Server: nginx/1.6.0
Date: Mon, 01 Sep 2014 16:00:40 GMT
Content-Type: text/plain; charset=UTF-8
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.18.0.5
Recovering connection to hackage.haskell.org
http-test.exe: <socket: 336>: hGetBufSome: failed (Unknown error)
Here's what was linked (notice some interesting warnings):
http-test> cabal repl
Preprocessing executable 'http-test' for http-test-0.1.0.0...
GHCi, version 7.8.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.5.0.0 ... linking ... done.
Loading package deepseq-1.3.0.2 ... linking ... done.
Loading package bytestring-0.10.4.0 ... linking ... done.
Loading package Win32-2.3.0.2 ... linking ... done.
Loading package filepath-1.3.0.2 ... linking ... done.
Loading package old-locale-1.0.0.6 ... linking ... done.
Loading package time-1.4.2 ... linking ... done.
Loading package directory-1.2.1.0 ... linking ... done.
Loading package text-1.1.0.0 ... linking ... done.
Loading package hashable-1.2.2.0 ... linking ... done.
Loading package case-insensitive-1.1.0.3 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package mtl-2.1.3.1 ... linking ... done.
Loading package parsec-3.1.5 ... linking ... done.
Loading package network-2.4.2.3 ... linking ... ghc.exe: warning: inet_ntoa from ws2_32 is linked instead of __imp_inet_ntoa
ghc.exe: warning: getnameinfo from ws2_32 is linked instead of __imp_getnameinfo
ghc.exe: warning: getaddrinfo from ws2_32 is linked instead of __imp_getaddrinfo
ghc.exe: warning: freeaddrinfo from ws2_32 is linked instead of __imp_freeaddrinfo
ghc.exe: warning: accept from ws2_32 is linked instead of __imp_accept
ghc.exe: warning: WSACleanup from ws2_32 is linked instead of __imp_WSACleanup
ghc.exe: warning: WSAStartup from ws2_32 is linked instead of __imp_WSAStartup
ghc.exe: warning: WSACleanup from ws2_32 is linked instead of __imp_WSACleanup
done.
Loading package old-time-1.1.0.2 ... linking ... done.
Loading package HTTP-4000.2.16 ... linking ... done.
Ok, modules loaded: Main.
from http.
Anyway I can help further to track this bug down?
from http.
It's going to be hard unless we can isolate what is triggering it on your system.
I've recently got a new Windows 8.1 machine and I've tried your test program myself with GHC 7.8.3, both 32 bit and 64 bit versions, and it works fine. I don't get any of the ws2_32 warnings above.
Note that I do have msys2 installed, but I've also tried compiling and running directly from a command prompt.
Some random thoughts:
- Are gcc and ld coming from the right place (i.e. mingw/bin in the GHC install)?
- Does GHC 7.6.3 work?
- Are you using 32-bit or 64-bit GHC and have you tried the other one?
- Is the problem with the build binary or your machine, i.e. if you move a binary from your machine to a working one does the binary work, and vice-versa?
I also googled for your warning and found
https://ghc.haskell.org/trac/ghc/ticket/8918 and haskell/network#132
I'm not sure if they are relevant but it may be worth trying a recent version of the network package from github.
from http.
Terrible news: I can no longer reproduce this! My only guess as to why it disappeared is some combination of the following:
- Installing Cygwin (although removing it has not reintroduced the issue)
- Windows update of some sort
- Update to Covenant Eyes (Internet monitoring/filtering software)
My money is on the last one.
from http.
Well, at least your problem is fixed :-) Hopefully the record will be useful if anyone else has a random problem like this in future.
from http.
I can reproduce the problem on my Windows Server 2012, both with cabal update and the test program. I built the test program against http 4000.2.10 (the version in Haskell Platform 2014.2.0.0).
The problem is intermittent, it doesn't fail every time. Sometimes the test program will succeed several times in a row and sometimes it will fail several times in a row.
from http.
Do you have any of the warnings the original reporter had from 'cabal repl'?
ghc.exe: warning: getnameinfo from ws2_32 is linked instead of __imp_getnameinfo
from http.
Yes, I do see the same warnings.
from http.
I think I know what the problem is. I'm getting the problem when running cabal behind a proxy. It seems like on my network the firewall allows outgoing connections w/o proxy but then kills them. On my network cabal also fails on Linux. The workaround that works both for Linux and Windows is to specify proxy via the environment variables HTTP_PROXY and HTTPS_PROXY.
I'm guessing that the HTTP library can no longer detect system proxy configuration on Windows 8.x. It appears to detect it on older versions of Windows.
from http.
Could the linking warnings be related to the inability to detect the system proxy configuration? (Good find, by the way.)
from http.
The build warning? I doubt that, proxy detection should be a runtime operation.
from http.
Right, but I'm thinking that potentially linking the wrong functions at compile time could cause runtime failure.
from http.
Related Issues (20)
- Typo in documentation of Network.HTTP.getResponseCode
- Add warning for lack of HTTPS support HOT 6
- Commits missing on github? HOT 1
- Bump bounds on win32? HOT 3
- Support for network 2.8.x? HOT 5
- Extract Code that Creates http Headers and Body HOT 2
- findHeader is case-sensitive for custom headers HOT 2
- Support for GHC-9.0 HOT 5
- Upcoming breakage with transformers-0.6 / mtl-2.3 HOT 6
- Ik
- Compatibility with mtl-2.3 HOT 1
- Better error message when HTTP_PROXY is down.
- cabal install gets stuck at Recovering connection to hackage.haskell.org HOT 2
- Custom instances of HStream impossible to write
- urlEncodeVars does not properly encode arrays HOT 1
- Not building with ghc 7.8 HOT 3
- Remove dep on old-time? HOT 4
- simpleHTTP raises exception on connection refused HOT 1
- Mac OSX 10.11.2 HTTP Error HOT 7
- GHC 8.0.1 support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from http.