Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-19593

Data race in go-couchbase + query 11

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 4.6.0, 5.0.0
    • 4.5.0
    • query
    • None
    • Untriaged
    • Unknown

    Description

      go test -race ./...

      WARNING: DATA RACE
      Write by goroutine 159:
      runtime.closechan()
      /usr/local/go/src/runtime/chan.go:257 +0x0
      github.com/couchbase/go-couchbase.(*connectionPool).Close()
      /Users/gerald/workspace/master/src/github.com/couchbase/go-couchbase/conn_pool.go:106 +0xd3
      github.com/couchbase/go-couchbase.(*Bucket).Close()
      /Users/gerald/workspace/master/src/github.com/couchbase/go-couchbase/pools.go:903 +0x133
      github.com/couchbase/query/datastore/couchbase.(*keyspace).Count()
      /Users/gerald/workspace/master/src/github.com/couchbase/query/datastore/couchbase/couchbase.go:651 +0x42f
      github.com/couchbase/query/execution.(*PrimaryScan).newIndexConnection()
      /Users/gerald/workspace/master/src/github.com/couchbase/query/execution/scan_primary.go:212 +0xc9
      github.com/couchbase/query/execution.(*PrimaryScan).scanPrimary()
      /Users/gerald/workspace/master/src/github.com/couchbase/query/execution/scan_primary.go:58 +0x53
      github.com/couchbase/query/execution.func·036()
      /Users/gerald/workspace/master/src/github.com/couchbase/query/execution/scan_primary.go:53 +0x172
      sync.(*Once).Do()
      /usr/local/go/src/sync/once.go:44 +0xe6
      github.com/couchbase/query/execution.(*PrimaryScan).RunOnce()
      /Users/gerald/workspace/master/src/github.com/couchbase/query/execution/scan_primary.go:54 +0xbc

      Previous read by goroutine 167:
      runtime.chansend()
      /usr/local/go/src/runtime/chan.go:83 +0x0
      github.com/couchbase/go-couchbase.(*connectionPool).Return()
      /Users/gerald/workspace/master/src/github.com/couchbase/go-couchbase/conn_pool.go:202 +0x164
      github.com/couchbase/go-couchbase.getStatsParallel()
      /Users/gerald/workspace/master/src/github.com/couchbase/go-couchbase/client.go:150 +0x23f

      Goroutine 159 (running) created at:
      github.com/couchbase/query/execution.func·004()
      /Users/gerald/workspace/master/src/github.com/couchbase/query/execution/base.go:165 +0x337
      sync.(*Once).Do()
      /usr/local/go/src/sync/once.go:44 +0xe6
      github.com/couchbase/query/execution.(*base).runConsumer()
      /Users/gerald/workspace/master/src/github.com/couchbase/query/execution/base.go:193 +0xd8
      github.com/couchbase/query/execution.(*Fetch).RunOnce()
      /Users/gerald/workspace/master/src/github.com/couchbase/query/execution/fetch.go:50 +0xa2

      Goroutine 167 (finished) created at:
      github.com/couchbase/go-couchbase.(*Bucket).GatherStats()
      /Users/gerald/workspace/master/src/github.com/couchbase/go-couchbase/client.go:175 +0x1b7
      github.com/couchbase/go-couchbase.(*Bucket).GetStats()
      /Users/gerald/workspace/master/src/github.com/couchbase/go-couchbase/client.go:157 +0x8c
      github.com/couchbase/query/datastore/couchbase.(*keyspace).Count()
      /Users/gerald/workspace/master/src/github.com/couchbase/query/datastore/couchbase/couchbase.go:637 +0x296
      github.com/couchbase/query/execution.(*PrimaryScan).newIndexConnection()
      /Users/gerald/workspace/master/src/github.com/couchbase/query/execution/scan_primary.go:212 +0xc9
      github.com/couchbase/query/execution.(*PrimaryScan).scanPrimary()
      /Users/gerald/workspace/master/src/github.com/couchbase/query/execution/scan_primary.go:58 +0x53
      github.com/couchbase/query/execution.func·036()
      /Users/gerald/workspace/master/src/github.com/couchbase/query/execution/scan_primary.go:53 +0x172
      sync.(*Once).Do()
      /usr/local/go/src/sync/once.go:44 +0xe6
      github.com/couchbase/query/execution.(*PrimaryScan).RunOnce()
      /Users/gerald/workspace/master/src/github.com/couchbase/query/execution/scan_primary.go:54 +0xbc

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            johan.larson Johan Larson (Inactive)
            gerald Gerald Sangudi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty