Comment 0 for bug 1756685

John A Meinel (jameinel) wrote :

It seems if the test fails, then it sets the whole package into race issues:
http://10.125.0.203:8080/job/RunUnittests-race-amd64/194/testReport/junit/github/com_juju_juju_worker_caasunitprovisioner/TestPackage/

(its possible the race caused the failure, but it looks more like the failure triggers cleanup paths that race.)

FAIL: worker_test.go:716: WorkerSuite.TestRemoveUnitStopsWatchingContainerSpec

worker_test.go:738:
    c.Fatal("timed out sending units change")
... Error: timed out sending units change

worker_test.go:738:
    c.Fatal("timed out sending units change")
/workspace/src/github.com/juju/juju/worker/workertest/check.go:58:
    c.Errorf("timed out waiting for worker to stop")
... Error: timed out waiting for worker to stop

worker_test.go:738:
    c.Fatal("timed out sending units change")
/workspace/src/github.com/juju/juju/worker/workertest/check.go:83:
    c.Check(err, jc.ErrorIsNil)
... value *errors.Err = &errors.Err{message:"workertest: worker not stopping", cause:error(nil), previous:error(nil), file:"github.com/juju/juju/worker/workertest/check.go", line:59} ("workertest: worker not stopping")
... error stack:
 github.com/juju/juju/worker/workertest/check.go:59: workertest: worker not stopping

==================
WARNING: DATA RACE
Write at 0x00c420110af8 by goroutine 138:
  github.com/juju/juju/worker/caasunitprovisioner_test.(*WorkerSuite).SetUpTest()
      /workspace/src/github.com/juju/juju/worker/caasunitprovisioner/worker_test.go:113 +0x94f
  runtime.call32()
      /snap/go/1473/src/runtime/asm_amd64.s:573 +0x3a
  reflect.Value.Call()
      /snap/go/1473/src/reflect/value.go:308 +0xc0
  gopkg.in/check%2ev1.(*suiteRunner).runFixture.func1()
      /workspace/src/gopkg.in/check.v1/check.go:721 +0x177
  gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1()
      /workspace/src/gopkg.in/check.v1/check.go:666 +0x89

Previous write at 0x00c420110af8 by goroutine 140:
  sync/atomic.AddInt32()
      /snap/go/1473/src/runtime/race_amd64.s:269 +0xb
  sync.(*Mutex).Unlock()
      /snap/go/1473/src/sync/mutex.go:182 +0x54
  github.com/juju/testing.(*Stub).addCall()
      /workspace/src/github.com/juju/testing/stub.go:145 +0x2bc
  github.com/juju/testing.(*Stub).MethodCall()
      /workspace/src/github.com/juju/testing/stub.go:174 +0x88
  github.com/juju/juju/worker/caasunitprovisioner_test.(*mockContainerBroker).DeleteUnit()
      /workspace/src/github.com/juju/juju/worker/caasunitprovisioner/mock_test.go:95 +0x113
  github.com/juju/juju/worker/caasunitprovisioner.(*applicationWorker).loop()
      /workspace/src/github.com/juju/juju/worker/caasunitprovisioner/application_worker.go:225 +0xbdf
  github.com/juju/juju/worker/caasunitprovisioner.(*applicationWorker).(github.com/juju/juju/worker/caasunitprovisioner.loop)-fm()
      /workspace/src/github.com/juju/juju/worker/caasunitprovisioner/application_worker.go:68 +0x41
  github.com/juju/juju/worker/catacomb.runSafely()
      /workspace/src/github.com/juju/juju/worker/catacomb/catacomb.go:289 +0x66
  github.com/juju/juju/worker/catacomb.Invoke.func3()
      /workspace/src/github.com/juju/juju/worker/catacomb/catacomb.go:116 +0x8e

Goroutine 138 (running) created at:
  gopkg.in/check%2ev1.(*suiteRunner).forkCall()
      /workspace/src/gopkg.in/check.v1/check.go:663 +0x419
  gopkg.in/check%2ev1.(*suiteRunner).runFunc()
      /workspace/src/gopkg.in/check.v1/check.go:673 +0x7e
  gopkg.in/check%2ev1.(*suiteRunner).runFixture()
      /workspace/src/gopkg.in/check.v1/check.go:717 +0x7e
  gopkg.in/check%2ev1.(*suiteRunner).runFixtureWithPanic()
      /workspace/src/gopkg.in/check.v1/check.go:735 +0xa7
  gopkg.in/check%2ev1.(*suiteRunner).forkTest.func1()
      /workspace/src/gopkg.in/check.v1/check.go:760 +0x207
  gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1()
      /workspace/src/gopkg.in/check.v1/check.go:666 +0x89

Goroutine 140 (running) created at:
  github.com/juju/juju/worker/catacomb.Invoke()
      /workspace/src/github.com/juju/juju/worker/catacomb/catacomb.go:113 +0x273
  github.com/juju/juju/worker/caasunitprovisioner.newApplicationWorker()
      /workspace/src/github.com/juju/juju/worker/caasunitprovisioner/application_worker.go:66 +0x46d
  github.com/juju/juju/worker/caasunitprovisioner.(*provisioner).loop()
      /workspace/src/github.com/juju/juju/worker/caasunitprovisioner/worker.go:148 +0x61c
  github.com/juju/juju/worker/caasunitprovisioner.(*provisioner).(github.com/juju/juju/worker/caasunitprovisioner.loop)-fm()
      /workspace/src/github.com/juju/juju/worker/caasunitprovisioner/worker.go:68 +0x41
  github.com/juju/juju/worker/catacomb.runSafely()
      /workspace/src/github.com/juju/juju/worker/catacomb/catacomb.go:289 +0x66
  github.com/juju/juju/worker/catacomb.Invoke.func3()
      /workspace/src/github.com/juju/juju/worker/catacomb/catacomb.go:116 +0x8e
==================