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

x/tools/go/loader: data race between (*Config).Load and (*importer).load #39134

Closed
bcmills opened this issue May 18, 2020 · 1 comment
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented May 18, 2020

https://build.golang.org/log/0a21f00ce4288dd398547ef13f5a6abdcd8ed0de

==================
WARNING: DATA RACE
Read at 0x00c004343410 by goroutine 54:
  runtime.mapiterinit()
      /tmp/workdir/go/src/runtime/map.go:797 +0x0
  golang.org/x/tools/go/loader.(*Config).Load()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/loader/loader.go:640 +0x1543
  golang.org/x/tools/go/loader_test.TestCycles()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/loader/loader_test.go:744 +0xac2
  testing.tRunner()
      /tmp/workdir/go/src/testing/testing.go:991 +0x1eb

Previous write at 0x00c004343410 by goroutine 143:
  runtime.mapassign_faststr()
      /tmp/workdir/go/src/runtime/map_faststr.go:202 +0x0
  golang.org/x/tools/go/loader.(*importer).load()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/loader/loader.go:992 +0x2c4
  golang.org/x/tools/go/loader.(*importer).startLoad.func1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/loader/loader.go:970 +0x46

Goroutine 54 (running) created at:
  testing.(*T).Run()
      /tmp/workdir/go/src/testing/testing.go:1042 +0x660
  testing.runTests.func1()
      /tmp/workdir/go/src/testing/testing.go:1284 +0xa6
  testing.tRunner()
      /tmp/workdir/go/src/testing/testing.go:991 +0x1eb
  testing.runTests()
      /tmp/workdir/go/src/testing/testing.go:1282 +0x527
  testing.(*M).Run()
      /tmp/workdir/go/src/testing/testing.go:1199 +0x2ff
  golang.org/x/tools/go/loader_test.TestMain()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/loader/loader_test.go:32 +0x3d
  main.main()
      _testmain.go:90 +0x223

Goroutine 143 (finished) created at:
  golang.org/x/tools/go/loader.(*importer).startLoad()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/loader/loader.go:969 +0x2bb
  golang.org/x/tools/go/loader.(*importer).importAll()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/loader/loader.go:884 +0x327
  golang.org/x/tools/go/loader.(*importer).addFiles()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/loader/loader.go:1014 +0x110
  golang.org/x/tools/go/loader.(*importer).load()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/loader/loader.go:989 +0x1f5
  golang.org/x/tools/go/loader.(*importer).startLoad.func1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/loader/loader.go:970 +0x46
==================

CC @matloob @stamblerre

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 18, 2020
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label May 18, 2020
@gopherbot gopherbot added this to the Unreleased milestone May 18, 2020
@bcmills
Copy link
Contributor Author

bcmills commented May 28, 2020

Duplicate of #36415

@bcmills bcmills marked this as a duplicate of #36415 May 28, 2020
@bcmills bcmills closed this as completed May 28, 2020
@golang golang locked and limited conversation to collaborators May 28, 2021
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. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

2 participants