-
Notifications
You must be signed in to change notification settings - Fork 18k
net/http: fix hijack hang at abortPendingRead #46278
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
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
This PR (HEAD: 73176c3) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/321369 to see it. Tip: You can toggle comments from me using the |
Message from Go Bot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/321369. |
This PR (HEAD: 78770c1) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/321369 to see it. Tip: You can toggle comments from me using the |
When concurrent many http requests which need hijack the connenction, hijack may hang at abortPendingRead() on cr.cond.Wait(). The read can be from readRequest() from conn.serve() or w.conn.r.startBackgroundRead(). especially in startBackgroundRead() which always set the deadline time.Time{}. This problem seems easy reproduce on arm. Signed-off-by: jingrui <[email protected]>
When concurrent many http requests which need hijack the connenction,
hijack may hang at abortPendingRead() on cr.cond.Wait().
The read can be from readRequest() from conn.serve() or
w.conn.r.startBackgroundRead(). especially in startBackgroundRead()
which always set the deadline time.Time{}.
This problem seems easy reproduce on arm.
Signed-off-by: jingrui [email protected]
This PR will be imported into Gerrit with the title and first
comment (this text) used to generate the subject and body of
the Gerrit change.
Please ensure you adhere to every item in this list.
More info can be found at https://github.com/golang/go/wiki/CommitMessage
net/http: frob the quux before blarfing
"This change modifies Go to ___________"
really needed (ASCII art, table, or long link)
Fixes #1234
orUpdates #1234
(the latter if this is not a complete fix) to this comment
golang/go
you can use theowner/repo#issue_number
syntax:Fixes golang/tools#1234
Our Gerrit server & GitHub bots enforce CLA compliance instead.