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

Sometimes finalizer for closing cluster happens panic #208

Merged
merged 1 commit into from
Oct 12, 2017

Conversation

bluele
Copy link
Contributor

@bluele bluele commented Sep 29, 2017

Hi, @khaf .

Client version: v1.27.0 (1dc8cf2).
Server version: Aerospike Server CE :3.14.0

Sometimes happens panic occasionally when the Close function is called multiple times in parallel.
It seems that closing tendChannel is called twice.

Sample code is here:

func main() {
	client, err := aerospike.NewClient("127.0.0.1", 3000)
	panicOnError(err)
        defer client.Close()
        Task(client)
        // end
}

Traceback is here: (file path is simplified)

panic: close of closed channel
goroutine 4 [running]:
vendor/github.com/aerospike/aerospike-client-go.(*Cluster).Close(0xc42007afc0)
vendor/github.com/aerospike/aerospike-client-go/cluster.go:898 +0x5c
vendor/github.com/aerospike/aerospike-client-go.(*Client).Close(0xc42036b410)
vendor/github.com/aerospike/aerospike-client-go/client.go:109 +0x2e
vendor/github.com/aerospike/aerospike-client-go.clientFinalizer(0xc42036b410)
vendor/github.com/aerospike/aerospike-client-go/client.go:54 +0x2b

@khaf khaf merged commit 5379a1a into aerospike:master Oct 12, 2017
@bluele bluele deleted the fix/close-only-once branch October 15, 2017 02:07
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.

2 participants