api: data race adding local charm.

Bug #1563117 reported by Dave Cheney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Unassigned

Bug Description

==================
WARNING: DATA RACE
Read by goroutine 196:
  os.(*File).read()
      /home/dfc/go/src/os/file_unix.go:228 +0x46
  os.(*File).Read()
      /home/dfc/go/src/os/file.go:95 +0x5c
  gopkg.in/macaroon-bakery.v1/httpbakery.(*readStopper).Read()
      /home/dfc/src/gopkg.in/macaroon-bakery.v1/httpbakery/client.go:408 +0xe7
  io.(*multiReader).Read()
      /home/dfc/go/src/io/multi.go:13 +0xbb
  io.copyBuffer()
      /home/dfc/go/src/io/io.go:380 +0x147
  io.Copy()
      /home/dfc/go/src/io/io.go:350 +0x71
  net/http.(*transferWriter).WriteBody()
      /home/dfc/go/src/net/http/transfer.go:218 +0x674
  net/http.(*Request).write()
      /home/dfc/go/src/net/http/request.go:497 +0x7bf
  net/http.(*persistConn).writeLoop()
      /home/dfc/go/src/net/http/transport.go:1281 +0x32b

Previous write by goroutine 38:
  os.(*file).close()
      /home/dfc/go/src/os/file_unix.go:143 +0x119
  os.(*File).Close()
      /home/dfc/go/src/os/file_unix.go:132 +0x4b
  github.com/juju/juju/api.(*Client).AddLocalCharm()
      /home/dfc/src/github.com/juju/juju/api/client.go:338 +0x6bf
  github.com/juju/juju/api_test.(*clientSuite).TestAddLocalCharmError()
      /home/dfc/src/github.com/juju/juju/api/client_test.go:170 +0x3c2
  runtime.call32()
      /home/dfc/go/src/runtime/asm_amd64.s:472 +0x3d
  reflect.Value.Call()
      /home/dfc/go/src/reflect/value.go:302 +0xb3
  gopkg.in/check%2ev1.(*suiteRunner).forkTest.func1()
      /home/dfc/src/gopkg.in/check.v1/check.go:772 +0xafa
  gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1()
      /home/dfc/src/gopkg.in/check.v1/check.go:666 +0x82

Goroutine 196 (running) created at:
  net/http.(*Transport).dialConn()
      /home/dfc/go/src/net/http/transport.go:856 +0xaa9
  net/http.(*Transport).getConn.func4()
      /home/dfc/go/src/net/http/transport.go:704 +0x4e

Goroutine 38 (running) created at:
  gopkg.in/check%2ev1.(*suiteRunner).forkCall()
      /home/dfc/src/gopkg.in/check.v1/check.go:667 +0x439
  gopkg.in/check%2ev1.(*suiteRunner).forkTest()
      /home/dfc/src/gopkg.in/check.v1/check.go:804 +0x121
  gopkg.in/check%2ev1.(*suiteRunner).runTest()
      /home/dfc/src/gopkg.in/check.v1/check.go:809 +0x38
  gopkg.in/check%2ev1.(*suiteRunner).run()
      /home/dfc/src/gopkg.in/check.v1/check.go:615 +0x1bc
  gopkg.in/check%2ev1.Run()
      /home/dfc/src/gopkg.in/check.v1/run.go:92 +0x50
  gopkg.in/check%2ev1.RunAll()
      /home/dfc/src/gopkg.in/check.v1/run.go:84 +0x123
  gopkg.in/check%2ev1.TestingT()
      /home/dfc/src/gopkg.in/check.v1/run.go:72 +0x7b4
  github.com/juju/testing.MgoTestPackage()
      /home/dfc/src/github.com/juju/testing/mgo.go:356 +0xb1
  github.com/juju/juju/testing.MgoTestPackage()
      /home/dfc/src/github.com/juju/juju/testing/mgo.go:15 +0x4d
  github.com/juju/juju/api_test.TestAll()
      /home/dfc/src/github.com/juju/juju/api/state_test.go:22 +0x2e
  testing.tRunner()
      /home/dfc/go/src/testing/testing.go:547 +0xbf
==================
OK: 72 passed, 1 skipped
PASS
Found 1 data race(s)
FAIL github.com/juju/juju/api 45.139s

Changed in juju-core:
status: New → Triaged
Changed in juju-core:
importance: Undecided → Medium
Curtis Hovey (sinzui)
tags: added: race-condition unit-tests
affects: juju-core → juju
Revision history for this message
Anastasia (anastasia-macmood) wrote :

This is an old report. We have not seen this failure in a while and I am not able to reproduce it locally under stress. There has been a lot work in the area since the original report was filed.

 I'll close the report. Any re-occurrence needs to be a treated as a separate failure and reported anew.

Changed in juju:
status: Triaged → 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.