api: data race in test

Bug #1465115 reported by Dave Cheney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Medium
Dave Cheney
1.24
Fix Released
Medium
Menno Finlay-Smits

Bug Description

WARNING: DATA RACE
Read by goroutine 55:
  sync.raceRead()
      /home/dfc/go/src/sync/race.go:37 +0x2e
  sync.(*WaitGroup).Add()
      /home/dfc/go/src/sync/waitgroup.go:63 +0xc5
  github.com/juju/juju/apiserver.(*Server).apiHandler.func1()
      /home/dfc/src/github.com/juju/juju/apiserver/apiserver.go:410 +0x81
  golang.org/x/net/websocket.Server.serveWebSocket()
      /home/dfc/src/golang.org/x/net/websocket/server.go:90 +0x323
  golang.org/x/net/websocket.Server.ServeHTTP()
      /home/dfc/src/golang.org/x/net/websocket/server.go:70 +0x59
  github.com/juju/juju/apiserver.(*Server).apiHandler()
      /home/dfc/src/github.com/juju/juju/apiserver/apiserver.go:426 +0x1b1
  github.com/juju/juju/apiserver.(*Server).(github.com/juju/juju/apiserver.apiHandler)-fm()
      /home/dfc/src/github.com/juju/juju/apiserver/apiserver.go:372 +0x4b
  net/http.HandlerFunc.ServeHTTP()
      /home/dfc/go/src/net/http/server.go:1320 +0x47
  github.com/bmizerany/pat.(*PatternServeMux).ServeHTTP()
      /home/dfc/src/github.com/bmizerany/pat/mux.go:109 +0x372
  net/http.serverHandler.ServeHTTP()
      /home/dfc/go/src/net/http/server.go:1759 +0x206
  net/http.(*conn).serve()
      /home/dfc/go/src/net/http/server.go:1259 +0x1178

Previous write by goroutine 21:
  sync.raceWrite()
      /home/dfc/go/src/sync/race.go:41 +0x2e
  sync.(*WaitGroup).Wait()
      /home/dfc/go/src/sync/waitgroup.go:125 +0x174
  github.com/juju/juju/apiserver.(*Server).run()
      /home/dfc/src/github.com/juju/juju/apiserver/apiserver.go:402 +0xed8

Goroutine 55 (running) created at:
  net/http.(*Server).Serve()
      /home/dfc/go/src/net/http/server.go:1807 +0x464
  net/http.Serve()
      /home/dfc/go/src/net/http/server.go:1662 +0xc5
  github.com/juju/juju/apiserver.(*Server).run()
      /home/dfc/src/github.com/juju/juju/apiserver/apiserver.go:401 +0xed7

Goroutine 21 (finished) created at:
  github.com/juju/juju/apiserver.NewServer()
      /home/dfc/src/github.com/juju/juju/apiserver/apiserver.go:206 +0xa59
  github.com/juju/juju/provider/dummy.(*environ).Bootstrap()
      /home/dfc/src/github.com/juju/juju/provider/dummy/environs.go:747 +0x1d19
  github.com/juju/juju/environs/bootstrap.Bootstrap()
      /home/dfc/src/github.com/juju/juju/environs/bootstrap/bootstrap.go:130 +0x14d7
  github.com/juju/juju/juju/testing.(*JujuConnSuite).setUpConn()
      /home/dfc/src/github.com/juju/juju/juju/testing/conn.go:253 +0x1809
  github.com/juju/juju/juju/testing.(*JujuConnSuite).SetUpTest()
      /home/dfc/src/github.com/juju/juju/juju/testing/conn.go:105 +0x22f
  github.com/juju/juju/api_test.(*apiclientSuite).SetUpTest()
      <autogenerated>:18 +0x55
  runtime.call32()
      /home/dfc/go/src/runtime/asm_amd64.s:437 +0x3d
  reflect.Value.Call()
      /home/dfc/go/src/reflect/value.go:300 +0xcd
  gopkg.in/check%2ev1.(*suiteRunner).runFixture.func1()
      /home/dfc/src/gopkg.in/check.v1/check.go:712 +0x1b8
  gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1()
      /home/dfc/src/gopkg.in/check.v1/check.go:657 +0x80
==================
OK: 63 passed
PASS
Found 1 data race(s)
FAIL github.com/juju/juju/api 33.736s

Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
tags: added: intermittent-failure race-condition unit-tests
Changed in juju-core:
importance: Undecided → High
importance: High → Medium
Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Dave Cheney (dave-cheney)
Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :
Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :
Changed in juju-core:
status: In Progress → Fix Committed
milestone: none → 1.25.0
Curtis Hovey (sinzui)
Changed in juju-core:
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.