6 ms·
> The failure was caused by a timing-dependent race condition in hyper’s HTTP/1 connection handling. When the reader was slower and the socket buffer filled, po
by 100ms 3mo ago
> The failure was caused by a timing-dependent race condition in hyper’s HTTP/1 connection handling. When the reader was slower and the socket buffer filled, poll_flush returned Poll::Pending, but the dispatch loop discarded that result. Hyper then treated the response as complete and shut down the socket while data remained buffered internally, causing the client to receive an EOF before the full body arrived.
https://github.com/hyperium/hyper/issues/4022 https://github.com/hyperium/hyper/issues/4022
Saved you 3000 words
- michalc 3mo agoReminds me of another “slow client”-related bug in gunicorn: https://github.com/benoitc/gunicorn/issues/3334 https://github.com/benoitc/gunicorn/issues/3334
- microgpt 3mo agoThat's not even a bug. That's how TCP works. If you keep sending data to a socket the other side has closed, you get RST.
- edelbitter 3mo agoIn case of plain HTTP over TCP, there is even a hint in the spec about why and how a server might want to avoid fully closing prematurely. https://datatracker.ietf.org/doc/html/rfc9112#section-9.6 https://datatracker.ietf.org/doc/html/rfc9112#section-9.6 (this was already in https://datatracker.ietf.org/doc/html/rfc7230#section-6.6 https://datatracker.ietf.org/doc/html/rfc7230#section-6.6)
- microgpt 3mo agoThis is relevant if the client sends multiple requests but the server decides to close the connection after one of them. The server should discard the additional requests until the client signals no more requests are coming.
- NooneAtAll3 3mo agowhat is RST?
- ignoramous 3mo agoConnection "reset": https://en.wikipedia.org/wiki/Transmission_Control_Protocol#Connection_termination https://en.wikipedia.org/wiki/Transmission_Control_Protocol#...
- microgpt 3mo agoconnection reset - TCP says "this connection is too messed up, abort, abort!" The relevant condition here is where one side closed its socket but the other side didn't and keeps sending data to the closed socket. That's obviously an improper way to end a connection. A graceful shutdown does not send RST and ensures all data is received on both sides.
- moralestapia 3mo agoHey, you have to justify three engineers full time's worth of salary.