Skip to content
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

panic in src/database/sql/sql.go:2041 why #43445

Closed
liaosimin opened this issue Dec 31, 2020 · 3 comments
Closed

panic in src/database/sql/sql.go:2041 why #43445

liaosimin opened this issue Dec 31, 2020 · 3 comments

Comments

@liaosimin
Copy link

go version 1.13.14

panic stack:
........
panic(0x11871a0, 0x1e04370)
/usr/local/go/src/runtime/panic.go:679 +0x1b2
sync.(*RWMutex).RLock(...)
/usr/local/go/src/sync/rwmutex.go:48
database/sql.(*Tx).grabConn(0x0, 0x14b9620, 0xc0014486f0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/database/sql/sql.go:2041 +0x57
database/sql.(*Tx).ExecContext(0x0, 0x14b9620, 0xc0014486f0, 0xc0010ff800, 0x101, 0xc001325400, 0xf, 0x10, 0x1123ae0, 0x1477a80, ...)
/usr/local/go/src/database/sql/sql.go:2291 +0x4c
gorm.io/gorm/callbacks.Create.func1(0xc0014487e0)
/opt/tiger/compile_path/pkg/mod/gorm.io/gorm@v1.20.7/callbacks/create.go:54 +0x33c
gorm.io/gorm.(*processor).Execute(0xc00007d980, 0xc0014487e0)
/opt/tiger/compile_path/pkg/mod/gorm.io/gorm@v1.20.7/callbacks.go:105 +0x224
gorm.io/gorm.(*DB).Create(0xc001448750, 0x124fee0, 0xc001b70980, 0x14b9620)
/opt/tiger/compile_path/pkg/mod/gorm.io/gorm@v1.20.7/finisher_api.go:20 +0xa7
code.byted.org/ad/account_dal/pkg/gorm_client.(*GORMX).Create(0xc0001d5380, 0x14b9620, 0xc00112dd40, 0x124fee0, 0xc001b70980, 0x0, 0x0)
.......

can somebody help me?

@davecheney
Copy link
Contributor

Please try upgrading to go 1.15.6 and running the race detector.

@mengzhuo
Copy link
Contributor

Hi, liaosimin

  1. It looks like you are using "gorm" and Go 1.13 , please upgrade to Go1.15 if possible.
  2. Github issue is not a place for non-Go-itself related question and "go-nuts" is the right place for these topic. https://groups.google.com/g/golang-nuts

@mvdan
Copy link
Member

mvdan commented Dec 31, 2020

The Go project doesn't use the issue tracker for questions. See https://golang.org/wiki/Questions.

@mvdan mvdan closed this as completed Dec 31, 2020
@golang golang locked and limited conversation to collaborators Dec 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants