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 detected on linux-amd64-race #21632

Closed
dsnet opened this issue Aug 25, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@dsnet
Copy link
Member

commented Aug 25, 2017

Recently see on try-bot:

==================
WARNING: DATA RACE
Write at 0x0000008ff0d0 by main goroutine:
  net.uninstallTestHooks()
      /tmp/workdir/go/src/net/main_unix_test.go:39 +0x7a
  sync.(*Once).Do()
      /tmp/workdir/go/src/sync/once.go:44 +0xe1
  net.TestMain()
      /tmp/workdir/go/src/net/main_test.go:52 +0x6c
  main.main()
      net/_test/_testmain.go:524 +0x1cd

Previous read at 0x0000008ff0d0 by goroutine 96:
  internal/poll.(*FD).destroy()
      /tmp/workdir/go/src/internal/poll/fd_unix.go:62 +0x52
  internal/poll.(*FD).decref()
      /tmp/workdir/go/src/internal/poll/fd_mutex.go:211 +0x55
  internal/poll.(*FD).Close()
      /tmp/workdir/go/src/internal/poll/fd_unix.go:81 +0xf5
  net.(*netFD).Close()
      /tmp/workdir/go/src/net/fd_unix.go:184 +0x60
  net.(*conn).Close()
      /tmp/workdir/go/src/net/net.go:200 +0x60
  net.(*UDPConn).Close()
      <autogenerated>:1 +0x43
  net.(*dnsPacketConn).Close()
      <autogenerated>:1 +0x5b
  net.(*Resolver).exchange()
      /tmp/workdir/go/src/net/dnsclient_unix.go:145 +0x57f
  net.(*Resolver).tryOneName()
      /tmp/workdir/go/src/net/dnsclient_unix.go:161 +0x1ef
  net.(*Resolver).goLookupIPCNAMEOrder.func1()
      /tmp/workdir/go/src/net/dnsclient_unix.go:483 +0xa5

Goroutine 96 (finished) created at:
  net.(*Resolver).goLookupIPCNAMEOrder()
      /tmp/workdir/go/src/net/dnsclient_unix.go:482 +0x253
  net.(*Resolver).lookupIP()
      /tmp/workdir/go/src/net/lookup_unix.go:101 +0xdf
  net.(*Resolver).(net.lookupIP)-fm()
      /tmp/workdir/go/src/net/lookup.go:187 +0x7f
  net.glob..func10()
      /tmp/workdir/go/src/net/hook.go:19 +0x6e
  net.(*Resolver).LookupIPAddr.func1()
      /tmp/workdir/go/src/net/lookup.go:193 +0xc9
  internal/singleflight.(*Group).doCall()
      /tmp/workdir/go/src/internal/singleflight/singleflight.go:93 +0x4c
==================

Full log: https://storage.googleapis.com/go-build-log/f1123583/linux-amd64-race_75b56ae6.log

@dsnet dsnet added this to the Go1.10 milestone Aug 25, 2017

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Aug 25, 2017

Dup of #21090?

@dsnet

This comment has been minimized.

Copy link
Member Author

commented Aug 25, 2017

Seems like it. The stack traces are the same.

@dsnet dsnet closed this Aug 25, 2017

@golang golang locked and limited conversation to collaborators Aug 25, 2018

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.