Race in github.com/juju/juju/api/state.go

Bug #1614732 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Reed O'Brien

Bug Description

As seen in
    http://reports.vapour.ws/releases/issue/572c9149749a5664afc0c132

There is a race in github.com/juju/juju/api/state between several functions. A recent example shows api/state involved

==================
WARNING: DATA RACE
Write by goroutine 122:
  github.com/juju/juju/api.(*state).setLoginResult()
      /home/ubuntu/juju-core_2.0-beta16/src/github.com/juju/juju/api/state.go:176 +0x7bd
  github.com/juju/juju/api.(*state).loginForVersion()
      /home/ubuntu/juju-core_2.0-beta16/src/github.com/juju/juju/api/state.go:128 +0x130b
  github.com/juju/juju/api.(*state).loginV3()
      /home/ubuntu/juju-core_2.0-beta16/src/github.com/juju/juju/api/state.go:46 +0xc5
  github.com/juju/juju/api.(*state).Login()
      /home/ubuntu/juju-core_2.0-beta16/src/github.com/juju/juju/api/state.go:36 +0xc2
  github.com/juju/juju/apiserver_test.(*loginSuite).TestOtherEnvironmentFromControllerOtherNotProvisioned()
      /home/ubuntu/juju-core_2.0-beta16/src/github.com/juju/juju/apiserver/admin_test.go:800 +0x68a
  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-beta16/src/gopkg.in/check.v1/check.go:772 +0x5d1
  gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1()
      /home/ubuntu/juju-core_2.0-beta16/src/gopkg.in/check.v1/check.go:666 +0x80

Previous read by goroutine 280:
  github.com/juju/juju/api.(*state).BestFacadeVersion()
      /home/ubuntu/juju-core_2.0-beta16/src/github.com/juju/juju/api/apiclient.go:696 +0xd2
  github.com/juju/juju/api.(*state).Ping()
      /home/ubuntu/juju-core_2.0-beta16/src/github.com/juju/juju/api/apiclient.go:592 +0x62
  github.com/juju/juju/api.(*state).Ping-fm()
      /home/ubuntu/juju-core_2.0-beta16/src/github.com/juju/juju/api/apiclient.go:580 +0x3b
  github.com/juju/juju/api.callWithTimeout.func1()
      /home/ubuntu/juju-core_2.0-beta16/src/github.com/juju/juju/api/apiclient.go:564 +0x2a

A similar bug is https://bugs.launchpad.net/juju-core/+bug/1579057 that was fixed in May

Curtis Hovey (sinzui)
description: updated
Changed in juju-core:
assignee: nobody → Reed O'Brien (reedobrien)
Changed in juju-core:
status: Triaged → In Progress
Changed in juju-core:
status: In Progress → Fix Committed
affects: juju-core → juju
Changed in juju:
milestone: 2.0-beta16 → none
milestone: none → 2.0-beta16
Curtis Hovey (sinzui)
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.