Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
bundle collision when using the same proxy for two remotes #3951
I did this
"Bad file descriptor" after a few requests. Seems to happen when mixing HTTP/1.1 and HTTP/2 in the same
It looks like the fd gets closed while a request is still waiting for a response. A new connection may be opened, reusing the same fd, making it a valid file descriptor once again. curl may then issue a new request on the reused fd, but when reading the response could become available to the original request. Since the connection is not closed afterwards, the second request never finishes and times out.
(To be clear, that's not speculation: I've actually seen several responses arrive for the wrong request, and a lot of timeouts.)
Seems to be a new bug in 7.65.0, 7.64.1 did not have it.
I expected the following
All requests should happily execute and the program should finish. There should be no responses arriving for the wrong request either.
CentOS 7 with custom-built curl
referenced this issue
May 28, 2019
Hm, I don't think #3955 will fix this, or at least not the issue I started out with, as it didn't involve a proxy at all... (edit: github issue has a proxy listed, but the bug I originally started debugging was with connections to localhost, no proxy, but hard to replicate outside of my specific environment)
Will try the patch when I'm near a compiler, and report back.
#3955 resolves the problem as reproducible using the code in this issue. However, it turns out that during test minimization yesterday, I hit a different bug and then started minimizing towards that instead.
So let's try this again... here's a gist trying to reproduce the issue I was originally having. https://gist.github.com/TvdW/f4815f8080d9dc30daa5d74b1f878dae
There's a nginx server running on 127.0.0.1, listening on port 80 for http/1.1, and on port 81 for http/2 (no TLS on either). I guess a simple nginx config to reproduce would be along the lines of