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

go/types: data race in computeInterfaceTypeSet since 2022-08-18 #54653

Closed
bcmills opened this issue Aug 24, 2022 · 5 comments
Closed

go/types: data race in computeInterfaceTypeSet since 2022-08-18 #54653

bcmills opened this issue Aug 24, 2022 · 5 comments
Assignees
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 Aug 24, 2022

https://build.golang.org/log/9184c4923ea696b86ecb0f0889fe952915f63b9f:

==================
WARNING: DATA RACE
Read at 0x00c00069b4e8 by goroutine 305:
  go/types.computeInterfaceTypeSet()
      /tmp/workdir/go/src/go/types/typeset.go:154 +0x6f
  go/types.computeInterfaceTypeSet()
      /tmp/workdir/go/src/go/types/typeset.go:276 +0x749
  go/types.(*Checker).validVarType.func1()
      /tmp/workdir/go/src/go/types/typexpr.go:163 +0xc4
  go/types.(*Checker).processDelayed()
      /tmp/workdir/go/src/go/types/check.go:390 +0x61
  go/types.(*Checker).checkFiles()
      /tmp/workdir/go/src/go/types/check.go:335 +0x18d
  go/types.(*Checker).Files()
      /tmp/workdir/go/src/go/types/check.go:307 +0x142a
  golang.org/x/tools/go/packages.(*loader).loadPackage()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:1001 +0x12f9
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:838 +0x324
  sync.(*Once).doSlow()
      /tmp/workdir/go/src/sync/once.go:74 +0x101
  sync.(*Once).Do()
      /tmp/workdir/go/src/sync/once.go:65 +0x46
  golang.org/x/tools/go/packages.(*loader).loadRecursive()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:826 +0x66
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:833 +0x44
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.2()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:835 +0x47

Previous write at 0x00c00069b4e8 by goroutine 221:
  go/types.computeInterfaceTypeSet()
      /tmp/workdir/go/src/go/types/typeset.go:193 +0x1b1
  go/types.(*Checker).validVarType.func1()
      /tmp/workdir/go/src/go/types/typexpr.go:163 +0xc4
  go/types.(*Checker).processDelayed()
      /tmp/workdir/go/src/go/types/check.go:390 +0x61
  go/types.(*Checker).checkFiles()
      /tmp/workdir/go/src/go/types/check.go:335 +0x18d
  go/types.(*Checker).Files()
      /tmp/workdir/go/src/go/types/check.go:307 +0x142a
  golang.org/x/tools/go/packages.(*loader).loadPackage()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:1001 +0x12f9
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:838 +0x324
  sync.(*Once).doSlow()
      /tmp/workdir/go/src/sync/once.go:74 +0x101
  sync.(*Once).Do()
      /tmp/workdir/go/src/sync/once.go:65 +0x46
  golang.org/x/tools/go/packages.(*loader).loadRecursive()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:826 +0x66
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:833 +0x44
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.2()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:835 +0x47

Goroutine 305 (running) created at:
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:832 +0xf0
  sync.(*Once).doSlow()
      /tmp/workdir/go/src/sync/once.go:74 +0x101
  sync.(*Once).Do()
      /tmp/workdir/go/src/sync/once.go:65 +0x46
  golang.org/x/tools/go/packages.(*loader).loadRecursive()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:826 +0x66
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:833 +0x44
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.2()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:835 +0x47

Goroutine 221 (finished) created at:
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:832 +0xf0
  sync.(*Once).doSlow()
      /tmp/workdir/go/src/sync/once.go:74 +0x101
  sync.(*Once).Do()
      /tmp/workdir/go/src/sync/once.go:65 +0x46
  golang.org/x/tools/go/packages.(*loader).loadRecursive()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:826 +0x66
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:833 +0x44
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.2()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:835 +0x47
==================
==================
WARNING: DATA RACE
Read at 0x00c000cc5330 by goroutine 305:
  go/types.(*_TypeSet).IsMethodSet()
      /tmp/workdir/go/src/go/types/typeset.go:39 +0x57
  go/types.(*Interface).IsMethodSet()
      /tmp/workdir/go/src/go/types/interface.go:126 +0x18
  go/types.(*Checker).isImportedConstraint()
      /tmp/workdir/go/src/go/types/decl.go:544 +0x139
  go/types.computeInterfaceTypeSet()
      /tmp/workdir/go/src/go/types/typeset.go:278 +0x777
  go/types.(*Checker).validVarType.func1()
      /tmp/workdir/go/src/go/types/typexpr.go:163 +0xc4
  go/types.(*Checker).processDelayed()
      /tmp/workdir/go/src/go/types/check.go:390 +0x61
  go/types.(*Checker).checkFiles()
      /tmp/workdir/go/src/go/types/check.go:335 +0x18d
  go/types.(*Checker).Files()
      /tmp/workdir/go/src/go/types/check.go:307 +0x142a
  golang.org/x/tools/go/packages.(*loader).loadPackage()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:1001 +0x12f9
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:838 +0x324
  sync.(*Once).doSlow()
      /tmp/workdir/go/src/sync/once.go:74 +0x101
  sync.(*Once).Do()
      /tmp/workdir/go/src/sync/once.go:65 +0x46
  golang.org/x/tools/go/packages.(*loader).loadRecursive()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:826 +0x66
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:833 +0x44
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.2()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:835 +0x47

Previous write at 0x00c000cc5330 by goroutine 221:
  go/types.computeInterfaceTypeSet()
      /tmp/workdir/go/src/go/types/typeset.go:193 +0xc4
  go/types.(*Checker).validVarType.func1()
      /tmp/workdir/go/src/go/types/typexpr.go:163 +0xc4
  go/types.(*Checker).processDelayed()
      /tmp/workdir/go/src/go/types/check.go:390 +0x61
  go/types.(*Checker).checkFiles()
      /tmp/workdir/go/src/go/types/check.go:335 +0x18d
  go/types.(*Checker).Files()
      /tmp/workdir/go/src/go/types/check.go:307 +0x142a
  golang.org/x/tools/go/packages.(*loader).loadPackage()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:1001 +0x12f9
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:838 +0x324
  sync.(*Once).doSlow()
      /tmp/workdir/go/src/sync/once.go:74 +0x101
  sync.(*Once).Do()
      /tmp/workdir/go/src/sync/once.go:65 +0x46
  golang.org/x/tools/go/packages.(*loader).loadRecursive()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:826 +0x66
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:833 +0x44
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.2()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:835 +0x47

Goroutine 305 (running) created at:
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:832 +0xf0
  sync.(*Once).doSlow()
      /tmp/workdir/go/src/sync/once.go:74 +0x101
  sync.(*Once).Do()
      /tmp/workdir/go/src/sync/once.go:65 +0x46
  golang.org/x/tools/go/packages.(*loader).loadRecursive()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:826 +0x66
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:833 +0x44
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.2()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:835 +0x47

Goroutine 221 (finished) created at:
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:832 +0xf0
  sync.(*Once).doSlow()
      /tmp/workdir/go/src/sync/once.go:74 +0x101
  sync.(*Once).Do()
      /tmp/workdir/go/src/sync/once.go:65 +0x46
  golang.org/x/tools/go/packages.(*loader).loadRecursive()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:826 +0x66
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:833 +0x44
  golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.2()
      /tmp/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:835 +0x47
==================

greplogs -l -e 'Previous write at .* by goroutine \d+:\n\s+go/types\.computeInterfaceTypeSet\(\)' --since=2022-07-01 --details

2022-08-24T16:06:46-587a153-2fc21b5/freebsd-amd64-race
2022-08-24T16:06:46-587a153-2fc21b5/linux-amd64-race
2022-08-24T16:06:46-587a153-2fc21b5/windows-amd64-newcc-race
2022-08-24T16:06:46-587a153-2fc21b5/windows-amd64-race
2022-08-24T16:00:07-587a153-3083529/freebsd-amd64-race
2022-08-24T16:00:07-587a153-3083529/linux-amd64-race
2022-08-24T16:00:07-587a153-3083529/windows-amd64-newcc-race
2022-08-24T16:00:07-587a153-3083529/windows-amd64-race
2022-08-24T15:37:38-587a153-d5aa088/freebsd-amd64-race
2022-08-24T15:37:38-587a153-d5aa088/linux-amd64-race
2022-08-24T15:37:38-587a153-d5aa088/windows-amd64-newcc-race
2022-08-24T15:37:38-587a153-d5aa088/windows-amd64-race
2022-08-24T14:31:08-587a153-f983a93/freebsd-amd64-race
2022-08-24T14:31:08-587a153-f983a93/linux-amd64-race
2022-08-24T14:31:08-587a153-f983a93/windows-amd64-newcc-race
2022-08-24T14:31:08-587a153-f983a93/windows-amd64-race
2022-08-24T12:12:12-587a153-b5a9459/freebsd-amd64-race
2022-08-24T12:12:12-587a153-b5a9459/linux-amd64-race
2022-08-24T12:12:12-587a153-b5a9459/windows-amd64-newcc-race
2022-08-24T12:12:12-587a153-b5a9459/windows-amd64-race
2022-08-24T08:17:52-587a153-1ab6b79/freebsd-amd64-race
2022-08-24T08:17:52-587a153-1ab6b79/linux-amd64-race
2022-08-24T08:17:52-587a153-1ab6b79/windows-amd64-newcc-race
2022-08-24T08:17:52-587a153-1ab6b79/windows-amd64-race
2022-08-24T05:40:28-587a153-1a8dfad/freebsd-amd64-race
2022-08-24T05:40:28-587a153-1a8dfad/linux-amd64-race
2022-08-24T05:40:28-587a153-1a8dfad/windows-amd64-newcc-race
2022-08-24T05:40:28-587a153-1a8dfad/windows-amd64-race
2022-08-24T02:54:32-587a153-75cdd2c/freebsd-amd64-race
2022-08-24T02:54:32-587a153-75cdd2c/linux-amd64-race
2022-08-24T02:54:32-587a153-75cdd2c/windows-amd64-newcc-race
2022-08-24T02:54:32-587a153-75cdd2c/windows-amd64-race
2022-08-24T02:23:58-587a153-7ee220c/freebsd-amd64-race
2022-08-24T02:23:58-587a153-7ee220c/linux-amd64-race
2022-08-24T02:23:58-587a153-7ee220c/windows-amd64-newcc-race
2022-08-24T02:23:58-587a153-7ee220c/windows-amd64-race
2022-08-23T23:17:55-587a153-1dcef7b/freebsd-amd64-race
2022-08-23T23:17:55-587a153-1dcef7b/linux-amd64-race
2022-08-23T23:17:55-587a153-1dcef7b/windows-amd64-newcc-race
2022-08-23T23:17:55-587a153-1dcef7b/windows-amd64-race
2022-08-23T23:11:53-587a153-aa42997/freebsd-amd64-race
2022-08-23T23:11:53-587a153-aa42997/linux-amd64-race
2022-08-23T23:11:53-587a153-aa42997/windows-amd64-newcc-race
2022-08-23T23:11:53-587a153-aa42997/windows-amd64-race
2022-08-23T22:44:18-587a153-ab8a2c5/freebsd-amd64-race
2022-08-23T22:44:18-587a153-ab8a2c5/linux-amd64-race
2022-08-23T22:44:18-587a153-ab8a2c5/windows-amd64-newcc-race
2022-08-23T22:44:18-587a153-ab8a2c5/windows-amd64-race
2022-08-23T22:01:05-587a153-0765da5/freebsd-amd64-race
2022-08-23T22:01:05-587a153-0765da5/linux-amd64-race
2022-08-23T22:01:05-587a153-0765da5/windows-amd64-newcc-race
2022-08-23T22:01:05-587a153-0765da5/windows-amd64-race
2022-08-23T21:24:14-587a153-60ad3c4/freebsd-amd64-race
2022-08-23T21:24:14-587a153-60ad3c4/linux-amd64-race
2022-08-23T21:24:14-587a153-60ad3c4/windows-amd64-newcc-race
2022-08-23T21:24:14-587a153-60ad3c4/windows-amd64-race
2022-08-23T21:04:06-587a153-790d605/freebsd-amd64-race
2022-08-23T21:04:06-587a153-790d605/linux-amd64-race
2022-08-23T21:04:06-587a153-790d605/windows-amd64-newcc-race
2022-08-23T21:04:06-587a153-790d605/windows-amd64-race
2022-08-22T15:51:31-587a153-b4c124a/freebsd-amd64-race
2022-08-22T15:51:31-587a153-b4c124a/linux-amd64-race
2022-08-22T15:51:31-587a153-b4c124a/windows-amd64-newcc-race
2022-08-22T15:51:31-587a153-b4c124a/windows-amd64-race
2022-08-22T15:41:53-587a153-db3e915/freebsd-amd64-race
2022-08-22T15:41:53-587a153-db3e915/windows-amd64-newcc-race
2022-08-22T15:41:53-587a153-db3e915/windows-amd64-race
2022-08-22T15:36:25-587a153-bdecfcb/freebsd-amd64-race
2022-08-22T15:36:25-587a153-bdecfcb/linux-amd64-race
2022-08-22T15:36:25-587a153-bdecfcb/windows-amd64-newcc-race
2022-08-22T15:36:25-587a153-bdecfcb/windows-amd64-race
2022-08-22T15:01:45-587a153-fc34fdb/freebsd-amd64-race
2022-08-22T15:01:45-587a153-fc34fdb/linux-amd64-race
2022-08-22T15:01:45-587a153-fc34fdb/windows-amd64-newcc-race
2022-08-22T15:01:45-587a153-fc34fdb/windows-amd64-race
2022-08-22T14:48:53-587a153-6bdca82/freebsd-amd64-race
2022-08-22T14:48:53-587a153-6bdca82/linux-amd64-race
2022-08-22T14:48:53-587a153-6bdca82/windows-amd64-newcc-race
2022-08-22T14:48:53-587a153-6bdca82/windows-amd64-race
2022-08-22T11:49:45-587a153-761db3e/freebsd-amd64-race
2022-08-22T11:49:45-587a153-761db3e/linux-amd64-race
2022-08-22T11:49:45-587a153-761db3e/windows-amd64-newcc-race
2022-08-22T11:49:45-587a153-761db3e/windows-amd64-race
2022-08-22T11:46:15-587a153-9a9aad4/freebsd-amd64-race
2022-08-22T11:46:15-587a153-9a9aad4/linux-amd64-race
2022-08-22T11:46:15-587a153-9a9aad4/windows-amd64-newcc-race
2022-08-22T11:46:15-587a153-9a9aad4/windows-amd64-race
2022-08-20T00:56:30-587a153-8d57f4d/freebsd-amd64-race
2022-08-20T00:56:30-587a153-8d57f4d/linux-amd64-race
2022-08-20T00:56:30-587a153-8d57f4d/windows-amd64-newcc-race
2022-08-20T00:56:30-587a153-8d57f4d/windows-amd64-race
2022-08-20T00:18:04-587a153-28afa5b/freebsd-amd64-race
2022-08-20T00:18:04-587a153-28afa5b/linux-amd64-race
2022-08-20T00:18:04-587a153-28afa5b/windows-amd64-newcc-race
2022-08-20T00:18:04-587a153-28afa5b/windows-amd64-race
2022-08-19T23:07:11-587a153-d05ce23/freebsd-amd64-race
2022-08-19T23:07:11-587a153-d05ce23/linux-amd64-race
2022-08-19T23:07:11-587a153-d05ce23/windows-amd64-newcc-race
2022-08-19T23:07:11-587a153-d05ce23/windows-amd64-race
2022-08-19T21:29:19-587a153-f3563bc/freebsd-amd64-race
2022-08-19T21:29:19-587a153-f3563bc/linux-amd64-race
2022-08-19T21:29:19-587a153-f3563bc/windows-amd64-newcc-race
2022-08-19T21:29:19-587a153-f3563bc/windows-amd64-race
2022-08-19T20:56:43-587a153-5f0170f/freebsd-amd64-race
2022-08-19T20:56:43-587a153-5f0170f/linux-amd64-race
2022-08-19T20:56:43-587a153-5f0170f/windows-amd64-newcc-race
2022-08-19T20:56:43-587a153-5f0170f/windows-amd64-race
2022-08-19T20:04:40-587a153-2e06019/freebsd-amd64-race
2022-08-19T20:04:40-587a153-2e06019/linux-amd64-race
2022-08-19T20:04:40-587a153-2e06019/windows-amd64-newcc-race
2022-08-19T20:04:40-587a153-2e06019/windows-amd64-race
2022-08-19T19:39:53-587a153-dbc3b44/freebsd-amd64-race
2022-08-19T19:39:53-587a153-dbc3b44/linux-amd64-race
2022-08-19T19:39:53-587a153-dbc3b44/windows-amd64-newcc-race
2022-08-19T19:39:53-587a153-dbc3b44/windows-amd64-race
2022-08-19T19:35:55-587a153-bc69ad3/freebsd-amd64-race
2022-08-19T19:35:55-587a153-bc69ad3/linux-amd64-race
2022-08-19T19:35:55-587a153-bc69ad3/windows-amd64-newcc-race
2022-08-19T19:35:55-587a153-bc69ad3/windows-amd64-race
2022-08-19T18:39:56-587a153-bf4e35b/freebsd-amd64-race
2022-08-19T18:39:56-587a153-bf4e35b/linux-amd64-race
2022-08-19T18:39:56-587a153-bf4e35b/windows-amd64-newcc-race
2022-08-19T18:39:56-587a153-bf4e35b/windows-amd64-race
2022-08-19T18:26:38-587a153-a73808e/freebsd-amd64-race
2022-08-19T18:26:38-587a153-a73808e/linux-amd64-race
2022-08-19T18:26:38-587a153-a73808e/windows-amd64-newcc-race
2022-08-19T18:26:38-587a153-a73808e/windows-amd64-race
2022-08-19T17:47:49-e55fb40-a73808e/freebsd-amd64-race
2022-08-19T17:47:49-e55fb40-a73808e/linux-amd64-race
2022-08-19T17:47:49-e55fb40-a73808e/windows-amd64-newcc-race
2022-08-19T17:47:49-e55fb40-a73808e/windows-amd64-race
2022-08-19T17:28:00-e55fb40-0a1da09/freebsd-amd64-race
2022-08-19T17:28:00-e55fb40-0a1da09/linux-amd64-race
2022-08-19T17:28:00-e55fb40-0a1da09/windows-amd64-newcc-race
2022-08-19T17:28:00-e55fb40-0a1da09/windows-amd64-race
2022-08-19T17:03:55-e55fb40-dc8e2a6/freebsd-amd64-race
2022-08-19T17:03:55-e55fb40-dc8e2a6/linux-amd64-race
2022-08-19T17:03:55-e55fb40-dc8e2a6/windows-amd64-newcc-race
2022-08-19T17:03:55-e55fb40-dc8e2a6/windows-amd64-race
2022-08-19T16:55:03-e55fb40-7dad1d2/freebsd-amd64-race
2022-08-19T16:55:03-e55fb40-7dad1d2/linux-amd64-race
2022-08-19T16:55:03-e55fb40-7dad1d2/windows-amd64-newcc-race
2022-08-19T16:55:03-e55fb40-7dad1d2/windows-amd64-race
2022-08-19T16:45:08-e55fb40-48297f1/freebsd-amd64-race
2022-08-19T16:45:08-e55fb40-48297f1/linux-amd64-race
2022-08-19T16:33:22-e55fb40-f65ded5/freebsd-amd64-race
2022-08-19T16:33:22-e55fb40-f65ded5/linux-amd64-race
2022-08-19T16:33:22-e55fb40-f65ded5/windows-amd64-newcc-race
2022-08-19T16:33:22-e55fb40-f65ded5/windows-amd64-race
2022-08-19T16:27:36-e55fb40-fe196a0/linux-amd64-race
2022-08-19T16:27:36-e55fb40-fe196a0/windows-amd64-newcc-race
2022-08-19T16:27:36-e55fb40-fe196a0/windows-amd64-race
2022-08-19T16:17:50-e55fb40-5729419/freebsd-amd64-race
2022-08-19T16:17:50-e55fb40-5729419/linux-amd64-race
2022-08-19T16:17:50-e55fb40-5729419/windows-amd64-newcc-race
2022-08-19T16:17:50-e55fb40-5729419/windows-amd64-race
2022-08-19T16:12:50-e55fb40-3204e62/linux-amd64-race
2022-08-19T16:12:50-e55fb40-3204e62/windows-amd64-newcc-race
2022-08-19T16:12:50-e55fb40-3204e62/windows-amd64-race
2022-08-19T16:04:12-e55fb40-f15761b/freebsd-amd64-race
2022-08-19T16:04:12-e55fb40-f15761b/linux-amd64-race
2022-08-19T16:04:12-e55fb40-f15761b/windows-amd64-newcc-race
2022-08-19T16:04:12-e55fb40-f15761b/windows-amd64-race
2022-08-19T15:53:47-e55fb40-f324355/freebsd-amd64-race
2022-08-19T15:53:47-e55fb40-f324355/linux-amd64-race
2022-08-19T15:53:47-e55fb40-f324355/windows-amd64-newcc-race
2022-08-19T15:53:47-e55fb40-f324355/windows-amd64-race
2022-08-19T03:32:27-e55fb40-6001c04/freebsd-amd64-race
2022-08-19T03:32:27-e55fb40-6001c04/linux-amd64-race
2022-08-19T03:32:27-e55fb40-6001c04/windows-amd64-newcc-race
2022-08-19T03:32:27-e55fb40-6001c04/windows-amd64-race
2022-08-19T03:09:05-e55fb40-a409356/freebsd-amd64-race
2022-08-19T03:09:05-e55fb40-a409356/linux-amd64-race
2022-08-19T03:09:05-e55fb40-a409356/windows-amd64-newcc-race
2022-08-19T03:09:05-e55fb40-a409356/windows-amd64-race
2022-08-19T03:01:14-e55fb40-55ecc3a/freebsd-amd64-race
2022-08-19T03:01:14-e55fb40-55ecc3a/linux-amd64-race
2022-08-19T03:01:14-e55fb40-55ecc3a/windows-amd64-newcc-race
2022-08-19T03:01:14-e55fb40-55ecc3a/windows-amd64-race
2022-08-19T01:34:22-e55fb40-ee833ed/freebsd-amd64-race
2022-08-19T01:34:22-e55fb40-ee833ed/linux-amd64-race
2022-08-19T01:34:22-e55fb40-ee833ed/windows-amd64-newcc-race
2022-08-19T01:34:22-e55fb40-ee833ed/windows-amd64-race
2022-08-19T00:29:18-e55fb40-a719a78/freebsd-amd64-race
2022-08-19T00:29:18-e55fb40-a719a78/linux-amd64-race
2022-08-19T00:29:18-e55fb40-a719a78/windows-amd64-newcc-race
2022-08-19T00:29:18-e55fb40-a719a78/windows-amd64-race
2022-08-18T22:53:59-e55fb40-833367e/freebsd-amd64-race
2022-08-18T22:53:59-e55fb40-833367e/linux-amd64-race
2022-08-18T22:53:59-e55fb40-833367e/windows-amd64-newcc-race
2022-08-18T22:53:59-e55fb40-833367e/windows-amd64-race

(191 matching logs)

@bcmills bcmills changed the title go/types: data race in computeInterfaceTypeSet go/types: data race in computeInterfaceTypeSet since 2022-08-18 Aug 24, 2022
@bcmills bcmills added 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 Aug 24, 2022
@bcmills bcmills added this to the Go1.20 milestone Aug 24, 2022
@bcmills
Copy link
Contributor Author

bcmills commented Aug 24, 2022

The first failure in the logs appears to have been at CL 422235 (attn @mdempsky), although it's not obvious to me whether that was the change that triggered the race.

(The dashboard appears to be missing x/tools runs on the race builders for a chunk of the CLs in that range due to the high rate of churn when the tree reopened.)

@mdempsky
Copy link
Member

mdempsky commented Aug 24, 2022

I suspect the issue is the unified importer isn't calling Interface.Complete.

@mdempsky mdempsky assigned mdempsky and unassigned griesemer Aug 24, 2022
@gopherbot
Copy link

Change https://go.dev/cl/425360 mentions this issue: go/internal/gcimporter: call Interface.Complete in unified importer

@gopherbot
Copy link

Change https://go.dev/cl/425362 mentions this issue: go/internal/gcimporter: call Interface.Complete in unified importer

gopherbot pushed a commit that referenced this issue Aug 24, 2022
To support concurrent use of the go/types API, importers need to call
Interface.Complete on constructed interfaces before returning.

There's an issue that the interfaces may contain embedded defined
types, whose underlying type isn't known yet. This issue will
eventually go away once CL 424876 lands, but that CL needs to wait for
CL 424854 to re-land, which needs to wait for CL 421879 to land...

In the mean time, this CL implements the same solution used by the
indexed importer: maintaining a list of constructed interfaces, and
calling Interface.Complete on them after the SetUnderlying loop and
just before returning the imported package.

Updates #54653.

Change-Id: I0f42c915a4b7d28c628bbab7ac2eab2415c7858f
Reviewed-on: https://go-review.googlesource.com/c/go/+/425360
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
@gopherbot
Copy link

Change https://go.dev/cl/425365 mentions this issue: go/internal/gcimporter: call Complete on cloned Interfaces too

gopherbot pushed a commit that referenced this issue Aug 24, 2022
For "type T interface{ M() }", go/types users expect T's underlying
interface type to specify T as the receiver parameter type (#49906).
The unified importer handles this by cloning the interface to rewrite
the receiver parameters before calling SetUnderlying.

I missed in CL 425360 that these interfaces would need to have
Complete called too.

Manually tested to confirm that this actually fixes "go test -race
golang.org/x/tools/go/analysis/internal/checker" now (when both CLs
are ported to the x/tools importer).

