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: TestPacketConn flaky #5524

Closed
alberts opened this issue May 21, 2013 · 13 comments
Closed

net: TestPacketConn flaky #5524

alberts opened this issue May 21, 2013 · 13 comments
Labels
FrozenDueToAge Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@alberts
Copy link
Contributor

alberts commented May 21, 2013

TestPacketConn seems to be flaky. It has been for a while.

TestPacketConn typically runs in milliseconds, which makes the fact that the test
sometimes takes up to 8 seconds in some runs quite strange.

29 March:

--- FAIL: TestPacketConn-37 (8.73 seconds)
packetconn_test.go:101: PacketConn.WriteTo failed: write unixgram: i/o timeout

7 May:

go version devel +1638d2adb665 Mon May 06 17:34:17 2013 -0700 linux/386
=== RUN TestTCPClose-4
--- PASS: TestTCPClose-4 (0.01 seconds)
=== RUN TestPacketConn-4
--- FAIL: TestPacketConn-4 (1.57 seconds)
packetconn_test.go:112: PacketConn.ReadFrom failed: read unixgram /tmp/nettest093076375:
i/o timeout
=== RUN TestConnAndPacketConn-4
--- PASS: TestConnAndPacketConn-4 (0.06 seconds)

15 May:

go version devel +f51b5497fa4c Wed May 15 04:19:19 2013 +0800 linux/amd64
--- FAIL: TestPacketConn-23 (4.53 seconds)
packetconn_test.go:101: PacketConn.WriteTo failed: write unixgram: i/o timeout
@alberts
Copy link
Contributor Author

alberts commented Jun 28, 2013

Comment 1:

28 June:
freebsd/386 building fccd815ed3bb:
http://build.golang.org/log/fcded6bcf63bc341dbee9d955c184c977f4c6e7e
--- FAIL: TestPacketConn (0.64 seconds)
packetconn_test.go:101: PacketConn.WriteTo failed: write unixgram: i/o timeout
The read and write deadlines are 100 milliseconds in the test.
I'll look at adding some debug logging to this test at some point.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 2:

Maybe we should just delete all these tests.

Labels changed: added priority-later, go1.2maybe, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Sep 10, 2013

Comment 3:

Labels changed: added testing.

@rsc
Copy link
Contributor

rsc commented Oct 2, 2013

Comment 4:

Labels changed: added go1.3, removed go1.2maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 5:

Labels changed: added release-go1.3.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 6:

Labels changed: removed go1.3.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 7:

Labels changed: added repo-main.

@mikioh
Copy link
Contributor

mikioh commented Jan 22, 2014

Comment 8:

Labels changed: added release-go1.4, removed release-go1.3.

@rsc
Copy link
Contributor

rsc commented Sep 16, 2014

Comment 9:

Labels changed: added release-none, removed release-go1.4.

@alberts alberts added accepted Testing An issue that has been verified to require only test changes, not just a test failure. labels Sep 16, 2014
@alberts alberts closed this as completed Dec 31, 2014
@bradfitz
Copy link
Contributor

bradfitz commented Jan 3, 2015

I'm reopening this.

The new OpenBSD builder just hit this error:

http://build.golang.org/log/7b3870c037b6135cc3444895259560b2cd599479

--- FAIL: TestPacketConn (0.20s)
    packetconn_test.go:106: PacketConn.WriteTo failed: write unixgram: i/o timeout
FAIL
FAIL    net 9.254s

And it's 4 CPUs on GCE running a dedicated VM per build revision, so the previous arguments (overloaded, stale processes, too weak) no longer apply.

This is just flaky.

@mikioh, is this something you could look into?

@bradfitz bradfitz reopened this Jan 3, 2015
@bradfitz bradfitz added this to the Go1.5 milestone Jan 3, 2015
@alexbrainman
Copy link
Member

I can see it happens on windows-386 builder:

http://build.golang.org/log/9e1e98900aa5c5b40fefed8cd0c5e15c5f8d4252
http://build.golang.org/log/015b2f0d3d6aafd0eb5a994496495dd1eb254780

--- FAIL: TestPacketConn (0.38s)
packetconn_test.go:99: PacketConn.WriteTo failed: WSASendto udp 127.0.0.1:54017: i/o timeout
FAIL
FAIL net 11.023s

Alex

@mikioh
Copy link
Contributor

mikioh commented Feb 26, 2015

With a few changes (not pushed to review process yet), we can see some socket and testing goroutine leaks:

net.TestWriteTimeout.func2(0xc20801e070, 0xc20800f000, 0x1000, 0x1000, 0xc208430300)
    /go/src/net/timeout_test.go:170 +0x98
created by net.TestWriteTimeout
    /go/src/net/timeout_test.go:173 +0x603

net.runDatagramPacketConnServer(0xc208402240, 0x2ad7b0, 0x3, 0x2b1c70, 0xb, 0xc2084303c0, 0xc208430420)
    /go/src/net/server_test.go:392 +0x60c
created by net.TestTimeoutUDP
    /go/src/net/timeout_test.go:247 +0xc9

5: {Cookie:562949953552384 Err:<nil> SocketErr:0}

{Family:1 Type:2 Protocol:0 Opened:17 Accepted:0 Connected:5 Closed:17}
{Family:2 Type:1 Protocol:0 Opened:300 Accepted:144 Connected:150 Closed:433}
{Family:1 Type:1 Protocol:0 Opened:11 Accepted:5 Connected:5 Closed:16}
{Family:30 Type:1 Protocol:0 Opened:13 Accepted:4 Connected:4 Closed:17}
{Family:2 Type:2 Protocol:0 Opened:43 Accepted:0 Connected:10 Closed:43}
{Family:30 Type:2 Protocol:0 Opened:8 Accepted:0 Connected:2 Closed:8}

Looks like we need to fix mock servers and timeout tests for avoiding some conflicts.

@mikioh
Copy link
Contributor

mikioh commented May 14, 2015

Interference between test cases are removed by recent changes. Also we don't see this failure at tip, especially after aedee30. Closing.

@mikioh mikioh closed this as completed May 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

6 participants