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: TestTransportNoReuseAfterEarlyResponse failures due to leaked transports #64252

Open
gopherbot opened this issue Nov 17, 2023 · 8 comments
Assignees
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@gopherbot
Copy link
Contributor

gopherbot commented Nov 17, 2023

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportNoReuseAfterEarlyResponse" && `appears to have leaked a Transport`

Issue created automatically to collect these failures.

Example (log):

--- FAIL: TestTransportNoReuseAfterEarlyResponse (2.62s)
    --- FAIL: TestTransportNoReuseAfterEarlyResponse/h1 (2.62s)
        main_test.go:161: Test appears to have leaked a Transport:
            internal/poll.runtime_Semacquire(0x56d7d7f8?)
            	/tmp/buildlet/go/src/runtime/sema.go:67 +0x25
            internal/poll.(*FD).Close(0xc000288800)
            	/tmp/buildlet/go/src/internal/poll/fd_unix.go:113 +0x65
            net.(*netFD).Close(0xc000288800)
            	/tmp/buildlet/go/src/net/fd_posix.go:37 +0x32
            net.(*conn).Close(0xc000692008)
...
            testing.(*T).Run(0xc000a09860, {0xf98d51f?, 0xf64c56d?}, 0xc0002d8060)
            	/tmp/buildlet/go/src/testing/testing.go:1736 +0x3ab
            net/http_test.run[...](0xc000a09860, 0xfb220b0, {0xc0004ba740, 0x2?, 0x183e44b0})
            	/tmp/buildlet/go/src/net/http/clientserver_test.go:82 +0x283
            net/http_test.TestTransportNoReuseAfterEarlyResponse(0xc000a09860)
            	/tmp/buildlet/go/src/net/http/transport_test.go:3490 +0x9c
            testing.tRunner(0xc000a09860, 0xfb20d38)
            	/tmp/buildlet/go/src/testing/testing.go:1682 +0xfb
            created by testing.(*T).Run in goroutine 1
            	/tmp/buildlet/go/src/testing/testing.go:1735 +0x390

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 Nov 17, 2023
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "net/http" && test == "TestTransportNoReuseAfterEarlyResponse"
2023-11-17 18:12 darwin-amd64-longtest go@a9722bf9 net/http.TestTransportNoReuseAfterEarlyResponse (log)
--- FAIL: TestTransportNoReuseAfterEarlyResponse (2.62s)
    --- FAIL: TestTransportNoReuseAfterEarlyResponse/h1 (2.62s)
        main_test.go:161: Test appears to have leaked a Transport:
            internal/poll.runtime_Semacquire(0x56d7d7f8?)
            	/tmp/buildlet/go/src/runtime/sema.go:67 +0x25
            internal/poll.(*FD).Close(0xc000288800)
            	/tmp/buildlet/go/src/internal/poll/fd_unix.go:113 +0x65
            net.(*netFD).Close(0xc000288800)
            	/tmp/buildlet/go/src/net/fd_posix.go:37 +0x32
            net.(*conn).Close(0xc000692008)
...
            testing.(*T).Run(0xc000a09860, {0xf98d51f?, 0xf64c56d?}, 0xc0002d8060)
            	/tmp/buildlet/go/src/testing/testing.go:1736 +0x3ab
            net/http_test.run[...](0xc000a09860, 0xfb220b0, {0xc0004ba740, 0x2?, 0x183e44b0})
            	/tmp/buildlet/go/src/net/http/clientserver_test.go:82 +0x283
            net/http_test.TestTransportNoReuseAfterEarlyResponse(0xc000a09860)
            	/tmp/buildlet/go/src/net/http/transport_test.go:3490 +0x9c
            testing.tRunner(0xc000a09860, 0xfb20d38)
            	/tmp/buildlet/go/src/testing/testing.go:1682 +0xfb
            created by testing.(*T).Run in goroutine 1
            	/tmp/buildlet/go/src/testing/testing.go:1735 +0x390

watchflakes

@bcmills bcmills changed the title net/http: TestTransportNoReuseAfterEarlyResponse failures net/http: TestTransportNoReuseAfterEarlyResponse failures due to leaked transports Nov 27, 2023
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/546616 mentions this issue: net/http: avoid leaking io.Copy goroutines (and hijacked connections) in TestTransportNoReuseAfterEarlyResponse

@bcmills bcmills added this to the Go1.22 milestone Dec 1, 2023
@bcmills bcmills added the Testing An issue that has been verified to require only test changes, not just a test failure. label Dec 1, 2023
@bcmills
Copy link
Contributor

bcmills commented Jan 3, 2024

@bcmills bcmills reopened this Jan 3, 2024
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportNoReuseAfterEarlyResponse" && `appears to have leaked a Transport`
2024-01-03 21:01 darwin-amd64-longtest go@6db11026 net/http.TestTransportNoReuseAfterEarlyResponse (log)
--- FAIL: TestTransportNoReuseAfterEarlyResponse (2.64s)
    --- FAIL: TestTransportNoReuseAfterEarlyResponse/h1 (2.64s)
        main_test.go:161: Test appears to have leaked a Transport:
            internal/poll.runtime_Semacquire(0x57dc13c8?)
            	/tmp/buildlet/go/src/runtime/sema.go:67 +0x25
            internal/poll.(*FD).Close(0xc000214900)
            	/tmp/buildlet/go/src/internal/poll/fd_unix.go:113 +0x65
            net.(*netFD).Close(0xc000214900)
            	/tmp/buildlet/go/src/net/fd_posix.go:37 +0x32
            net.(*conn).Close(0xc000056040)
...
            testing.(*T).Run(0xc00047eb60, {0x10aa969f?, 0x10e426c8?}, 0xc0004fe060)
            	/tmp/buildlet/go/src/testing/testing.go:1750 +0x3ab
            net/http_test.run[...](0xc00047eb60, 0x10c439d8, {0xc000356f40, 0x2, 0x32fda660})
            	/tmp/buildlet/go/src/net/http/clientserver_test.go:82 +0x269
            net/http_test.TestTransportNoReuseAfterEarlyResponse(0xc00047eb60)
            	/tmp/buildlet/go/src/net/http/transport_test.go:3490 +0x9c
            testing.tRunner(0xc00047eb60, 0x10c42660)
            	/tmp/buildlet/go/src/testing/testing.go:1689 +0xfb
            created by testing.(*T).Run in goroutine 1
            	/tmp/buildlet/go/src/testing/testing.go:1742 +0x390

watchflakes

@gopherbot gopherbot modified the milestones: Go1.22, Go1.23 Feb 6, 2024
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportNoReuseAfterEarlyResponse" && `appears to have leaked a Transport`
2024-01-22 17:55 darwin-amd64-longtest go@77e9c269 net/http.TestTransportNoReuseAfterEarlyResponse (log)
--- FAIL: TestTransportNoReuseAfterEarlyResponse (2.62s)
    --- FAIL: TestTransportNoReuseAfterEarlyResponse/h1 (2.62s)
        main_test.go:161: Test appears to have leaked a Transport:
            internal/poll.runtime_Semacquire(0x577f5050?)
            	/tmp/buildlet/go/src/runtime/sema.go:67 +0x25
            internal/poll.(*FD).Close(0xc00017c080)
            	/tmp/buildlet/go/src/internal/poll/fd_unix.go:113 +0x65
            net.(*netFD).Close(0xc00017c080)
            	/tmp/buildlet/go/src/net/fd_posix.go:37 +0x32
            net.(*conn).Close(0xc000316000)
