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

fix(connection): panic in startWatcher #1334

Closed
wants to merge 1 commit into from

Conversation

lyyourc
Copy link

@lyyourc lyyourc commented Jun 19, 2022

Description

I found a panic in my apps:

panic: sync/atomic: store of nil value into Value
	/usr/local/go/src/sync/atomic/value.go:47 +0x12c
	/go/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/utils.go:831
	/go/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/connection.go:435 +0x51
	/go/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/connection.go:622 +0x19a
        /go/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/connection.go:611 +0xbe

But according the document, ctx.Err() should not be nil, after ctx.Done() is emitted:

// If Done is not yet closed, Err returns nil.
// If Done is closed, Err returns a non-nil error explaining why:
// Canceled if the context was canceled
// or DeadlineExceeded if the context's deadline passed.
// After Err returns a non-nil error, successive calls to Err return the same error.
Err() [error](https://pkg.go.dev/builtin#error)

I CAN NOT UNDERSTAND WHY.

Checklist

  • Code compiles correctly
  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the README / documentation, if necessary
  • Added myself / the copyright holder to the AUTHORS file

@methane
Copy link
Member

methane commented May 2, 2023

I don't want to merge this unless we understand what is happend, or it is reproducible at least.

@methane methane closed this May 2, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants