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: usableLocalPort fails on Windows 7 #3219

Closed
LukeMauldin opened this issue Mar 6, 2012 · 8 comments
Closed

net: usableLocalPort fails on Windows 7 #3219

LukeMauldin opened this issue Mar 6, 2012 · 8 comments
Milestone

Comments

@LukeMauldin
Copy link

Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull", "hg update default", rebuild, and
retry
what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
1. Checkout the latest head version
2. Build Go

What is the expected output?
All tests complete successfully

What do you see instead?
Failed tests:
ok      exp/utf8string  0.355s
--- FAIL: TestNotifyEvents (0.02 seconds)
        winfsnotify_test.go:17: expected: "TestNotifyEvents.testdirectory/TestN
tifyEvents.testfile": 0x100
        winfsnotify_test.go:23: received: "TestNotifyEvents.testdirectory/TestN
tifyEvents.testfile": 0x100 == FS_CREATE
        winfsnotify_test.go:17: expected: "TestNotifyEvents.testdirectory/TestN
tifyEvents.testfile": 0x2
        winfsnotify_test.go:23: received: "TestNotifyEvents.testdirectory/TestN
tifyEvents.testfile": 0x2 == FS_MODIFY
        winfsnotify_test.go:17: expected: "TestNotifyEvents.testdirectory/TestN
tifyEvents.testfile": 0x2
        winfsnotify_test.go:23: received: "TestNotifyEvents.testdirectory/TestN
tifyEvents.testfile": 0x2 == FS_MODIFY
        winfsnotify_test.go:17: expected: "TestNotifyEvents.testdirectory/TestN
tifyEvents.testfile": 0x40
        winfsnotify_test.go:23: received: "TestNotifyEvents.testdirectory/TestN
tifyEvents.testfile": 0x40 == FS_MOVED_FROM
        winfsnotify_test.go:17: expected: "TestNotifyEvents.testdirectory/TestN
tifyEvents.testfile.new": 0x80
        winfsnotify_test.go:23: received: "TestNotifyEvents.testdirectory/TestN
tifyEvents.testfile.new": 0x80 == FS_MOVED_TO
        winfsnotify_test.go:17: expected: "TestNotifyEvents.testdirectory/TestNo
tifyEvents.testfile.new": 0x80
        winfsnotify_test.go:23: received: "TestNotifyEvents.testdirectory/TestNo
tifyEvents.testfile.new": 0x80 == FS_MOVED_TO
        winfsnotify_test.go:17: expected: "TestNotifyEvents.testdirectory/TestNo
tifyEvents.testfile": 0x800
        winfsnotify_test.go:23: received: "TestNotifyEvents.testdirectory/TestNo
tifyEvents.testfile": 0x800 == FS_MOVE_SELF
        winfsnotify_test.go:17: expected: "TestNotifyEvents.testdirectory/TestNo
tifyEvents.testfile.new": 0x400
        winfsnotify_test.go:23: received: "TestNotifyEvents.testdirectory": 0x40
0 == FS_DELETE_SELF
        winfsnotify_test.go:25: did not receive expected event
FAIL
FAIL    exp/winfsnotify 0.329s
ok      mime/multipart  1.110s
--- FAIL: TestSimpleUDPListener (0.00 seconds)
        unicast_test.go:183: First ListenPacket("udp", ":65463") failed: listen
udp <nil>:65463: Only one usage of each socket address (protocol/network address
/port) is normally permitted.
FAIL
FAIL    net     1.115s
--- FAIL: TestServeHTTP10Close (0.01 seconds)
        serve_test.go:391: ReadResponse error: WSARecv tcp 127.0.0.1:23688: The
specified network name is no longer available.
FAIL
FAIL    net/http        3.443s
ok      net/http/cgi    3.552s

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

Which operating system are you using?
Windows 7 x64

Which revision are you using?  (hg identify)
c1f5756f94b0 tip

Please provide any additional information below.
@bradfitz
Copy link
Contributor

bradfitz commented Mar 7, 2012

Comment 1:

Are you running any particular anti-virus software?

@LukeMauldin
Copy link
Author

Comment 2:

Yes, I am running Symantec.  However, I have been building from the Go head almost every
day and yesterday was the first day I received an test failure.

@rsc
Copy link
Contributor

rsc commented Mar 7, 2012

Comment 3:

The exp/winfsnotify error could be a race in the test that appears only under
load.  I do not know if Windows guarantees to report the removal of the file
before the removal of the directory containing it, but that is what the test
expects.
The net error could be induced by the usableLocalPort function added at:
changeset:   12889:e28f1aac1223
user:        Mikio Hara <mikioh.mikioh@gmail.com>
date:        Tue Mar 06 00:13:10 2012 +0900
summary:     net: make Dial and Listen behavior consistent across over platforms
It could be that the socket is really not being closed, or that again there is a race
between l.Close happening and the the socket being used in the test.
The net/http failure could be a bug in Windows networking.  Perhaps closing
the connection on the server side does not wait for the sent data to be received,
so that ReadResponse does not actually receive the header it expects.
But all three of these failures appeared simultaneously, and only the net test
has been edited recently.  I think that maybe the tests are buggy _and_ the
bugs only appear when run on a particularly loaded system.  
Does this happen every time you run all.bat or just occasionally?  Can you make
it happen again at all?
If it is not 100% reproducible then I am inclined to push it to after Go 1.
I am running Windows 7 x64 under VMware without problems.

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

Owner changed to builder@golang.org.

Status changed to Accepted.

@LukeMauldin
Copy link
Author

Comment 4:

At least one test failure has occurred every time I build since I reported the error. 
This morning, the failure text was different:
ok      mime/multipart  0.498s
--- FAIL: TestSimpleUDPListener (0.00 seconds)
        unicast_test.go:183: First ListenPacket("udp", "127.0.0.1:62793") failed
: listen udp 127.0.0.1:62793: Only one usage of each socket address (protocol/ne
twork address/port) is normally permitted.
FAIL
FAIL    net     1.246s
ok      net/http        2.632s

@rsc
Copy link
Contributor

rsc commented Mar 7, 2012

Comment 5:

Thanks.  Have you seen the winfsnotify or net/http failures again?
The one in net is in code introduced yesterday or the day before,
so it might just not work in your environment.  The others I can't
explain being consistent.  We can fix the one in net fairly easily,
I think.

@LukeMauldin
Copy link
Author

Comment 6:

I have not seen the winfsnotify again or the net/http failures again.  I am only
encountering the unicast_test.go failure repeatedly.

@rsc
Copy link
Contributor

rsc commented Mar 7, 2012

Comment 7:

Okay, let's assume winfsnotify is buggy (but it's in exp so I don't care very much) and
that maybe net/http's test has a race too.  We can fix those when they get more
intrusive.
Changing this issue to be just about the net failure.

@rsc
Copy link
Contributor

rsc commented Mar 7, 2012

Comment 8:

This issue was closed by revision a385f38.

Status changed to Fixed.

@rsc rsc added this to the Go1 milestone Apr 10, 2015
@rsc rsc removed the priority-go1 label Apr 10, 2015
@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

4 participants