-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 1.0.0
-
Component/s: Options & Configuration
-
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