Skip to content

testing: go -cover -race finds race in coverage code @ tip #8630

Description

@lavalamp
$ go version
go version devel +a1d74ad863fb Tue Sep 02 12:23:49 2014 -0700 linux/amd64

One sample race:

==================
WARNING: DATA RACE
Read by main goroutine:
  testing.coverReport()
      /home/travis/.gvm/gos/tip/src/pkg/testing/cover.go:89 +0x4f8
  testing.after()
      /home/travis/.gvm/gos/tip/src/pkg/testing/testing.go:596 +0x89d
  testing.Main()
      /home/travis/.gvm/gos/tip/src/pkg/testing/testing.go:450 +0x1e1
  main.main()
      github.com/GoogleCloudPlatform/kubernetes/pkg/proxy/config/_test/_testmain.go:117 +0x17a
Previous write by goroutine 11:
  sync/atomic.AddInt32()
      /home/travis/.gvm/gos/tip/src/pkg/runtime/race_amd64.s:255 +0xc
  github.com/GoogleCloudPlatform/kubernetes/pkg/proxy/config.handleServicesWatch()
      github.com/GoogleCloudPlatform/kubernetes/pkg/proxy/config/_test/_obj_test/api.go:93 +0x261
  github.com/GoogleCloudPlatform/kubernetes/pkg/proxy/config.(*SourceAPI).runServices()
      github.com/GoogleCloudPlatform/kubernetes/pkg/proxy/config/_test/_obj_test/api.go:71 +0x44b
  github.com/GoogleCloudPlatform/kubernetes/pkg/proxy/config.func·007()
      /home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/proxy/config/api_test.go:39 +0x5e
Goroutine 11 (running) created at:
  github.com/GoogleCloudPlatform/kubernetes/pkg/proxy/config.TestServices()
      /home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/proxy/config/api_test.go:40 +0x377
  testing.tRunner()
      /home/travis/.gvm/gos/tip/src/pkg/testing/testing.go:427 +0x112
==================

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions