Comments (13)
What version of the library are you using? 0.6.0
, or are you pinned to some commit?
from httpaf.
I believe it should be pinned to git+https://github.com/inhabitedtype/httpaf.git#0.6.2
.
from httpaf.
from httpaf.
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.
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.
@sazarkin IIRC request should be fixed-length, i.e. with Content-length header set?
from httpaf.
from httpaf.
I was able to reproduce it with this test case https://gist.github.com/sazarkin/8f93af46e5fa9cbdc4a37ed1b2cdd20a
from httpaf.
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.
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.
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.
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.
Looks like #158 fixed out problem, thanks @seliopou !
from httpaf.
Related Issues (20)
- Segfault in lwt_echo_post HOT 6
- Lack of backpressure when client code does not schedule read (httpaf-lwt-unix) HOT 4
- Infinite write loop with "Transfer-encoding: chunked" when client prematurely terminates HOT 8
- Chunked responses seem to be incorrect with streaming replies HOT 1
- Timeouts while responding under load HOT 15
- Reader is not waken up in case of immediate header flush with zero response body size HOT 8
- Example for decoding Json content
- Invalid HTTP headers cause server to return empty response HOT 3
- [Header.replace] function is not working properly HOT 6
- No error raised when timeout occurs reading response body HOT 1
- If multiple requests are received in one batched, the LWT backend blocks after the first. HOT 2
- 422 status is missing (Unprocessable_entity) HOT 1
- Set content-length automatically in Reqd.respond_with_string
- Parser resets to `Done` on failure HOT 1
- Latency under load
- http pipelining not working HOT 2
- Example in README does not work out of the box HOT 1
- Httpaf requrires OCaml >= 4.03, so `result` is not needed
- After `httpaf-lwt` and `httpaf-async` should there also be an `httpaf-eio` ? HOT 1
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 httpaf.