GithubHelp home page GithubHelp logo

Comments (13)

seliopou avatar seliopou commented on August 21, 2024

What version of the library are you using? 0.6.0, or are you pinned to some commit?

from httpaf.

Lupus avatar Lupus commented on August 21, 2024

I believe it should be pinned to git+https://github.com/inhabitedtype/httpaf.git#0.6.2.

from httpaf.

sazarkin avatar sazarkin commented on August 21, 2024

from httpaf.

seliopou avatar seliopou commented on August 21, 2024

I think I have an idea of what's going on here. Can you provide any more information about the sorts of requests that may be triggering this, e.g., fixed-length or chunked? Also, do you have a way of reliably reproducing this in your setup?

from httpaf.

sazarkin avatar sazarkin commented on August 21, 2024

I've added some debug prints maybe it helps.
I can reproduce it.

normal get request:

server_connection create
server_connection next_read_operation `Read
server_connection next_write_operation `Yield
server_connection yield_writer
Lwt_bytes.read `Ok(1678)
server_connection read 0 1678
server_connection next_write_operation `Yield
server_connection yield_writer
server_connection next_read_operation `Close
server_connection next_write_operation `Write
server_connection report_write_result
server_connection next_write_operation `Write
server_connection report_write_result
server_connection next_write_operation `Close

exactly the same request, produces error

server_connection create
server_connection next_read_operation `Read
server_connection next_write_operation `Yield
server_connection yield_writer
Lwt_bytes.read `Ok(1354)
server_connection read 0 1354
server_connection next_read_operation `Read
Lwt_bytes.read `Ok(325)
server_connection read 0 1609
server_connection next_write_operation
server_connection report_exn

from httpaf.

Lupus avatar Lupus commented on August 21, 2024

@sazarkin IIRC request should be fixed-length, i.e. with Content-length header set?

from httpaf.

sazarkin avatar sazarkin commented on August 21, 2024

from httpaf.

sazarkin avatar sazarkin commented on August 21, 2024

I was able to reproduce it with this test case https://gist.github.com/sazarkin/8f93af46e5fa9cbdc4a37ed1b2cdd20a

from httpaf.

seliopou avatar seliopou commented on August 21, 2024

I did a bunch of digging last night and thought I may have come up with something. But before I dig any further, could you confirm that you're using the latest version of angstrom (0.12.1)? If not, could you upgrade and try to reproduce with that?

from httpaf.

sazarkin avatar sazarkin commented on August 21, 2024

I was able to reproduce it with this pinned versions:
git+https://github.com/inhabitedtype/httpaf.git#0.6.2
git+https://github.com/inhabitedtype/angstrom.git#0.12.1

from httpaf.

seliopou avatar seliopou commented on August 21, 2024

I've got this reproduced in a test case. It's a re-entrancy issue. I should have a fix in the next couple days.

from httpaf.

Lupus avatar Lupus commented on August 21, 2024

Thanks Spiros! Much appreciated!

We're blocked on moving our freshly-built httpaf-based service out of staging area because of this bug :)

from httpaf.

sazarkin avatar sazarkin commented on August 21, 2024

Looks like #158 fixed out problem, thanks @seliopou !

from httpaf.

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.