Updates #54653.

Change-Id: I51e6db925db56947cd39dbe880230f14734ca01c
Reviewed-on: https://go-review.googlesource.com/c/go/+/425365
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
rajbarik pushed a commit to rajbarik/go that referenced this issue Sep 1, 2022
To support concurrent use of the go/types API, importers need to call
Interface.Complete on constructed interfaces before returning.

There's an issue that the interfaces may contain embedded defined
types, whose underlying type isn't known yet. This issue will
eventually go away once CL 424876 lands, but that CL needs to wait for
CL 424854 to re-land, which needs to wait for CL 421879 to land...

In the mean time, this CL implements the same solution used by the
indexed importer: maintaining a list of constructed interfaces, and
calling Interface.Complete on them after the SetUnderlying loop and
just before returning the imported package.

Updates golang#54653.

Change-Id: I0f42c915a4b7d28c628bbab7ac2eab2415c7858f
Reviewed-on: https://go-review.googlesource.com/c/go/+/425360
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
rajbarik pushed a commit to rajbarik/go that referenced this issue Sep 1, 2022
For "type T interface{ M() }", go/types users expect T's underlying
interface type to specify T as the receiver parameter type (golang#49906).
The unified importer handles this by cloning the interface to rewrite
the receiver parameters before calling SetUnderlying.

I missed in CL 425360 that these interfaces would need to have
Complete called too.

Manually tested to confirm that this actually fixes "go test -race
golang.org/x/tools/go/analysis/internal/checker" now (when both CLs
are ported to the x/tools importer).

Updates golang#54653.

Change-Id: I51e6db925db56947cd39dbe880230f14734ca01c
Reviewed-on: https://go-review.googlesource.com/c/go/+/425365
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
@golang golang locked and limited conversation to collaborators Aug 24, 2023
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
None yet
Development

No branches or pull requests

4 participants