Race in github.com/juju/juju/cmd/testing.RunCommand

Bug #1640192 reported by Curtis Hovey on 2016-11-08
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju
Medium
Unassigned

Bug Description

As seen in
    http://reports.vapour.ws/releases/issue/5821e23d749a5655ca9533e9

There is a race involving testing.RunCommmand(). We captured two different races involving testing.RunCommmand().

Curtis Hovey (sinzui) wrote :
Download full text (3.6 KiB)

==================
WARNING: DATA RACE
Read by goroutine 71:
  github.com/juju/juju/provider/dummy.(*environProvider).CredentialSchemas()
      <autogenerated>:3 +0xa2
  github.com/juju/juju/cmd/juju/commands.(*bootstrapCommand).cloud()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/juju/commands/bootstrap.go:645 +0xc23
  github.com/juju/juju/cmd/juju/commands.(*bootstrapCommand).Run()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/juju/commands/bootstrap.go:336 +0x252
  github.com/juju/juju/cmd/juju/commands.(*bootstrapCommandWrapper).Run()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/juju/commands/bootstrap_test.go:137 +0x95
  github.com/juju/juju/cmd/modelcmd.(*modelCommandWrapper).Run()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/modelcmd/modelcommand.go:282 +0x6e
  github.com/juju/juju/cmd/modelcmd.(*baseCommandWrapper).Run()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/modelcmd/base.go:325 +0x10b
  github.com/juju/juju/cmd/testing.RunCommand.func1()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/testing/testing.go:86 +0x12c

Previous write by goroutine 169:
  sync/atomic.AddInt32()
      /usr/lib/go-1.6/src/runtime/race_amd64.s:255 +0xb
  sync.(*Mutex).Unlock()
      /usr/lib/go-1.6/src/sync/mutex.go:107 +0x55
  github.com/juju/juju/provider/dummy.Listen()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/provider/dummy/environs.go:467 +0x1ee
  github.com/juju/juju/cmd/testing.RunCommand.func1.1()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/testing/testing.go:74 +0x2d
  github.com/juju/juju/cmd/testing.RunCommand.func1()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/testing/testing.go:87 +0x17c

Goroutine 71 (running) created at:
  github.com/juju/juju/cmd/testing.RunCommand()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/testing/testing.go:87 +0x21f
  github.com/juju/juju/cmd/juju/commands.(*BootstrapSuite).run()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/juju/commands/bootstrap_test.go:228 +0xb54
  github.com/juju/juju/cmd/juju/commands.(*BootstrapSuite).TestRunTests()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/juju/commands/bootstrap_test.go:155 +0x2e0
  runtime.call32()
      /usr/lib/go-1.6/src/runtime/asm_amd64.s:472 +0x3d
  reflect.Value.Call()
      /usr/lib/go-1.6/src/reflect/value.go:303 +0xcd
  gopkg.in/check%2ev1.(*suiteRunner).forkTest.func1()
      /home/ubuntu/juju-core_2.0.2/src/gopkg.in/check.v1/check.go:772 +0x5d1
  gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1()
      /home/ubuntu/juju-core_2.0.2/src/gopkg.in/check.v1/check.go:666 +0x80

Goroutine 169 (finished) created at:
  github.com/juju/juju/cmd/testing.RunCommand()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/testing/testing.go:87 +0x21f
  github.com/juju/juju/cmd/juju/commands.(*BootstrapSuite).run()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/juju/commands/bootstrap_test.go:228 +0xb54
  github.com/juju/juju/cmd/juju/commands.(*BootstrapSuite).TestRunTests()
      /home/ubuntu/juju-core_2.0.2/src/github.com...

Read more...

Curtis Hovey (sinzui) wrote :
Download full text (3.4 KiB)

==================
WARNING: DATA RACE
Read by goroutine 71:
  github.com/juju/juju/provider/dummy.(*environProvider).CredentialSchemas()
      <autogenerated>:3 +0xa2
  github.com/juju/juju/cmd/juju/commands.(*bootstrapCommand).cloud()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/juju/commands/bootstrap.go:645 +0xc23
  github.com/juju/juju/cmd/juju/commands.(*bootstrapCommand).Run()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/juju/commands/bootstrap.go:336 +0x252
  github.com/juju/juju/cmd/juju/commands.(*bootstrapCommandWrapper).Run()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/juju/commands/bootstrap_test.go:137 +0x95
  github.com/juju/juju/cmd/modelcmd.(*modelCommandWrapper).Run()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/modelcmd/modelcommand.go:282 +0x6e
  github.com/juju/juju/cmd/modelcmd.(*baseCommandWrapper).Run()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/modelcmd/base.go:325 +0x10b
  github.com/juju/juju/cmd/testing.RunCommand.func1()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/testing/testing.go:86 +0x12c

Previous write by goroutine 169:
  github.com/juju/juju/provider/dummy.Listen()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/provider/dummy/environs.go:461 +0xaf
  github.com/juju/juju/cmd/testing.RunCommand.func1.1()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/testing/testing.go:74 +0x2d
  github.com/juju/juju/cmd/testing.RunCommand.func1()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/testing/testing.go:87 +0x17c

Goroutine 71 (running) created at:
  github.com/juju/juju/cmd/testing.RunCommand()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/testing/testing.go:87 +0x21f
  github.com/juju/juju/cmd/juju/commands.(*BootstrapSuite).run()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/juju/commands/bootstrap_test.go:228 +0xb54
  github.com/juju/juju/cmd/juju/commands.(*BootstrapSuite).TestRunTests()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/juju/commands/bootstrap_test.go:155 +0x2e0
  runtime.call32()
      /usr/lib/go-1.6/src/runtime/asm_amd64.s:472 +0x3d
  reflect.Value.Call()
      /usr/lib/go-1.6/src/reflect/value.go:303 +0xcd
  gopkg.in/check%2ev1.(*suiteRunner).forkTest.func1()
      /home/ubuntu/juju-core_2.0.2/src/gopkg.in/check.v1/check.go:772 +0x5d1
  gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1()
      /home/ubuntu/juju-core_2.0.2/src/gopkg.in/check.v1/check.go:666 +0x80

Goroutine 169 (finished) created at:
  github.com/juju/juju/cmd/testing.RunCommand()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/testing/testing.go:87 +0x21f
  github.com/juju/juju/cmd/juju/commands.(*BootstrapSuite).run()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/juju/commands/bootstrap_test.go:228 +0xb54
  github.com/juju/juju/cmd/juju/commands.(*BootstrapSuite).TestRunTests()
      /home/ubuntu/juju-core_2.0.2/src/github.com/juju/juju/cmd/juju/commands/bootstrap_test.go:155 +0x2e0
  runtime.call32()
      /usr/lib/go-1.6/src/runtime/asm_amd64.s:472 +0x3d
  reflect.Value.Call()
 ...

Read more...

Curtis Hovey (sinzui) on 2017-02-23
Changed in juju:
importance: High → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers