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: TestAcceptTimeout failures #65240

Closed
gopherbot opened this issue Jan 23, 2024 · 8 comments
Closed

net: TestAcceptTimeout failures #65240

gopherbot opened this issue Jan 23, 2024 · 8 comments
Assignees
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done. release-blocker Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@gopherbot
Copy link

gopherbot commented Jan 23, 2024

#!watchflakes
post <- pkg == "net" && test ~ `TestAcceptTimeout` && `dial tcp .*:` && date < "2024-01-25"

Issue created automatically to collect these failures.

Example (log):

--- FAIL: TestAcceptTimeout (0.00s)
    --- FAIL: TestAcceptTimeout/-5s (0.13s)
        timeout_test.go:216: ln.SetDeadline(time.Now().Add(-5s))
        timeout_test.go:222: ln.Accept: accept tcp4 127.0.0.1:64344: i/o timeout
        timeout_test.go:204: dial tcp 127.0.0.1:64344: connect: connection reset by peer

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

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "net" && test == "TestAcceptTimeout"
2024-01-23 17:46 dragonfly-amd64-622 go@1a075509 net.TestAcceptTimeout (log)
--- FAIL: TestAcceptTimeout (0.00s)
    --- FAIL: TestAcceptTimeout/-5s (0.13s)
        timeout_test.go:216: ln.SetDeadline(time.Now().Add(-5s))
        timeout_test.go:222: ln.Accept: accept tcp4 127.0.0.1:64344: i/o timeout
        timeout_test.go:204: dial tcp 127.0.0.1:64344: connect: connection reset by peer

watchflakes

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "net" && test == "TestAcceptTimeout"
2024-01-23 18:08 darwin-amd64-10_15 go@76b8bec6 net.TestAcceptTimeout (log)
--- FAIL: TestAcceptTimeout (0.00s)
    --- FAIL: TestAcceptTimeout/-5s (0.02s)
        timeout_test.go:216: ln.SetDeadline(time.Now().Add(-5s))
        timeout_test.go:222: ln.Accept: accept tcp4 127.0.0.1:51944: i/o timeout
        timeout_test.go:204: dial tcp 127.0.0.1:51944: connect: connection reset by peer

watchflakes

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "net" && test == "TestAcceptTimeout"
2024-01-23 18:08 darwin-amd64-11_0 go@76b8bec6 net.TestAcceptTimeout (log)
--- FAIL: TestAcceptTimeout (0.00s)
    --- FAIL: TestAcceptTimeout/-5s (0.02s)
        timeout_test.go:216: ln.SetDeadline(time.Now().Add(-5s))
        timeout_test.go:222: ln.Accept: accept tcp4 127.0.0.1:51925: i/o timeout
        timeout_test.go:204: dial tcp 127.0.0.1:51925: connect: connection reset by peer

watchflakes

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "net" && test == "TestAcceptTimeout"
2024-01-23 18:57 darwin-arm64-11 go@9368ced7 net.TestAcceptTimeout (log)
--- FAIL: TestAcceptTimeout (0.00s)
    --- FAIL: TestAcceptTimeout/-5s (0.21s)
        timeout_test.go:216: ln.SetDeadline(time.Now().Add(-5s))
        timeout_test.go:222: ln.Accept: accept tcp4 127.0.0.1:61443: i/o timeout
        timeout_test.go:204: dial tcp 127.0.0.1:61443: connect: connection refused

watchflakes

@bcmills bcmills self-assigned this Jan 23, 2024
@bcmills bcmills added this to the Go1.23 milestone Jan 23, 2024
@bcmills
Copy link
Contributor

bcmills commented Jan 23, 2024

I intentionally unskipped this test in https://go.dev/cl/548940 to see whether it was fixed. Turns out not! 🙃

See previously:

@gopherbot
Copy link
Author

Change https://go.dev/cl/558175 mentions this issue: net: ignore Dial errors in TestAcceptTimeout

@bcmills bcmills added Testing An issue that has been verified to require only test changes, not just a test failure. FixPending Issues that have a fix which has not yet been reviewed or submitted. release-blocker NeedsFix The path to resolution is known, but the work has not been done. labels Jan 24, 2024
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 24, 2024
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net" && test == "TestAcceptTimeout" && `dial tcp .*:` && date < "2024-01-25"
2024-01-24 16:55 linux-riscv64-unmatched go@3330c694 net.TestAcceptTimeout (log)
2024/01/24 21:52:20 killing splice client after 5 second shutdown timeout
--- FAIL: TestAcceptTimeout (0.00s)
    --- FAIL: TestAcceptTimeout/-5s (0.02s)
        timeout_test.go:216: ln.SetDeadline(time.Now().Add(-5s))
        timeout_test.go:222: ln.Accept: accept tcp4 127.0.0.1:38541: i/o timeout
        timeout_test.go:204: dial tcp 127.0.0.1:38541: connect: connection reset by peer

watchflakes

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net" && test ~ `TestAcceptTimeout` && `dial tcp .*:` && date < "2024-01-25"
2024-01-23 20:08 gotip-solaris-amd64 go@b3acaa82 net.TestAcceptTimeout/-5s (log)
=== RUN   TestAcceptTimeout/-5s
=== PAUSE TestAcceptTimeout/-5s
=== CONT  TestAcceptTimeout/-5s
    timeout_test.go:216: ln.SetDeadline(time.Now().Add(-5s))
    timeout_test.go:222: ln.Accept: accept tcp4 127.0.0.1:40880: i/o timeout
    timeout_test.go:204: dial tcp 127.0.0.1:40880: connect: connection refused
--- FAIL: TestAcceptTimeout/-5s (0.04s)
2024-01-24 07:25 gotip-linux-386-longtest go@b4e7d630 net.TestAcceptTimeout/-5s (log)
=== RUN   TestAcceptTimeout/-5s
=== PAUSE TestAcceptTimeout/-5s
=== CONT  TestAcceptTimeout/-5s
    timeout_test.go:216: ln.SetDeadline(time.Now().Add(-5s))
    timeout_test.go:222: ln.Accept: accept tcp4 127.0.0.1:44203: i/o timeout
    timeout_test.go:204: dial tcp 127.0.0.1:44203: connect: connection reset by peer
--- FAIL: TestAcceptTimeout/-5s (0.03s)

watchflakes

ezz-no pushed a commit to ezz-no/go-ezzno that referenced this issue Feb 18, 2024
Also use DialContext instead of just Dial so that we can ensure
the call returns before we close the listener.

The Dial in this test is intended to complete before the call to
Accept, but there is no synchronization to ensure that and sometimes
it doesn't happen. That's ok and mostly immaterial to the test, but it
does mean we need to ignore Dial errors (which can happen when the
listener is closed), and we need to be a little more careful about not
dialing a port that may have already been reused by some other test.

Fixes golang#65240.
Updates golang#17948.

Change-Id: Ife1b5c3062939441b58f4c096461bf5d7841889b
Reviewed-on: https://go-review.googlesource.com/c/go/+/558175
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done. release-blocker 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

2 participants