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: TestDualStackTCPListener failure #5001

Closed
gopherbot opened this issue Mar 7, 2013 · 25 comments

Comments

Projects
None yet
5 participants
@gopherbot
Copy link

commented Mar 7, 2013

by steview.woodcock:

Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

Run "go version" and compare against
http://golang.org/doc/devel/release.html  If a newer version of Go exists,
install it and retry what you did to reproduce the problem.

Thanks.

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. Update  to tip 
2. run ./all.bash


What is the expected output?
All tests passed

What do you see instead?
--- FAIL: TestDualStackTCPListener (0.00 seconds)
    unicast_posix_test.go:407: Second Listen("tcp", "127.0.0.1:49272") returns listen tcp 127.0.0.1:49272: address already in use, expected <nil>
FAIL
FAIL    net 2.850s


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


Which operating system are you using?
Linux (Arch Linux 3.7.10 kernel) 

Which version are you using?  (run 'go version')
go version devel +fa13899da667 Thu Mar 07 09:19:02 2013 -0500 linux/amd64


Please provide any additional information below.
@mikioh

This comment has been minimized.

Copy link
Contributor

commented Mar 8, 2013

Comment 1:

Status changed to Accepted.

@mikioh

This comment has been minimized.

Copy link
Contributor

commented Mar 8, 2013

Comment 2:

Hi,
Does this happen so frequently?
@gopherbot

This comment has been minimized.

Copy link
Author

commented Mar 8, 2013

Comment 3 by steview.woodcock:

no its quite difficult to reproduce which suggests some form of race.
@rsc

This comment has been minimized.

Copy link
Contributor

commented Mar 12, 2013

Comment 4:

[The time for maybe has passed.]
@davecheney

This comment has been minimized.

Copy link
Contributor

commented Mar 23, 2013

Comment 5:

I can reproduce this easily after a few minutes running this script on an 8 core machine
--- FAIL: TestDualStackTCPListener-107 (0.00 seconds)
        unicast_posix_test.go:407: Second Listen("tcp4", "0.0.0.0:40030") returns listen tcp4 0.0.0.0:40030: address already in use, expected <nil>
ip-10-248-36-242(~/go/src) % cat stress.bash 
#!/bin/bash
set -e
eval $(go env)
export GOROOT
pkgs() {
        go list std | grep -v cmd
}
rand() {
        echo $[ 1 + $[ RANDOM % $[ $1 - 1 ] ] ]
}
pkgs | xargs -n 1 -P 4 -I % sh -c 'cd $GOROOT/src/pkg/$0 && go test -v -c' %
while true ; do 
        pkgs | xargs -n1 -P $(rand 8) -I % -t bash -xe -c \
                'cd $GOROOT/src/pkg/$0 && if [ -x $(basename $0).test ] ; then GOMAXPROCS=$1 $GOROOT/src/pkg/$0/$(basename $0).test || exit 255; fi ' % $(rand 128) 
done
@mikioh

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2013

Comment 6:

Hi Dave,
Can you try to repro w/ https://golang.org/cl/7880046/ ?
CL 7880046 will report the first TCP listener state when second one fails.
@davecheney

This comment has been minimized.

Copy link
Contributor

commented Mar 27, 2013

Comment 7:

Sorry, still occurs with 7880046 applied
--- FAIL: TestDualStackTCPListener-78 (0.00 seconds)
        unicast_posix_test.go:19: &syscall.TCPInfo{State:0xa, Ca_state:0x0, Retransmits:0x0, Probes:0x0, Backoff:0x0, Options:0x0, Pad_cgo_0:[2]uint8{0x0, 0x0}, Rto:0xf4240, Ato:0x0, Snd_mss:0x218, Rcv_mss:0x0, Unacked:0x0, Sacked:0x80, Lost:0x0, Retrans:0x0, Fackets:0x0, Last_data_sent:0x224ecc, Last_ack_sent:0x0, Last_data_recv:0x224ecc, Last_ack_recv:0x224ecc, Pmtu:0x0, Rcv_ssthresh:0x0, Rtt:0x0, Rttvar:0x3d090, Snd_ssthresh:0x7fffffff, Snd_cwnd:0xa, Advmss:0x0, Reordering:0x3, Rcv_rtt:0x0, Rcv_space:0x0, Total_retrans:0x0}
        unicast_posix_test.go:20: Second Listen("tcp4", ":53501") returns listen tcp4 <nil>:53501: address already in use, expected <nil>
@mikioh

This comment has been minimized.

Copy link
Contributor

commented Mar 27, 2013

Comment 8:

No, that's fine and what I expected. Thanks a lot!
  State:0xa
  Other fields are pretty clean and looks still larval
Hm, which version of Linux kernel are you running?
(Have to have a look at correct definitions for states)
@davecheney

This comment has been minimized.

Copy link
Contributor

commented Mar 27, 2013

Comment 9:

This was an m2.xlarge running in ec2 with whatever flavour of the
Ubuntu 12.10 kernel runs in that environment, probably 3.4 or 3.5.
@mikioh

This comment has been minimized.

Copy link
Contributor

commented Mar 27, 2013

Comment 10:

Aha, the first one still stays in TCP_LISTEN state.
Probably test cases might be wrong.
@davecheney

This comment has been minimized.

Copy link
Contributor

commented Jun 1, 2013

Comment 11:

Lowering priority, this doesn't happen that frequently.

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

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jul 30, 2013

Comment 12:

Labels changed: added go1.2maybe.

@bradfitz

This comment has been minimized.

Copy link
Member

commented Aug 13, 2013

Comment 13:

We continue to see this on the builders.
e.g. http://build.golang.org/log/f641c1499be25ad271b91dbc0656309375bcccee
@rsc

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2013

Comment 14:

Labels changed: added testing.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Oct 2, 2013

Comment 15:

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

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 16:

Labels changed: added release-go1.3.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 17:

Labels changed: removed go1.3.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 18:

Labels changed: added repo-main.

@davecheney

This comment has been minimized.

Copy link
Contributor

commented Jan 16, 2014

Comment 19:

This issue was updated by revision 8bc3278.

This test is flakey on linux servers and fails otherwise good builds. Mikio has some
proposals to fix the test, but they require additional plumbing.
In the meantime, disable this test in -short mode so it will run during the full net
test suite, but not during builder ci.
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/53410043
@mikioh

This comment has been minimized.

Copy link
Contributor

commented Jan 22, 2014

Comment 20:

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

@rsc

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2014

Comment 21:

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

@rsc

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2014

Comment 22:

Issue #4176 has been merged into this issue.

@gopherbot

This comment has been minimized.

Copy link
Author

commented Oct 6, 2014

Comment 23:

CL https://golang.org/cl/154950043 mentions this issue.
@rsc

This comment has been minimized.

Copy link
Contributor

commented Oct 6, 2014

Comment 24:

This issue was updated by revision 83001ff.

LGTM=bradfitz
R=rlh, bradfitz
CC=golang-codereviews
https://golang.org/cl/154950043

@rsc rsc added this to the Unplanned milestone Apr 10, 2015

@gopherbot

This comment has been minimized.

Copy link
Author

commented May 2, 2015

CL https://golang.org/cl/9661 mentions this issue.

@mikioh mikioh closed this in 9b184fd May 6, 2015

@mikioh mikioh modified the milestones: Go1.5, Unplanned May 6, 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.
You can’t perform that action at this time.