Skip to content

observability: data race #5423

@easwars

Description

@easwars

Failing run on GA: https://github.com/grpc/grpc-go/runs/6889009694?check_suite_focus=true

Race detector output
==================
WARNING: DATA RACE
Read at 0x00c0002d86c3 by goroutine 7:
  testing.(*common).logDepth()
      /opt/hostedtoolcache/go/1.18.3/x64/src/testing/testing.go:882 +0x4ce
  testing.(*common).log()
      /opt/hostedtoolcache/go/1.18.3/x64/src/testing/testing.go:869 +0x9c
  testing.(*common).Logf()
      /opt/hostedtoolcache/go/1.18.3/x64/src/testing/testing.go:920 +0x67
  google.golang.org/grpc/gcp/observability.(*fakeOpenCensusExporter).ExportView()
      /home/runner/work/grpc-go/grpc-go/gcp/observability/observability_test.go:369 +0x1f3
  go.opencensus.io/stats/view.(*worker).reportView()
      /home/runner/go/pkg/mod/[email protected]/stats/view/worker.go:357 +0x406
  go.opencensus.io/stats/view.(*worker).reportUsage()
      /home/runner/go/pkg/mod/[email protected]/stats/view/worker.go:365 +0x130
  go.opencensus.io/stats/view.(*worker).start()
      /home/runner/go/pkg/mod/[email protected]/stats/view/worker.go:280 +0x1c4
  go.opencensus.io/stats/view.init.0.func1()
      /home/runner/go/pkg/mod/[email protected]/stats/view/worker.go:34 +0x39
Previous write at 0x00c0002d86c3 by goroutine 10:
  testing.tRunner.func1()
      /opt/hostedtoolcache/go/1.18.3/x64/src/testing/testing.go:1426 +0x7af
  runtime.deferreturn()
      /opt/hostedtoolcache/go/1.18.3/x64/src/runtime/panic.go:436 +0x32
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.18.3/x64/src/testing/testing.go:1486 +0x47
Goroutine 7 (running) created at:
  go.opencensus.io/stats/view.init.0()
      /home/runner/go/pkg/mod/[email protected]/stats/view/worker.go:34 +0xf6
Goroutine 10 (finished) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.18.3/x64/src/testing/testing.go:1486 +0x724
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.18.3/x64/src/testing/testing.go:1839 +0x99
  testing.tRunner()
      /opt/hostedtoolcache/go/1.18.3/x64/src/testing/testing.go:1439 +0x213
  testing.runTests()
      /opt/hostedtoolcache/go/1.18.3/x64/src/testing/testing.go:1837 +0x7e4
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.18.3/x64/src/testing/testing.go:1719 +0xa71
  main.main()
      _testmain.go:47 +0x2e4
==================
Found 1 data race(s)
FAIL	google.golang.org/grpc/gcp/observability	0.281s

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions