-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
database/sql: rows.Next panic from concurrent map writes #27448
Comments
This looks like memory corruption. Have you tried running your program under the race detector? See https://blog.golang.org/race-detector . |
Also try running go vet over your program, I’m sure it will have something to say about a slice of sync.Map values |
|
go vet log:
|
resolved! so close it。 I found errors when use vet tool scan codes:
then ,I change copy to pointe,this problem disappear。
type mysqlOptions struct {
} |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.9.2 linux/amd64
Does this issue reproduce with the latest release?
i don't know
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN="/home/doctorq/go-dev/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/doctorq/go-dev"
GORACE=""
GOROOT="/home/doctorq/soft/sf-go"
GOTOOLDIR="/home/doctorq/soft/sf-go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build599015506=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
What did you do?
grpc server application
mysql:https://github.com/go-sql-driver/mysql
What did you expect to see?
no panic
What did you see instead?
The text was updated successfully, but these errors were encountered: