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: race condition in TestTCPStress #13704

Closed
mikioh opened this issue Dec 22, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@mikioh
Copy link
Contributor

commented Dec 22, 2015

I overlooked this during go1.5 cycle.

go test -v -race -run=TestTCPStress
=== RUN   TestTCPStress
--- PASS: TestTCPStress (0.38s)
PASS
==================
WARNING: DATA RACE
Write by main goroutine:
  net.uninstallTestHooks()
      /go/src/net/main_unix_test.go:37 +0x6f
  sync.(*Once).Do()
      /go/src/sync/once.go:44 +0xf6
  net.TestMain()
      /go/src/net/main_test.go:52 +0x62
  main.main()
      net/_test/_testmain.go:436 +0x20a

Previous read by goroutine 7:
  net.(*netFD).destroy()
      /go/src/net/fd_unix.go:153 +0x52
  net.(*netFD).readUnlock()
      /go/src/net/fd_unix.go:187 +0x52
  net.(*netFD).accept()
      /go/src/net/fd_unix.go:436 +0x32e
  net.(*TCPListener).AcceptTCP()
      /go/src/net/tcpsock_posix.go:254 +0x76
  net.(*TCPListener).Accept()
      /go/src/net/tcpsock_posix.go:264 +0x4a
  net.TestTCPStress.func3()
      /go/src/net/tcp_test.go:545 +0x38

Goroutine 7 (finished) created at:
  net.TestTCPStress()
      /go/src/net/tcp_test.go:560 +0x308
  testing.tRunner()
      /go/src/testing/testing.go:467 +0xdc
==================
Socket statistical information:
(inet4, stream, default): opened=3, connected=2, listened=1, accepted=2, closed=5, openfailed=0, connectfailed=2, listenfailed=0, acceptfailed=2, closefailed=0

@mikioh mikioh added the Testing label Dec 22, 2015

@mikioh mikioh added this to the Go1.6 milestone Dec 22, 2015

@gopherbot

This comment has been minimized.

Copy link

commented Dec 22, 2015

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

@mikioh mikioh closed this in 11ac72a Dec 22, 2015

@golang golang locked and limited conversation to collaborators Dec 29, 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.