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: TestClosingListener failures #65976

Open
gopherbot opened this issue Feb 27, 2024 · 3 comments
Open

net: TestClosingListener failures #65976

gopherbot opened this issue Feb 27, 2024 · 3 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.

Comments

@gopherbot
Copy link

#!watchflakes
default <- pkg == "net" && test == "TestClosingListener"

Issue created automatically to collect these failures.

Example (log):

=== RUN   TestClosingListener
    listen_test.go:721: listen tcp 127.0.0.1:64395: bind: address already in use
--- FAIL: TestClosingListener (0.00s)

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 Feb 27, 2024
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "net" && test == "TestClosingListener"
2024-02-26 20:45 gotip-solaris-amd64 go@08029be9 net.TestClosingListener (log)
=== RUN   TestClosingListener
    listen_test.go:721: listen tcp 127.0.0.1:64395: bind: address already in use
--- FAIL: TestClosingListener (0.00s)

watchflakes

@bcmills
Copy link
Contributor

bcmills commented Feb 28, 2024

This is a race in the test itself. It closes a Listener and tries to start listening on the same address again, but nothing guarantees that the port isn't reused by some other test in between those two steps.

(attn @ianlancetaylor @neild)

@bcmills bcmills 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. labels Feb 28, 2024
@bcmills
Copy link
Contributor

bcmills commented Feb 28, 2024

One simple fix is to delete the test, since it is inherently racy. 🤷‍♂️

@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 28, 2024
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: No status
Development

No branches or pull requests

2 participants