Skip to content
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

x/tools/godoc/redirect: TestRedirects failures with "connection reset by peer" on netbsd-386-9_0 builder #50879

Closed
bcmills opened this issue Jan 28, 2022 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Jan 28, 2022

greplogs --dashboard -md -l -e 'FAIL: TestRedirects .*(?:\n .*) connection reset by peer'

2022-01-27T20:56:17-0f0bbfd-1a2435c/netbsd-386-9_0

--- FAIL: TestRedirects (0.55s)
    redirect_test.go:95: (path: "/pkg/asn1") unexpected error: dial tcp 127.0.0.1:65508: connect: connection reset by peer
FAIL
FAIL	golang.org/x/tools/godoc/redirect	0.554s

2021-08-19T16:10:32-bf6c7f2-91e2e3b/netbsd-386-9_0

--- FAIL: TestRedirects (0.29s)
    redirect_test.go:95: (path: "/issues/1") unexpected error: dial tcp 127.0.0.1:65500: connect: connection reset by peer
FAIL
FAIL	golang.org/x/tools/godoc/redirect	0.302s
@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 28, 2022
@bcmills bcmills added this to the Backlog milestone Jan 28, 2022
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Jan 28, 2022
@bcmills bcmills added the Testing An issue that has been verified to require only test changes, not just a test failure. label Jan 28, 2022
@bcmills bcmills self-assigned this Jan 28, 2022
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/381736 mentions this issue: godoc/redirect: close HTTP response bodies in TestRedirect

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jan 29, 2022
@rsc rsc unassigned bcmills Jun 22, 2022
@golang golang locked and limited conversation to collaborators Jun 22, 2023
henderjon pushed a commit to oggodoc/godoc that referenced this issue Jun 13, 2024
In https://go.dev/issue/50879, we observe ECONNRESET errors from
'dial' in TestRedirect for various paths. That seems to imply that a
unique connection is being dialed for each path — but these
connections are all going through http.DefaultTransport, which has a
30-second keepalive, and the test takes well under that amount of time
to complete.

The only reason we would be dialing a connection per request would be
if the connection itself leaks — and, indeed, inspecting the test in
more detail it fails to close the response body.

I don't know why failing to close the response body would lead to
ECONNRESET errors, but at the very least fixing that issue should
reduce the number of 'dial' operations and thus the number of
platform-specific failure modes.

Fixes golang/go#50879.
(Maybe.)

Change-Id: I5af47ee3683c54106424c66e94b021a0ec7e6d2d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/381736
Trust: Bryan Mills <[email protected]>
Run-TryBot: Bryan Mills <[email protected]>
gopls-CI: kokoro <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants