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: FAIL: TestDialTimeout: all connections connected; expected some to time out #3867

Closed
alberts opened this issue Jul 26, 2012 · 10 comments
Closed

Comments

@alberts
Copy link
Contributor

alberts commented Jul 26, 2012

What steps will reproduce the problem?

Run the net unit tests repeatedly on a machine with many cores with GOMAXPROCS>>1.

What do you see instead?

=== RUN TestDialTimeout-50
--- FAIL: TestDialTimeout-50 (0.03 seconds)
dial_test.go:88: all connections connected; expected some to time out

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g

Which operating system are you using?

linux

Which version are you using?  (run 'go version')

GOMAXPROCS=50

go version weekly.2012-03-27 +c87a4b5ad6d7

Please provide any additional information below.

I hit this problem long ago with gccgo: issue #3307
@alberts
Copy link
Contributor Author

alberts commented Jul 26, 2012

Comment 1:

/proc/sys/net/core/somaxconn is 128

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 2:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 3:

Labels changed: added go1.1maybe.

@alberts
Copy link
Contributor Author

alberts commented Nov 22, 2012

Comment 4:

this tends to reproduce this issue:
#!/bin/bash
set -xe
go test -c net
while true; do
GOMAXPROCS=$[ 1 + $[ RANDOM % 128 ]] ./net.test -test.run=TestDialTimeout
-test.timeout=30s
done

@alberts
Copy link
Contributor Author

alberts commented Jan 23, 2013

Comment 5:

saw this again today with tip... c7719e0e0a2c

@alberts
Copy link
Contributor Author

alberts commented Mar 12, 2013

Comment 6:

now that almost everything else is fixed, this is the most flakey test in the tree.
6 failures in 30 builds.

@dvyukov
Copy link
Member

dvyukov commented Mar 12, 2013

Comment 7:

It looks like a test/OS issue (not runtime), because the test must be constructed in
such a way that all connections can't succeed. So it's not an issue with
timers/deadlines/etc.

@alberts
Copy link
Contributor Author

alberts commented Mar 12, 2013

Comment 8:

maybe it's as simple as:
numConns := listenerBacklog + 100
or even more.
if you do more, it might be nice to keep sockets that manage to connect around so that
the test can clean them up, maybe even doing SetLinger(0) before closing them.
Should I send a CL?

@rsc
Copy link
Contributor

rsc commented Mar 12, 2013

Comment 9:

[The time for maybe has passed.]

Labels changed: removed go1.1maybe.

@bradfitz
Copy link
Contributor

Comment 10:

This issue was closed by revision cdc6424.

Status changed to Fixed.

mikioh pushed a commit that referenced this issue Apr 2, 2015
This change makes TestDialTimeout work on almost all the supported
platforms.

Updates #3016.
Updates #3307.
Updates #3867.
Updates #5380.
Updates #5349.

Change-Id: Iacf0ebea23cdd8f6c0333d70c667a5a5f5eb0ed2
Reviewed-on: https://go-review.googlesource.com/8220
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants