Skip to content

cmd/compile/internal/importer: data race in TestIssue69912 as of CL 695977 #75963

@dmitshur

Description

@dmitshur

This is being reported by race builders across various ports at tip:

=== RUN   TestIssue69912
==================
WARNING: DATA RACE
Write at 0x00c0001aa098 by goroutine 1118:
  cmd/compile/internal/types2.(*Named).under()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/named.go:592 +0x68f
  cmd/compile/internal/types2.(*Named).Underlying()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/named.go:533 +0x84
  cmd/compile/internal/types2.under()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/under.go:15 +0x6f
  cmd/compile/internal/types2.(*Checker).validVarType.func1()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/typexpr.go:176 +0x70
  cmd/compile/internal/types2.(*Checker).processDelayed()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/check.go:558 +0x43e
  cmd/compile/internal/types2.(*Checker).checkFiles()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/check.go:500 +0x4f3
  cmd/compile/internal/types2.(*Checker).Files()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/check.go:460 +0x129
  cmd/compile/internal/types2.(*Config).Check()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/api.go:484 +0x37e
  cmd/compile/internal/importer.TestIssue69912.func1()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/importer/gcimporter_test.go:648 +0x353
  cmd/compile/internal/importer.TestIssue69912.func2()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/importer/gcimporter_test.go:669 +0x354

Previous read at 0x00c0001aa098 by goroutine 1114:
  cmd/compile/internal/types2.(*Named).under()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/named.go:558 +0x67
  cmd/compile/internal/types2.(*Named).Underlying()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/named.go:533 +0x84
  cmd/compile/internal/types2.under()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/under.go:15 +0x6f
  cmd/compile/internal/types2.(*Checker).validVarType.func1()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/typexpr.go:176 +0x70
  cmd/compile/internal/types2.(*Checker).processDelayed()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/check.go:558 +0x43e
  cmd/compile/internal/types2.(*Checker).checkFiles()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/check.go:500 +0x4f3
  cmd/compile/internal/types2.(*Checker).Files()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/check.go:460 +0x129
  cmd/compile/internal/types2.(*Config).Check()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/api.go:484 +0x37e
  cmd/compile/internal/importer.TestIssue69912.func1()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/importer/gcimporter_test.go:648 +0x353
  cmd/compile/internal/importer.TestIssue69912.func2()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/importer/gcimporter_test.go:669 +0x354

Goroutine 1118 (running) created at:
  cmd/compile/internal/importer.TestIssue69912()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/importer/gcimporter_test.go:667 +0x467
  testing.tRunner()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:2029 +0x21c
  testing.(*T).Run.gowrap1()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:2094 +0x38

Goroutine 1114 (running) created at:
  cmd/compile/internal/importer.TestIssue69912()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/importer/gcimporter_test.go:667 +0x467
  testing.tRunner()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:2029 +0x21c
  testing.(*T).Run.gowrap1()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:2094 +0x38
==================
==================
WARNING: DATA RACE
Write at 0x00c0001aa098 by goroutine 1114:
  cmd/compile/internal/types2.(*Named).under()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/named.go:592 +0x68f
  cmd/compile/internal/types2.(*Named).Underlying()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/named.go:533 +0x84
  cmd/compile/internal/types2.under()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/under.go:15 +0x6f
  cmd/compile/internal/types2.(*Checker).validVarType.func1()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/typexpr.go:176 +0x70
  cmd/compile/internal/types2.(*Checker).processDelayed()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/check.go:558 +0x43e
  cmd/compile/internal/types2.(*Checker).checkFiles()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/check.go:500 +0x4f3
  cmd/compile/internal/types2.(*Checker).Files()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/check.go:460 +0x129
  cmd/compile/internal/types2.(*Config).Check()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/api.go:484 +0x37e
  cmd/compile/internal/importer.TestIssue69912.func1()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/importer/gcimporter_test.go:648 +0x353
  cmd/compile/internal/importer.TestIssue69912.func2()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/importer/gcimporter_test.go:669 +0x354

Previous write at 0x00c0001aa098 by goroutine 1115:
  cmd/compile/internal/types2.(*Named).under()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/named.go:592 +0x68f
  cmd/compile/internal/types2.(*Named).Underlying()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/named.go:533 +0x84
  cmd/compile/internal/types2.under()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/under.go:15 +0x6f
  cmd/compile/internal/types2.(*Checker).validVarType.func1()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/typexpr.go:176 +0x70
  cmd/compile/internal/types2.(*Checker).processDelayed()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/check.go:558 +0x43e
  cmd/compile/internal/types2.(*Checker).checkFiles()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/check.go:500 +0x4f3
  cmd/compile/internal/types2.(*Checker).Files()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/check.go:460 +0x129
  cmd/compile/internal/types2.(*Config).Check()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/types2/api.go:484 +0x37e
  cmd/compile/internal/importer.TestIssue69912.func1()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/importer/gcimporter_test.go:648 +0x353
  cmd/compile/internal/importer.TestIssue69912.func2()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/importer/gcimporter_test.go:669 +0x354

Goroutine 1114 (running) created at:
  cmd/compile/internal/importer.TestIssue69912()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/importer/gcimporter_test.go:667 +0x467
  testing.tRunner()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:2029 +0x21c
  testing.(*T).Run.gowrap1()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:2094 +0x38

Goroutine 1115 (finished) created at:
  cmd/compile/internal/importer.TestIssue69912()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/cmd/compile/internal/importer/gcimporter_test.go:667 +0x467
  testing.tRunner()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:2029 +0x21c
  testing.(*T).Run.gowrap1()
      /home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:2094 +0x38
==================
    testing.go:1712: race detected during execution of test
--- FAIL: TestIssue69912 (0.02s)

Example build: https://ci.chromium.org/b/8700829986244285057.

It seems to have started happening as of CL 695977.

Metadata

Metadata

Assignees

Labels

BugReportIssues describing a possible bug in the Go implementation.FixPendingIssues that have a fix which has not yet been reviewed or submitted.compiler/runtimeIssues related to the Go compiler and/or runtime.release-blocker

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions