You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've ran into an issue where sending requests with request.version = 2 leads to an ETIMEDOUT even though the server receives the request properly. After inspecting the state of the coroutine which was running my request I can see that execution is held up at the poll in the get_headers function.
Data pulled from an active request (request:go called with a timeout of 1000):
stack traceback:
[C]: in function 'coroutine.yield'
/usr/local/share/lua/5.4/cqueues.lua:45: in function '_cqueues.poll'
/usr/local/share/lua/5.4/http/h2_stream.lua:1222: in method 'get_headers'
/usr/local/share/lua/5.4/http/request.lua:598: in method 'go'
....
locals at the get_headers stack frame:
self http.h2_stream{connection=http.h2_connection{type="client"};id=1;state="half closed (local)";parent=0;dependees={}}
timeout 998.9164443
deadline 7024.448864047
(temporary) function: 0x5653d5ba8e20
(temporary) CQS Condition: 0x5653d5aaf218
(temporary) http.h2_connection{type="client"}
(temporary) 998.9164443
In get_headers the connection polls but the self.connection:step(0) times out. Due to how step works this timeout is simply returned as true which means the get_headers loop goes into a blocking call again; which never seems to terminate unless timed out.
When I catch the offending thread and inspect the locals I can grab the stream object. If I manually step the attached connection the poll returns and the deadlock is fixed.
Here is an example which seems to reproduce the problem, it is not always reproduced which suggests to me it's some kind of race condition in the code.
If you set version to 1.1 the request completes.
If you make body smaller the request completes.
The request will often timeout with a small timeout; if you make the timeout large enough you receive the following:
I've ran into an issue where sending requests with
request.version = 2
leads to an ETIMEDOUT even though the server receives the request properly. After inspecting the state of the coroutine which was running my request I can see that execution is held up at thepoll
in theget_headers
function.Data pulled from an active request (
request:go
called with a timeout of 1000):Line 1222 is the following:
The text was updated successfully, but these errors were encountered: