Coder Social home page Coder Social logo

Comments (13)

bergmark avatar bergmark commented on June 14, 2024

We have the same error when forwarding connections through spiped with Cabal built against the latest HTTP version.

from http.

nomeata avatar nomeata commented on June 14, 2024

@bergmark: Thanks. Maybe spiped provides a simple way for the HTTP developers to reproduce out issues. Can you describe a simple local setup that exhibits the error? Preferably with HTTP directoy and not involving cabal-install? This might speed up the resolving of this ticket.

from http.

bergmark avatar bergmark commented on June 14, 2024

I'll ask my colleagues about it tomorrow.

from http.

hsenag avatar hsenag commented on June 14, 2024

Just to set expectations:

As far as I know HTTP has one active maintainer (me) and zero long-term developers. Here I use "maintainer" in the sense of merging patches, making releases, perhaps the odd minor fix particularly when a new GHC comes along, and "developer" in the sense of people spending significant amounts of time working on fixing bugs and developing new features.

A reliable repro case, would definitely be a significant step towards getting this fixed, but it'll still need someone to make the fix. Ideally a repro would be expressed as a self-contained addition to the test-suite, but this may be harder if it relies on external software such as spiped.

from http.

psibi avatar psibi commented on June 14, 2024

I have been debugging on the issue. Cabal receives a message like this:

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: Mon, 14 Jul 2014 06:26:44 GMT
Content-Type: text/plain; charset=UTF-8
Location: /package/storable-record-0.0.3/storable-record-0.0.3.tar.gz
Content-Length: 0
Age: 5
Via: 1.1 localhost.localdomain
Connection: close

Whenever we see "close" messages in the response, we clean the connection pool using the isTCPConnectedTo function. But the problem here is, the isTCPConnectedTo doesn't return False even though we receive "close" message. Any pointers on how to tackle this problem ?

from http.

bergmark avatar bergmark commented on June 14, 2024

To clarify here as well, this is a regression in HTTP-4000.2.17, 4000.2.16 does not have this problem.

from http.

hsenag avatar hsenag commented on June 14, 2024

OK, hopefully tracking it down will be much easier then.

The main difference between 4000.2.17 and 4000.2.16 is that openTCPConnection_ was rewritten in commit 5c1c7ba. It's not immediately obvious to me why that would cause this problem, but would you be able to verify if that commit triggers the problem, or otherwise bisect to figure out which other commit is responsible?

from http.

bergmark avatar bergmark commented on June 14, 2024

Yep, that's the offending commit!

from http.

hsenag avatar hsenag commented on June 14, 2024

Hmm - not really obvious why that would cause the symptoms described above. Any chance of a script that reproduces the problem? Even if it relies on having spiped installed it'd at least help with debugging, if not automated testing.

from http.

hsenag avatar hsenag commented on June 14, 2024

Also pinging @dermesser who wrote the commit - any thoughts about how it might be triggering this problem?

from http.

nomeata avatar nomeata commented on June 14, 2024

Just a small bump, as I just ran into the problem of cabal: does not exist again.

from http.

erikd avatar erikd commented on June 14, 2024

I've hit this as well. Will try downgrading HTP.

from http.

Blaisorblade avatar Blaisorblade commented on June 14, 2024

The cabal-install error message is discussed in haskell/cabal#1914cabal never prints a decent error message when there are any network problems, so I get the same symptoms with the earlier HTTP-4000.2.10.

$ http_proxy=http://127.0.0.1 cabal update
Downloading the latest package list from hackage.haskell.org
cabal: does not exist

where there's no proxy at http://127.0.0.1 (just detaching the network also fails).
That issue is also discussed in http://www.yesodweb.com/blog/2015/06/cabals-does-not-exist-error-message.
So, we indeed need a smaller testcase.

This ticket is about the more restricted problem with proxies, introduced with 5c1c7ba.

@psibi wrote:

But the problem here is, the isTCPConnectedTo doesn't return False even though we receive "close" message. Any pointers on how to tackle this problem ?

At that point, did the client side already react to close by closing the connection? Both sides are supposed to do that.

Regarding 5c1c7ba, there's a bunch of undocumented changes in there, and if anybody has the setup to debug this problem, it'd help to bisect those changes further. None of that should make a difference, but some does, and they interact with huge chunks of code.

from http.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.