Does this issue reproduce with the latest release?
yeah, maybe. I haven't reproduced it yet.
Just found this issue based on code.
race may happen on such a flow:
fields write goroutine read goroutine
1. read(false), in processHeaders
inGoAway
2. set to true, in goAway
----------------------------------------------------------
3. read(old), in scheduleFrameWrite
maxClientStreamID
4. set(a new), in processHeaders
The server may have already processed the new request while the client got the old stream id in the GoAway frame,
and the client will retry the new request again.
Yeah, the race is very very small, but I think it indeed exists in theory.
eg. these three things happen at the same time:
server received a request header,
server got a signal to start graceful stop,
an OS schedule on the read goroutine between operation 1 and operation 4(make it is long enough time).
Or, do I misunderstand the code?
Thanks!
The text was updated successfully, but these errors were encountered:
mengzhuo
added
the
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
label
Feb 22, 2022
mengzhuo
changed the title
net/http: server: maybe a little race between operations on maxClientStreamID and inGoAway.
net/http: race between operations on maxClientStreamID and inGoAway.
Feb 22, 2022
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yeah, maybe. I haven't reproduced it yet.
Just found this issue based on code.
race may happen on such a flow:
The server may have already processed the new request while the client got the old stream id in the GoAway frame,
and the client will retry the new request again.
Yeah, the race is very very small, but I think it indeed exists in theory.
eg. these three things happen at the same time:
Or, do I misunderstand the code?
Thanks!
The text was updated successfully, but these errors were encountered: