Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-328

Data race on memdopmap drain/add

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0
    • Component/s: None
    • Labels:
      None

      Description

      A previous pull request from the community (https://github.com/couchbase/gocbcore/pull/3) has highlighted a race that occurs when a node is destroyed during operations. This is quite reliably reproduced by running a large number of (sequential) KV ops and killing the node during the process. After ~55s the race occurs.

       

      ==================
      WARNING: DATA RACE
      Read at 0x00c4201d2300 by goroutine 12:
      {{ gopkg.in/couchbase/gocbcore%2ev7.(*memdOpMap).Add()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/memdopmap.go:52 +0x186}}
      {{ gopkg.in/couchbase/gocbcore%2ev7.(*memdClient).SendRequest()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/memdclient.go:98 +0x6b}}
      {{ gopkg.in/couchbase/gocbcore%2ev7.(*memdPipelineClient).ioLoop()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/memdpipelineclient.go:109 +0x306}}
      {{ gopkg.in/couchbase/gocbcore%2ev7.(*memdPipelineClient).Run()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/memdpipelineclient.go:155 +0x30b}}

      Previous write at 0x00c4201d2300 by goroutine 16:
      {{ gopkg.in/couchbase/gocbcore%2ev7.(*memdOpMap).Drain()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/memdopmap.go:139 +0x10f}}
      {{ gopkg.in/couchbase/gocbcore%2ev7.(*memdClient).run.func2()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/memdclient.go:285 +0x7ae}}

      Goroutine 12 (running) created at:
      {{ gopkg.in/couchbase/gocbcore%2ev7.(*memdPipeline).StartClients()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/memdpipeline.go:70 +0xa9}}
      {{ gopkg.in/couchbase/gocbcore%2ev7.(*memdClientMux).Start()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/memdclientmux.go:48 +0x7f}}
      {{ gopkg.in/couchbase/gocbcore%2ev7.(*Agent).applyConfig()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/agentrouting.go:250 +0x99e}}
      {{ gopkg.in/couchbase/gocbcore%2ev7.(*Agent).connect()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/agent.go:813 +0xb22}}
      {{ gopkg.in/couchbase/gocbcore%2ev7.createAgent()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/agent.go:639 +0xfa9}}
      {{ gopkg.in/couchbase/gocbcore%2ev7.CreateAgent()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/agent.go:514 +0xb0}}
      {{ gopkg.in/couchbase/gocb%2ev1.createBucket()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocb.v1/bucket.go:39 +0x3f}}
      {{ gopkg.in/couchbase/gocb%2ev1.(*Cluster).openBucket()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocb.v1/cluster.go:263 +0x295}}
      {{ gopkg.in/couchbase/gocb%2ev1.(*Cluster).OpenBucket()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocb.v1/cluster.go:277 +0x72}}
      {{ main.main()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/sandbox/main.go:86 +0x22c}}

      Goroutine 16 (finished) created at:
      {{ gopkg.in/couchbase/gocbcore%2ev7.(*memdClient).run()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/memdclient.go:226 +0x112}}
      {{ gopkg.in/couchbase/gocbcore%2ev7.newMemdClient()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/memdclient.go:48 +0x1ab}}
      {{ gopkg.in/couchbase/gocbcore%2ev7.(*Agent).dialMemdClient()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/agentrouting.go:43 +0x2ab}}
      {{ gopkg.in/couchbase/gocbcore%2ev7.(*Agent).slowDialMemdClient()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/agentrouting.go:166 +0x1c7}}
      {{ gopkg.in/couchbase/gocbcore%2ev7.(*Agent).(gopkg.in/couchbase/gocbcore%2ev7.slowDialMemdClient)-fm()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/agentrouting.go:221 +0x59}}
      {{ gopkg.in/couchbase/gocbcore%2ev7.newMemdClientMux.func1()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/memdclientmux.go:22 +0x52}}
      {{ gopkg.in/couchbase/gocbcore%2ev7.(*memdPipelineClient).Run()}}
      {{ /Users/charlesdixon/dev/go-workspace/src/gopkg.in/couchbase/gocbcore.v7/memdpipelineclient.go:148 +0x263}}

        Attachments

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

          Activity

          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-5.1.2-6014 contains gocbcore commit 956fb95 with commit message:
          GOCBC-328: Fix a data race on draining a client.

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-5.1.2-6014 contains gocbcore commit 956fb95 with commit message: GOCBC-328 : Fix a data race on draining a client.
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-6.0.0-1411 contains gocbcore commit 956fb95 with commit message:
          GOCBC-328: Fix a data race on draining a client.

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-6.0.0-1411 contains gocbcore commit 956fb95 with commit message: GOCBC-328 : Fix a data race on draining a client.
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-5.1.1-5904 contains gocbcore commit 956fb95 with commit message:
          GOCBC-328: Fix a data race on draining a client.

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-5.1.1-5904 contains gocbcore commit 956fb95 with commit message: GOCBC-328 : Fix a data race on draining a client.
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-6.5.0-1143 contains gocbcore commit 956fb95 with commit message:
          GOCBC-328: Fix a data race on draining a client.

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-1143 contains gocbcore commit 956fb95 with commit message: GOCBC-328 : Fix a data race on draining a client.
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-5.5.1-3505 contains gocbcore commit 956fb95 with commit message:
          GOCBC-328: Fix a data race on draining a client.

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-5.5.1-3505 contains gocbcore commit 956fb95 with commit message: GOCBC-328 : Fix a data race on draining a client.
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-5.5.2-3704 contains gocbcore commit 956fb95 with commit message:
          GOCBC-328: Fix a data race on draining a client.

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-5.5.2-3704 contains gocbcore commit 956fb95 with commit message: GOCBC-328 : Fix a data race on draining a client.
          Hide
          build-team Couchbase Build Team added a comment -

          Build sync_gateway-2.6.0-2 contains gocbcore commit 956fb95 with commit message:
          GOCBC-328: Fix a data race on draining a client.

          Show
          build-team Couchbase Build Team added a comment - Build sync_gateway-2.6.0-2 contains gocbcore commit 956fb95 with commit message: GOCBC-328 : Fix a data race on draining a client.
          Hide
          build-team Couchbase Build Team added a comment -

          Build sync_gateway-2.5.1-8 contains gocbcore commit 956fb95 with commit message:
          GOCBC-328: Fix a data race on draining a client.

          Show
          build-team Couchbase Build Team added a comment - Build sync_gateway-2.5.1-8 contains gocbcore commit 956fb95 with commit message: GOCBC-328 : Fix a data race on draining a client.

            People

            • Assignee:
              charles.dixon Charles Dixon
              Reporter:
              charles.dixon Charles Dixon
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.