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: data race in TestSocket{Conn,PacketConn} #10891

Closed
mikioh opened this issue May 18, 2015 · 1 comment
Closed

net: data race in TestSocket{Conn,PacketConn} #10891

mikioh opened this issue May 18, 2015 · 1 comment
Labels
FrozenDueToAge Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@mikioh
Copy link
Contributor

mikioh commented May 18, 2015

The tester goroutine should wait for writer goroutines to stop for uninstalling test hooks gracefully.

==================
WARNING: DATA RACE
Write by main goroutine:
  net.uninstallTestHooks()
      /go/src/net/main_unix_test.go:37 +0x73
  sync.(*Once).Do()
      /go/src/sync/once.go:44 +0xf9
  net.TestMain()
      /go/src/net/main_test.go:46 +0x65
  main.main()
      net/_test/_testmain.go:396 +0x20c

Previous read by goroutine 9:
  net.(*netFD).destroy()
      /go/src/net/fd_unix.go:136 +0x55
  net.(*netFD).writeUnlock()
      /go/src/net/fd_unix.go:186 +0x59
  net.(*netFD).sendTo()
      /go/src/net/fd_unix.go:410 +0x376
  net.(*socketFile).WriteTo()
      /go/src/net/file_unix.go:179 +0x202
  net.TestSocketPacketConn.func1()
      /go/src/net/file_linux_test.go:73 +0x332

Goroutine 9 (finished) created at:
  net.TestSocketPacketConn()
      /go/src/net/file_linux_test.go:77 +0x66c
  testing.tRunner()
      /go/src/testing/testing.go:454 +0xfb
==================
@mikioh mikioh self-assigned this May 18, 2015
@mikioh mikioh added this to the Go1.5 milestone May 18, 2015
@gopherbot
Copy link

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

@mikioh mikioh closed this as completed in 17177a0 May 20, 2015
@mikioh mikioh added the Testing An issue that has been verified to require only test changes, not just a test failure. label May 21, 2015
@mikioh mikioh removed their assignment May 27, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 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

2 participants