apiserver: data race in machinePinger.Stop

Bug #1500283 reported by Dave Cheney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Critical
Dave Cheney

Bug Description

lucky(~/src/github.com/juju/juju/apiserver) % go test -race
==================
WARNING: DATA RACE
Write by goroutine 145:
  github.com/juju/juju/apiserver.(*Server).run.func2()
      /home/dfc/src/github.com/juju/juju/apiserver/apiserver.go:318 +0x5c

Previous read by goroutine 160:
  github.com/juju/juju/apiserver.(*machinePinger).Stop()
      /home/dfc/src/github.com/juju/juju/apiserver/admin.go:322 +0xa2
  github.com/juju/juju/apiserver/common.(*Resources).StopAll()
      /home/dfc/src/github.com/juju/juju/apiserver/common/resource.go:118 +0x383
  github.com/juju/juju/apiserver.(*apiRoot).Kill()
      /home/dfc/src/github.com/juju/juju/apiserver/root.go:148 +0x45
  github.com/juju/juju/rpc.(*Conn).killRequests()
      /home/dfc/src/github.com/juju/juju/rpc/server.go:343 +0xa9
  github.com/juju/juju/rpc.(*Conn).Close()
      /home/dfc/src/github.com/juju/juju/rpc/server.go:319 +0xf8
  github.com/juju/juju/apiserver.(*Server).serveConn()
      /home/dfc/src/github.com/juju/juju/apiserver/apiserver.go:468 +0x650
  github.com/juju/juju/apiserver.(*Server).apiHandler.func1()
      /home/dfc/src/github.com/juju/juju/apiserver/apiserver.go:423 +0x353
  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 +0x5b
  github.com/juju/juju/apiserver.(*Server).apiHandler()
      /home/dfc/src/github.com/juju/juju/apiserver/apiserver.go:428 +0x1b8
  github.com/juju/juju/apiserver.(*Server).(github.com/juju/juju/apiserver.apiHandler)-fm()
      /home/dfc/src/github.com/juju/juju/apiserver/apiserver.go:365 +0x4b
  net/http.HandlerFunc.ServeHTTP()
      /home/dfc/go/src/net/http/server.go:1433 +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:1873 +0x206
  net/http.(*conn).serve()
      /home/dfc/go/src/net/http/server.go:1372 +0x117e

Goroutine 145 (running) created at:
  github.com/juju/juju/apiserver.(*Server).run()
      /home/dfc/src/github.com/juju/juju/apiserver/apiserver.go:321 +0xac

Goroutine 160 (running) created at:
  net/http.(*Server).Serve()
      /home/dfc/go/src/net/http/server.go:1923 +0x455
  net/http.Serve()
      /home/dfc/go/src/net/http/server.go:1776 +0xca
  github.com/juju/juju/apiserver.(*Server).run.func3()
      /home/dfc/src/github.com/juju/juju/apiserver/apiserver.go:399 +0x6d
==================

Changed in juju-core:
importance: Undecided → Critical
assignee: nobody → Dave Cheney (dave-cheney)
status: New → In Progress
Changed in juju-core:
status: In Progress → Fix Committed
milestone: none → 1.26-alpha1
Curtis Hovey (sinzui)
tags: added: race-condition
Curtis Hovey (sinzui)
tags: added: tech-debt
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.