net/http: TestCancelRequestWhenSharingConnection failures on longtest builders #42942
Comments
There is also what appears to be a deadlock in this test: |
This fix is incorrect and should be reverted. |
Sorry, the fix is mostly correct. Confusing myself on the issue. |
CL 257818 did fix the case where: The new issue is similar but makes me believe there is a bigger issue afoot. |
There are multiple goroutines that fiddle with the cancelFn but most are blindly setting it rather than looking to see if its already been "cancelled". |
Change https://golang.org/cl/274973 mentions this issue: |
Change https://golang.org/cl/297910 mentions this issue: |
@networkimprov Yes, see #42935 (comment). |
…een canceled Issue #41600 fixed the issue when a second request canceled a connection while the first request was still in roundTrip. This uncovered a second issue where a request was being canceled (in roundtrip) but the connection was put back into the idle pool for a subsequent request. The fix is the similar except its now in readLoop instead of roundTrip. A persistent connection is only added back if it successfully removed the cancel function; otherwise we know the roundTrip has started cancelRequest. Fixes #42935. Updates #42942. Change-Id: Ia56add20880ccd0c1ab812d380d8628e45f6f44c Reviewed-on: https://go-review.googlesource.com/c/go/+/274973 Trust: Dmitri Shuralyov <dmitshur@golang.org> Trust: Damien Neil <dneil@google.com> Reviewed-by: Damien Neil <dneil@google.com> (cherry picked from commit 854a2f8) Reviewed-on: https://go-review.googlesource.com/c/go/+/297910 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Go Bot <gobot@golang.org>
2020-12-02T14:20:12-0433845/linux-amd64-longtest
2020-12-01T21:42:10-7fca39a/windows-amd64-longtest
2020-12-01T20:42:53-20e2518/linux-amd64-longtest
2020-12-01T19:47:12-50b16f9/linux-amd64-longtest
Marking as release-blocker because this test was introduced Dec. 1 (in CL 257818).
CC @fraenkel @neild @bradfitz @golang/release
The text was updated successfully, but these errors were encountered: