-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.Issue is not actionable because of missing required information, which needs to be provided.
Milestone
Description
Hi:
-
What version of Go are you using (
go version
)?go version go1.6.2 darwin/amd64
-
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOOS="darwin" -
What did you do?
- serving proxy requests by httputil.ReverseProxy
- about 10% of request are canceled by clients
-
What did you expect to see?
no requests should occur any unexpected error.
-
What did you see instead?
some normal(non-canceled) requests are affected by their former requests which are canceled by clients.
Finally I find this:
There is a goroutine here(in ServeHTTP): goroutine
this goroutine is used for receiving clientGone
or reqDone
signal, however, we assume this scene:
ServeHTTP
start handlingRequest A
(using underlyingnet.Conn C
)Request A
was canceled by its client (sending sig toclientGone
)- RoundTrip return error(may be
use of closed network connection
in go1.6- or other error in go1.6+) ServeHTTP
start to return and defer close(reqDone) is executed(close is non-block, soServeHTTP
may be return before thegoroutine A
receive close signal, butgoroutine A
is still alive)net/http
putnet.Conn C
to IdleConnRequest B
arrived andnet/http
pick the same underlyingnet.Conn C
ServeHTTP
start handlingRequest B
(using the same underlyingnet.Conn C
)goroutine A
got signalclientGone
first, and then doCancelRequest
which will closenet.Conn C
Request B
's RoundTrip return error cause its underlying conn is closed
hantuo, SunRunAway and freeformz
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.Issue is not actionable because of missing required information, which needs to be provided.