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

net/http: TestTransportServerClosingUnexpectedly failures #57605

Closed
gopherbot opened this issue Jan 4, 2023 · 11 comments
Closed

net/http: TestTransportServerClosingUnexpectedly failures #57605

gopherbot opened this issue Jan 4, 2023 · 11 comments
Labels
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.
Milestone

Comments

@gopherbot
Copy link

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportServerClosingUnexpectedly"

Issue created automatically to collect these failures.

Example (log):

--- FAIL: TestTransportServerClosingUnexpectedly (0.00s)
    --- FAIL: TestTransportServerClosingUnexpectedly/h1 (0.65s)
        transport_test.go:829: expected body1 and body2 to be equal
1 second passes in backend, proxygone= false

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 4, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportServerClosingUnexpectedly"
2022-12-01 17:28 freebsd-arm-paulzhol go@34ab0bcc net/http.TestTransportServerClosingUnexpectedly (log)
--- FAIL: TestTransportServerClosingUnexpectedly (0.00s)
    --- FAIL: TestTransportServerClosingUnexpectedly/h1 (0.65s)
        transport_test.go:829: expected body1 and body2 to be equal
1 second passes in backend, proxygone= false
2022-12-01 22:04 openbsd-386-72 go@6a70292d net/http.TestTransportServerClosingUnexpectedly (log)
--- FAIL: TestTransportServerClosingUnexpectedly (0.01s)
    --- FAIL: TestTransportServerClosingUnexpectedly/h1 (0.07s)
        transport_test.go:829: expected body1 and body2 to be equal

watchflakes

@bcmills
Copy link
Contributor

bcmills commented Jan 6, 2023

(attn @neild; see previously #32119)

I don't see anywhere near enough information in the test log to diagnose the problem: it doesn't describe how body1 and body2 differ and doesn't even mention how they were created.
(This test isn't even close to meeting https://go.dev/wiki/CodeReviewComments#useful-test-failures!)


The test implementation is here:
https://cs.opensource.google/go/go/+/master:src/net/http/transport_test.go;l=814-815;drc=f4b42f5cb8b494a2b64a4ade89f89071d80c7fd3

The test uses hostPortHandler as the handler, and that writes the client's host and port as the body. If the idle connection from the first fetch call is not returned synchronously to the connection pool, there is a chance that it will not be reused for the second call, which would result in an observable difference in the response bodies.

Given the other net/http bugs involving connection reuse, that's my best guess for this one as well.

Compare:

@bcmills bcmills added this to the Backlog milestone Jan 10, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportServerClosingUnexpectedly"
2023-01-18 19:59 freebsd-arm-paulzhol go@9894ded1 net/http.TestTransportServerClosingUnexpectedly (log)
--- FAIL: TestTransportServerClosingUnexpectedly (0.01s)
    --- FAIL: TestTransportServerClosingUnexpectedly/h1 (0.16s)
        transport_test.go:829: expected body1 and body2 to be equal
2023-01-20 21:41 freebsd-arm-paulzhol go@cf70d379 net/http.TestTransportServerClosingUnexpectedly (log)
--- FAIL: TestTransportServerClosingUnexpectedly (0.00s)
    --- FAIL: TestTransportServerClosingUnexpectedly/h1 (0.53s)
        transport_test.go:829: expected body1 and body2 to be equal

watchflakes

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportServerClosingUnexpectedly"
2023-01-28 19:00 freebsd-arm-paulzhol go@915af1b7 net/http.TestTransportServerClosingUnexpectedly (log)
--- FAIL: TestTransportServerClosingUnexpectedly (0.00s)
    --- FAIL: TestTransportServerClosingUnexpectedly/h1 (0.82s)
        transport_test.go:829: expected body1 and body2 to be equal
2023-02-01 19:47 linux-amd64-race go@ab0f0459 net/http.TestTransportServerClosingUnexpectedly (log)
--- FAIL: TestTransportServerClosingUnexpectedly (0.00s)

watchflakes

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportServerClosingUnexpectedly"
2023-02-10 17:41 freebsd-arm-paulzhol go@7628627c net/http.TestTransportServerClosingUnexpectedly (log)
--- FAIL: TestTransportServerClosingUnexpectedly (0.00s)
    --- FAIL: TestTransportServerClosingUnexpectedly/h1 (0.13s)
        transport_test.go:829: expected body1 and body2 to be equal
2023-02-21 18:34 freebsd-arm-paulzhol go@481a6beb net/http.TestTransportServerClosingUnexpectedly (log)
--- FAIL: TestTransportServerClosingUnexpectedly (0.00s)
    --- FAIL: TestTransportServerClosingUnexpectedly/h1 (0.18s)
        transport_test.go:829: expected body1 and body2 to be equal
1 second passes in backend, proxygone= false

watchflakes

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportServerClosingUnexpectedly"
2023-02-28 03:16 darwin-amd64-13 go@4d180f71 net/http.TestTransportServerClosingUnexpectedly (log)
--- FAIL: TestTransportServerClosingUnexpectedly (0.00s)
    --- FAIL: TestTransportServerClosingUnexpectedly/h1 (0.09s)
        transport_test.go:829: expected body1 and body2 to be equal

watchflakes

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportServerClosingUnexpectedly"
2023-02-23 22:08 netbsd-arm-bsiegert go@f60a2a9c net/http.TestTransportServerClosingUnexpectedly (log)
--- FAIL: TestTransportServerClosingUnexpectedly (0.00s)
    --- FAIL: TestTransportServerClosingUnexpectedly/h1 (0.11s)
        transport_test.go:829: expected body1 and body2 to be equal

watchflakes

@gopherbot
Copy link
Author

Change https://go.dev/cl/483116 mentions this issue: net/http: wait forever for write results in tests

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportServerClosingUnexpectedly"
2023-03-23 20:52 darwin-amd64-nocgo go@b0dfcb74 net/http.TestTransportServerClosingUnexpectedly (log)
--- FAIL: TestTransportServerClosingUnexpectedly (0.00s)
    --- FAIL: TestTransportServerClosingUnexpectedly/h1 (0.14s)
        transport_test.go:835: expected body1 and body2 to be equal
2023/03/23 14:05:18 httptest.Server blocked in Close after 5 seconds, waiting for connections:
  *net.TCPConn 0xc00009a170 127.0.0.1:50176 in state active

watchflakes

@dmitshur dmitshur modified the milestones: Backlog, Go1.21 May 24, 2023
@dmitshur dmitshur added Testing An issue that has been verified to require only test changes, not just a test failure. 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 May 24, 2023
@gopherbot gopherbot reopened this Jul 9, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportServerClosingUnexpectedly"
2023-06-29 15:53 freebsd-arm-paulzhol go@4db13d76 net/http.TestTransportServerClosingUnexpectedly (log)
--- FAIL: TestTransportServerClosingUnexpectedly (0.00s)
    --- FAIL: TestTransportServerClosingUnexpectedly/h1 (0.44s)
        transport_test.go:829: expected body1 and body2 to be equal

watchflakes

@bcmills
Copy link
Contributor

bcmills commented Jul 10, 2023

commit 4db13d7 is on release-branch.go1.20 (see #59483).

@bcmills bcmills closed this as completed Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
Status: Done
Development

No branches or pull requests

3 participants