-
Notifications
You must be signed in to change notification settings - Fork 18k
x/net/http2: Transport loops forever if peer sends a graceful shutdown upon connect forever #31405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Happens when the http2 client code path is taken.
Debug logs -
And then it repeats itself till the EDIT: This is the code I used - package main
import (
"io"
"io/ioutil"
"log"
"net/http"
)
func main() {
res, err := http.Get("https://www.herold.at/")
if err != nil {
log.Fatal("doing request:", err)
}
defer res.Body.Close()
io.Copy(ioutil.Discard, res.Body)
log.Print("request done")
} |
Thanks @agnivade for the trace. That server looks buggy or confused. On every request it starts a graceful shutdown and says GOAWAY (NO_ERROR), so we retry our request, per the spec. What server software is that? It seems bogus. I think we already have another open bug for falling back to HTTP/1 when we notice that an HTTP/2 server is buggy. Maybe somebody could find that bug. But in general, it's better for the ecosystem if we work with the other server software's author(s) and get them to fix it. |
Oh, it's a Big-IP:
We've had problems with Big-IP's HTTP/2 implementation in the past. It's possible it's already fixed but that customer hasn't updated to the latest code. |
I tested this again (using Go 1.15.7), and the GET request returns correctly now. It seems that either something was changed in Go or the server was fixed. I'm closing this. |
What did you do?
Running the program below causes http.Get() to loop. It seems to establish an infinite number of connections to the target server and only stops when some system or network limit is reached.
The URL in question can be accessed without problems in browsers and using
curl
orwget
.What did you expect to see?
I expected the request to finish without error and
request done
to be printed.What did you see instead?
http.Get()
never returns. A quickly rising number of established connections to the target server is seen viass
. After a few seconds, hundreds of connections are established:Does this issue reproduce with the latest release (go1.12.3)?
Yes
System details
The problem was reproduced on various systems, all on x64 architecture:
The text was updated successfully, but these errors were encountered: