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

mysql startWatcher panic error #1538

Closed
freehere107 opened this issue Jan 16, 2024 · 3 comments
Closed

mysql startWatcher panic error #1538

freehere107 opened this issue Jan 16, 2024 · 3 comments

Comments

@freehere107
Copy link

Issue description

goroutine startWatcher cause panic error

Example code

Since it happens in goroutine, there is no code to reproduce

0xee0f31	github.com/go-sql-driver/mysql.(*mysqlConn).startWatcher.func1+0x131	/home/runner/go/pkg/mod/github.com/go-sql-driver/[email protected]/connection.go:620

Error log

panic: sync/atomic: store of nil value into Value

goroutine 1961295 [running]:
sync/atomic.(*Value).Store(0xc002e34ef0?, {0x0, 0x0})
	/opt/hostedtoolcache/go/1.19.13/x64/src/sync/atomic/value.go:49 +0xf8
github.com/go-sql-driver/mysql.(*atomicError).Set(...)
	/home/runner/go/pkg/mod/github.com/go-sql-driver/[email protected]/utils.go:831
github.com/go-sql-driver/mysql.(*mysqlConn).cancel(0xc0022a2b40?, {0x0?, 0x0?})
	/home/runner/go/pkg/mod/github.com/go-sql-driver/[email protected]/connection.go:435 +0x3d
github.com/go-sql-driver/mysql.(*mysqlConn).startWatcher.func1()
	/home/runner/go/pkg/mod/github.com/go-sql-driver/[email protected]/connection.go:622 +0x16a
created by github.com/go-sql-driver/mysql.(*mysqlConn).startWatcher
	/home/runner/go/pkg/mod/github.com/go-sql-driver/[email protected]/connection.go:611 +0x10a

Configuration

Driver version (or git SHA):
v1.6.0
Go version: run go version in your console
1.19.13
Server version: E.g. MySQL 5.6, MariaDB 10.0.20
MySQL 8.0.30
Server OS: E.g. Debian 8.1 (Jessie), Windows 10
alpine:3

@freehere107 freehere107 changed the title go-sql-driver startWatcher panic error mysql startWatcher panic error Jan 16, 2024
@methane
Copy link
Member

methane commented Jan 16, 2024

Since it happens in goroutine, there is no code to reproduce

"happens in goroutine" is not a reason to no code to reproduce.

Thousands of developers are using this library without problems on millions of servers without encountering the phenomenon you report.
You must suspect that there is something wrong with your code or environment. That is why reproduced code is essential.

@freehere107
Copy link
Author

freehere107 commented Jan 16, 2024

@methane
Thanks.You are right. I will close the issue until the problem can be reproduced.

@coderabbitai coderabbitai bot mentioned this issue Mar 22, 2024
5 tasks
@li5ch
Copy link

li5ch commented Apr 25, 2024

@methane Thanks.You are right. I will close the issue until the problem can be reproduced.

hello I also meet same question with you, can u tell me the reason?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants