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 netFD.destroy #6165

Closed
dvyukov opened this issue Aug 16, 2013 · 1 comment

Comments

Projects
None yet
3 participants
@dvyukov
Copy link
Member

commented Aug 16, 2013

17795:749d02164043, linux/amd64
On net/http tests race detector episodically says:

WARNING: DATA RACE
Read by goroutine 44:
  net.(*pollDesc).Close()
      src/pkg/net/fd_poll_runtime.go:41 +0x35
  net.(*netFD).destroy()
      src/pkg/net/fd_unix.go:102 +0x44
  net.(*netFD).writeUnlock()
      src/pkg/net/fd_unix.go:153 +0x59
  net.(*netFD).Write()
      src/pkg/net/fd_unix.go:320 +0xd7
  net.(*conn).Write()
      src/pkg/net/net.go:131 +0x129
  net.(*TCPConn).Write()
      src/pkg/net/dial.go:1 +0x70
  bufio.(*Writer).flush()
      src/pkg/bufio/bufio.go:494 +0x1e3
  bufio.(*Writer).Flush()
      src/pkg/bufio/bufio.go:483 +0x46
  net/http.(*persistConn).writeLoop()
      src/pkg/net/http/transport.go:799 +0x2a4

Previous write by goroutine 37:
  net.(*pollDesc).Close()
      src/pkg/net/fd_poll_runtime.go:45 +0x81
  net.(*netFD).destroy()
      src/pkg/net/fd_unix.go:102 +0x44
  net.(*netFD).decref()
      src/pkg/net/fd_unix.go:121 +0x54
  net.(*netFD).Close()
      src/pkg/net/fd_unix.go:170 +0xdd
  net.(*conn).Close()
      src/pkg/net/net.go:139 +0xfd
  net.(*TCPConn).Close()
      src/pkg/net/dial.go:1 +0x4d
  net/http.(*persistConn).closeLocked()
      src/pkg/net/http/transport.go:944 +0xab
  net/http.(*persistConn).close()
      src/pkg/net/http/transport.go:938 +0x76
  net/http.(*Transport).CloseIdleConnections()
      src/pkg/net/http/transport.go:226 +0x1aa
  net/http/httptest.(*Server).Close()
      src/pkg/net/http/httptest/server.go:171 +0xdd
  net/http_test.TestOptions()
      src/pkg/net/http/serve_test.go:1487 +0x1477
  testing.tRunner()
      src/pkg/testing/testing.go:387 +0x13d

Goroutine 44 (running) created at:
  net/http.(*Transport).dialConn()
      src/pkg/net/http/transport.go:529 +0x9c8
  net/http.func·016()
      src/pkg/net/http/transport.go:419 +0x91

Goroutine 37 (finished) created at:
  testing.RunTests()
      src/pkg/testing/testing.go:467 +0xb9e
  testing.Main()
      src/pkg/testing/testing.go:399 +0xb4
  main.main()
      net/http/_test/_testmain.go:413 +0xdc
@dvyukov

This comment has been minimized.

Copy link
Member Author

commented Aug 16, 2013

Comment 1:

This issue was closed by revision 727dd08.

Status changed to Fixed.

@dvyukov dvyukov added fixed labels Aug 16, 2013

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015

@rsc rsc removed the go1.2 label Apr 14, 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.
You can’t perform that action at this time.