You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bulk Upsert (and maybe other Bulk operations) panic with invalid memory address or nil pointer dereference when you set session to operate in unsafe mode (session.SetSafe(nil)) AND you try to bulk-run more than 1000 operations so you trigger a split.
What version of MongoDB are you using (mongod --version)?
db version v2.6.12
What version of Go are you using (go version)?
go version go1.12.6 windows/amd64
What operating system and processor architecture are you using (go env)?
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Azeroc\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\Azeroc\go
set GOPROXY=
set GORACE=
set GOROOT=c:\go
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\Azeroc\go_projects\...\mgo_dev\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\Azeroc\AppData\Local\Temp\go-build162542790=/tmp/go-build -gno-record-gcc-switches
What did you do?
See the start of the post.
Can you reproduce the issue on the latest development branch?
Yes
The text was updated successfully, but these errors were encountered:
Bulk Upsert (and maybe other Bulk operations) panic with invalid memory address or nil pointer dereference when you set session to operate in unsafe mode (session.SetSafe(nil)) AND you try to bulk-run more than 1000 operations so you trigger a split.
The source of nil panic is in writeOp, where oplerr is nil:
https://github.com/globalsign/mgo/blob/development/session.go#L5522
But the source of the actual problem is at the end of writeOpCommand, returning nil,nil when Safe mode is off:
https://github.com/globalsign/mgo/blob/development/session.go#L5728
Sample code to reproduce the issue (I am using a replica set):
What version of MongoDB are you using (
mongod --version
)?What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
See the start of the post.
Can you reproduce the issue on the latest
development
branch?Yes
The text was updated successfully, but these errors were encountered: