x/net/http2: request.Body.Read hangs #32664
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
One of http2 server handler reads file content from request body to a buffer. In order to limit of using memory I use https://github.com/facebookarchive/rpool library.
The code looks like this:
Handlers starts hang on
r.Body.Read
if there are handlers which hangs ons.rm.Acquire()
You can reproduce it with the following steps:
openssl req -newkey rsa:2048 -nodes -keyout server.key -x509 -days 365 -out server.crt
./generate.sh files
./server
./client --dir=$(pwd)/files --parallel=20
server.go:
client.go
generate.sh
What did you expect to see?
I expect that
r.Body.Read
will not hangWhat did you see instead?
r.Body.Read
function hangs:The text was updated successfully, but these errors were encountered: