Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-901

Race detector flagged race

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.1
    • Affects Version/s: 1.0.0
    • None
    • Environment:
      archlinux 5.0.x kernel, Go 1.12

      Race condition flagged by race detector.  I believed the mongo connection was safe for concurrent use.

       

      WARNING: DATA RACE
      Write at 0x00c000021080 by goroutine 537:
      vendor/go.mongodb.org/mongo-driver/x/network/command.(*Handshake).Decode()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/x/network/command/handshake.go:5$
      vendor/go.mongodb.org/mongo-driver/x/network/command.(*Handshake).Handshake()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/x/network/command/handshake.go:9$
      vendor/go.mongodb.org/mongo-driver/x/network/connection.New()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/x/network/connection/connection.$
      vendor/go.mongodb.org/mongo-driver/x/network/connection.(*pool).get()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/x/network/connection/pool.go:180$
      vendor/go.mongodb.org/mongo-driver/x/network/connection.(*pool).Get()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/x/network/connection/pool.go:163$
      vendor/go.mongodb.org/mongo-driver/x/mongo/driver/topology.(*Server).Connection()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/x/mongo/driver/topology/server.g$
      vendor/go.mongodb.org/mongo-driver/x/mongo/driver.Find()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/x/mongo/driver/find.go:49 +0x3a0
      vendor/go.mongodb.org/mongo-driver/mongo.(*Collection).Find()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/mongo/collection.go:930 +0x56c

       

      Previous write at 0x00c000021080 by goroutine 1285:
      vendor/go.mongodb.org/mongo-driver/x/network/command.(*Handshake).Decode()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/x/network/command/handshake.go:5$
      vendor/go.mongodb.org/mongo-driver/x/network/command.(*Handshake).Handshake()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/x/network/command/handshake.go:9$
      vendor/go.mongodb.org/mongo-driver/x/network/connection.New()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/x/network/connection/connection.$
      vendor/go.mongodb.org/mongo-driver/x/network/connection.(*pool).get()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/x/network/connection/pool.go:180$
      vendor/go.mongodb.org/mongo-driver/x/network/connection.(*pool).Get()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/x/network/connection/pool.go:163$
      vendor/go.mongodb.org/mongo-driver/x/mongo/driver/topology.(*Server).Connection()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/x/mongo/driver/topology/server.g$
      vendor/go.mongodb.org/mongo-driver/x/mongo/driver.(*BatchCursor).Close()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/x/mongo/driver/batch_cursor.go:1$
      vendor/go.mongodb.org/mongo-driver/mongo.(*Cursor).Close()
      /data/datatools/src/vendor/go.mongodb.org/mongo-driver/mongo/cursor.go:130 +0x6d

            Assignee:
            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            Reporter:
            mzimmerman Matt Zimmerman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: