state/apiserver: yet more data races

Bug #1336180 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

==================
WARNING: DATA RACE
Write by goroutine 84:
  github.com/juju/loggo.(*TestWriter).Write()
      /home/dfc/src/github.com/juju/loggo/testwriter.go:30 +0x2cf
  github.com/juju/loggo.writeToWriters()
      /home/dfc/src/github.com/juju/loggo/writer.go:129 +0x1f9
  github.com/juju/loggo.Logger.Logf()
      /home/dfc/src/github.com/juju/loggo/logger.go:362 +0x27c
  github.com/juju/loggo.Logger.Infof()
      /home/dfc/src/github.com/juju/loggo/logger.go:382 +0x6e
  github.com/juju/juju/rpc.(*Conn).Close()
      /home/dfc/src/github.com/juju/juju/rpc/server.go:334 +0x2c5
  github.com/juju/juju/state/apiserver.(*Server).serveConn()
      /home/dfc/src/github.com/juju/juju/state/apiserver/apiserver.go:342 +0x3fd
  github.com/juju/juju/state/apiserver.func·004()
      /home/dfc/src/github.com/juju/juju/state/apiserver/apiserver.go:262 +0x379
  code.google.com/p/go.net/websocket.Server.serveWebSocket()
      /home/dfc/src/code.google.com/p/go.net/websocket/server.go:90 +0x2d2
  code.google.com/p/go.net/websocket.Server.ServeHTTP()
      /home/dfc/src/code.google.com/p/go.net/websocket/server.go:70 +0x6b
  github.com/juju/juju/state/apiserver.(*Server).apiHandler()
      /home/dfc/src/github.com/juju/juju/state/apiserver/apiserver.go:267 +0x23e
  github.com/juju/juju/state/apiserver.*Server.(github.com/juju/juju/state/apiserver.apiHandler)·fm()
      /home/dfc/src/github.com/juju/juju/state/apiserver/apiserver.go:222 +0x51
  net/http.HandlerFunc.ServeHTTP()
      /home/dfc/go/src/pkg/net/http/server.go:1235 +0x4d
  github.com/bmizerany/pat.(*PatternServeMux).ServeHTTP()
      /home/dfc/src/github.com/bmizerany/pat/mux.go:109 +0x33a
  net/http.serverHandler.ServeHTTP()
      /home/dfc/go/src/pkg/net/http/server.go:1673 +0x1fc
  net/http.(*conn).serve()
      /home/dfc/go/src/pkg/net/http/server.go:1174 +0xf9e

Previous read by goroutine 47:
  github.com/juju/juju/state/apiserver_test.(*stateSuite).TestPing()
      /home/dfc/src/github.com/juju/juju/state/apiserver/pinger_test.go:67 +0x48f
  runtime.call16()
      /home/dfc/go/src/pkg/runtime/asm_amd64.s:363 +0x31
  reflect.Value.Call()
      /home/dfc/go/src/pkg/reflect/value.go:411 +0xed
  launchpad.net/gocheck.func·006()
      /home/dfc/src/launchpad.net/gocheck/gocheck.go:735 +0x51b

Tags: api fallout
Revision history for this message
Dave Cheney (dave-cheney) wrote :

The root of the race is a bug in loggo

There is a PR outstanding for this fix

https://github.com/juju/loggo/pull/2

Once loggo is fixed, all the loggo consumers have to update to this new version as it includes a free API breakage.

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1336180] Re: state/apiserver: yet more data races

I believe this is Fix Committed as of:
commit cf92b53ada25f954f7b3aada7e8f547427aa020b
Merge: 811f7d2 34e2f81
Author: Juju bot <email address hidden>
Date: Wed Jul 2 04:15:56 2014 +0100

    Merge pull request #212 from davecheney/121-update-loggo

    Update loggo to fix race condition accessing tw.Log directly.

On Tue, Jul 1, 2014 at 11:48 AM, Dave Cheney <email address hidden>
wrote:

> The root of the race is a bug in loggo
>
> There is a PR outstanding for this fix
>
> https://github.com/juju/loggo/pull/2
>
> Once loggo is fixed, all the loggo consumers have to update to this new
> version as it includes a free API breakage.
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> https://bugs.launchpad.net/bugs/1336180
>
> Title:
> state/apiserver: yet more data races
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1336180/+subscriptions
>

Changed in juju-core:
status: In Progress → Fix Committed
milestone: next-stable → 1.21-alpha1
Curtis Hovey (sinzui)
tags: added: api fallout
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.