-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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 on V3 close #5495
Comments
And just in case it's not clear, this is all with the clientv3 API. |
Can you write a simple example code to reproduce this? |
@gyuho Unfortunately, I cannot. I have a fairly large WIP branch that experiences this. One other thing that I forgot: This is probably related to: #5491
Right after I call close, I would have created a new client and connected to server2, however I don't get that far because of the panic. Ideally I would be able to just add an endpoint like in #5491 but this is an attempt to workaround that missing feature. When server1 shuts down, it probably causes something on client2 to go nil, and then the panic happens because this case wasn't tested. HTH! |
I meet the same problem and find that V3 client may be not thread safe now.
/cc @xiang90 |
TestKVGetErrConnClosed needs to close the client concurrently to reproduce the issue in etcd-io#5495.
@purpleidea @siddontang Please try master branch. We've added a new error type Thanks for reporting. |
Sorry for not mentioning it earlier, but I do not experience this issue any more since the patch. Thank you again! |
I've been able to trigger a panic when I call Close(). This is with the v.3.0.0-beta.0 tag.
The line in question 288 is the middle line here:
I don't expect a panic, the only thing I think I might be doing that's extraordinary, is that I have some running watches while this is happening. IOW, I haven't run cancel() on them before I call close.
The text was updated successfully, but these errors were encountered: