-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
The transport can hang forever if the server hangs after accepting the connection and the request headers (or control frames) exceeds the connection write buffer. Without respect to the context's deadline. The ClientConn writes to the connection without setting a write deadline thus blocks forever if the buffer is flushed to the socket. go test -v -run TestTransportTimeoutServerHangs ./http2
- Loading branch information
There are no files selected for viewing
5 comments
on commit e4c191a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hello, i have ran this snippets but it didn't hang up.
after 1 second, it returned.
and i have changed my linux parameter
`
sysctl -p
net.ipv4.tcp_wmem = 4096 16384 41943
`
how did you test it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ikenchina it was on mac os X, try increasing buf size, 1 << 20, 1 << 21 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't work,
and i have already changed linux kernel
net.ipv4.tcp_wmem = 4096 16384 41943
ct.client = func() error {
returned after 1 second.
and go version is 1.9.3 , os is centos 6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ikenchina it fails on my linux at 1<<22 == 4194304
which is the max for tcp send buffer size on my machine:
net.ipv4.tcp_wmem = 4096 16384 4194304
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, i have also test it, same result.
here you said :Also happened on linux/amd64, see below.
http2/transport_test.go