...
            testing.(*T).Run(0xc00011e1a0, {0x1040a61f?, 0x107a2768?}, 0xc0002760f0)
            	/tmp/buildlet/go/src/testing/testing.go:1750 +0x3ab
            net/http_test.run[...](0xc00011e1a0, 0x105a49d8, {0xc00025df40, 0x2, 0x162835f0})
            	/tmp/buildlet/go/src/net/http/clientserver_test.go:82 +0x269
            net/http_test.TestTransportNoReuseAfterEarlyResponse(0xc00011e1a0)
            	/tmp/buildlet/go/src/net/http/transport_test.go:3490 +0x9c
            testing.tRunner(0xc00011e1a0, 0x105a3660)
            	/tmp/buildlet/go/src/testing/testing.go:1689 +0xfb
            created by testing.(*T).Run in goroutine 1
            	/tmp/buildlet/go/src/testing/testing.go:1742 +0x390

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportNoReuseAfterEarlyResponse" && `appears to have leaked a Transport`
2024-03-15 05:04 darwin-amd64-longtest go@c9ed561d net/http.TestTransportNoReuseAfterEarlyResponse (log)
--- FAIL: TestTransportNoReuseAfterEarlyResponse (2.69s)
    --- FAIL: TestTransportNoReuseAfterEarlyResponse/h1 (2.69s)
        main_test.go:161: Test appears to have leaked a Transport:
            internal/poll.runtime_Semacquire(0x584068f8?)
            	/tmp/buildlet/go/src/runtime/sema.go:67 +0x25
            internal/poll.(*FD).Close(0xc0001ee180)
            	/tmp/buildlet/go/src/internal/poll/fd_unix.go:113 +0x65
            net.(*netFD).Close(0xc0001ee180)
            	/tmp/buildlet/go/src/net/fd_posix.go:37 +0x32
            net.(*conn).Close(0xc000274008)
...
            testing.(*T).Run(0xc00054a4e0, {0x110b42c3?, 0x1144dc80?}, 0xc00029e060)
            	/tmp/buildlet/go/src/testing/testing.go:1750 +0x3ab
            net/http_test.run[...](0xc00054a4e0, 0x1124dd20, {0xc0005f0f40, 0x2, 0x13688180})
            	/tmp/buildlet/go/src/net/http/clientserver_test.go:82 +0x269
            net/http_test.TestTransportNoReuseAfterEarlyResponse(0xc00054a4e0)
            	/tmp/buildlet/go/src/net/http/transport_test.go:3572 +0x9c
            testing.tRunner(0xc00054a4e0, 0x1124c978)
            	/tmp/buildlet/go/src/testing/testing.go:1689 +0xfb
            created by testing.(*T).Run in goroutine 1
            	/tmp/buildlet/go/src/testing/testing.go:1742 +0x390

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportNoReuseAfterEarlyResponse" && `appears to have leaked a Transport`
2024-03-19 16:19 darwin-amd64-longtest go@8f7df225 net/http.TestTransportNoReuseAfterEarlyResponse (log)
--- FAIL: TestTransportNoReuseAfterEarlyResponse (2.67s)
    --- FAIL: TestTransportNoReuseAfterEarlyResponse/h1 (2.67s)
        main_test.go:161: Test appears to have leaked a Transport:
            internal/poll.runtime_Semacquire(0x53c423f8?)
            	/tmp/buildlet/go/src/runtime/sema.go:67 +0x25
            internal/poll.(*FD).Close(0xc000180800)
            	/tmp/buildlet/go/src/internal/poll/fd_unix.go:113 +0x65
            net.(*netFD).Close(0xc000180800)
            	/tmp/buildlet/go/src/net/fd_posix.go:37 +0x32
            net.(*conn).Close(0xc00054a020)
...
            testing.(*T).Run(0xc0002504e0, {0xc857f03?, 0xcbf2170?}, 0xc0006d4060)
            	/tmp/buildlet/go/src/testing/testing.go:1750 +0x3ab
            net/http_test.run[...](0xc0002504e0, 0xc9f1de8, {0xc0000e8740, 0x2, 0x8e4dee8})
            	/tmp/buildlet/go/src/net/http/clientserver_test.go:82 +0x269
            net/http_test.TestTransportNoReuseAfterEarlyResponse(0xc0002504e0)
            	/tmp/buildlet/go/src/net/http/transport_test.go:3572 +0x9c
            testing.tRunner(0xc0002504e0, 0xc9f0a30)
            	/tmp/buildlet/go/src/testing/testing.go:1689 +0xfb
            created by testing.(*T).Run in goroutine 1
            	/tmp/buildlet/go/src/testing/testing.go:1742 +0x390

watchflakes

@neild neild self-assigned this Jul 31, 2024
@gopherbot gopherbot modified the milestones: Go1.23, Go1.24 Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. 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