Printf "database/sql" got panic under high qps pressure. #27507
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Please answer these questions before submitting your issue. Thanks!
The following package is not thread safe: "database/sql"
What version of Go are you using (
go version
)?go version go1.7 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/data/home/markgyang/project/video-content-platform/spcdp_cp"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build491876654=/tmp/go-build"
CXX="g++"
CGO_ENABLED="1"
What did you do?
I imported this package "database/sql", and got a object: db *sql.DB
Then I initialized it and printed it: fmt.Printf("%v", db)
What did you expect to see?
Print db structure as usual.
What did you see instead?
It printed the db structure as normal, but as long as I increased the frequency of calling fmt.Printf("%v", db), I got golang concurrent map read and map write error, then the program panic during runtime.
The text was updated successfully, but these errors were encountered: