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 cgoLookupIP on darwin #58169

Closed
bcmills opened this issue Jan 31, 2023 · 1 comment
Closed

net: data race in cgoLookupIP on darwin #58169

bcmills opened this issue Jan 31, 2023 · 1 comment
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages)
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Jan 31, 2023

#!watchflakes
post <- `DATA RACE` && `^\s+net\.cgoLookupIP`

https://build.golang.org/log/39ca7f1b3760ae8eb02b4714e12acbb662c9fd6b:

==================
WARNING: DATA RACE
Write at 0x00c000011350 by goroutine 4493:
  net.cgoLookupIP.func1()
      /tmp/buildlet/go/src/net/cgo_unix.go:210 +0x95
  net.doBlockingWithCtx[...].func1()
      /tmp/buildlet/go/src/net/cgo_unix.go:48 +0x49

Previous write at 0x00c000011350 by goroutine 757:
  net.cgoLookupIP()
      /tmp/buildlet/go/src/net/cgo_unix.go:209 +0x1f4
  net.cgoLookupHost()
      /tmp/buildlet/go/src/net/cgo_unix.go:62 +0x77
  net.(*Resolver).lookupHost()
      /tmp/buildlet/go/src/net/lookup_unix.go:59 +0x109
  net.(*Resolver).LookupHost()
      /tmp/buildlet/go/src/net/lookup.go:191 +0x22d
  net.TestLookupHostCancel()
      /tmp/buildlet/go/src/net/lookup_test.go:991 +0x1a6
  testing.tRunner()
      /tmp/buildlet/go/src/testing/testing.go:1576 +0x22e
  testing.(*T).Run.func1()
      /tmp/buildlet/go/src/testing/testing.go:1629 +0x44

Goroutine 4493 (running) created at:
  net.doBlockingWithCtx[...]()
      /tmp/buildlet/go/src/net/cgo_unix.go:46 +0x1b9
  net.cgoLookupIP()
      /tmp/buildlet/go/src/net/cgo_unix.go:209 +0x1d1
  net.cgoLookupHost()
      /tmp/buildlet/go/src/net/cgo_unix.go:62 +0x77
  net.(*Resolver).lookupHost()
      /tmp/buildlet/go/src/net/lookup_unix.go:59 +0x109
  net.(*Resolver).LookupHost()
      /tmp/buildlet/go/src/net/lookup.go:191 +0x22d
  net.TestLookupHostCancel()
      /tmp/buildlet/go/src/net/lookup_test.go:991 +0x1a6
  testing.tRunner()
      /tmp/buildlet/go/src/testing/testing.go:1576 +0x22e
  testing.(*T).Run.func1()
      /tmp/buildlet/go/src/testing/testing.go:1629 +0x44

Goroutine 757 (running) created at:
  testing.(*T).Run()
      /tmp/buildlet/go/src/testing/testing.go:1629 +0x80b
  testing.runTests.func1()
      /tmp/buildlet/go/src/testing/testing.go:2036 +0x84
  testing.tRunner()
      /tmp/buildlet/go/src/testing/testing.go:1576 +0x22e
  testing.runTests()
      /tmp/buildlet/go/src/testing/testing.go:2034 +0x8aa
  testing.(*M).Run()
      /tmp/buildlet/go/src/testing/testing.go:1906 +0xb34
  net.TestMain()
      /tmp/buildlet/go/src/net/main_test.go:52 +0x38
  main.main()
      _testmain.go:659 +0x31d
==================
@bcmills bcmills added this to the Go1.21 milestone Jan 31, 2023
@bcmills bcmills added release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jan 31, 2023
@gopherbot
Copy link

Change https://go.dev/cl/464375 mentions this issue: Revert "net: move context cancellation logic of blocking calls to a common function."

johanbrandhorst pushed a commit to Pryz/go that referenced this issue Feb 12, 2023
…ommon function."

This reverts CL 463231.

Reason for revert: introduced a data race on darwin.

Fixes golang#58169.

Change-Id: I35f02273db38c257369c166547bb4945f92fdc3a
Reviewed-on: https://go-review.googlesource.com/c/go/+/464375
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
@golang golang locked and limited conversation to collaborators Jan 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages)
Projects
Status: Done
Development

No branches or pull requests

2 participants