-
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
mvcc: cannot detach lease not found #6093
Comments
is your deployment upgraded from a pre-release version of etcd3? |
Not sure, but that's quite possible, yes. |
If you have time, probably you can help to reproduce? Set up same lock logic and let lease expire. At the meantime, I will take a look at the lease logic sometime this week. |
Thanks for such a prompt response! |
@nekto0n It would be really helpful if you can somehow reproduce it from a fresh cluster. |
@nekto0n I think I found the bug. I will try to get a fix soon. It would be great if you can provide me the full etcd log? Is there a snapshot sending/receiving event happened? |
@xiang90 I tried to, but I failed to reproduce the bug on fresh/testing installations.
You'd like to look at logs during |
But as I said, I'm pretty sure I have at least another one cluster, which has similar state and I can issue |
@nekto0n In the pre-release, there was a bug that if one lease attached with multiple keys, only the first key will be removed. In your case, have you attached multiple keys to one lease? |
@xiang90 No, I don't think so. |
Sure thing! I'll give it a spin during weekend. |
Did you implement your own lock? Or you were using our lock implementation? If you were using ours, we actually attach all lock keys onto one lease. |
I used your |
Can you please create an issue for the lock thing? We can improve it. I cannot really figure out where was the bug... We changed quite a lot stuff since 2.3.x to 3.0. I think we can close this for now. Let us know if it happens again. It would be great if you can reproduce. |
Yeah, sure. Just thought it tried to look like |
BTW, I built and installed etcd from master and still something is holding lock file. Can I now remove it with |
@nekto0n what do you mean by lock file? If If the mutex is still held, you could try revoking the lease on the mutex key with the lowest create revision which will abort the holder's session. |
Sorry for being vague. By lock file I meant "file with attached lease". I confirm, that issue is fixed, after removing file with stale lease I got an error |
@nekto0n If you start with a fresh cluster, even that error should not ever appear. Or there is still a bug some where. |
@xiang90 Right, I failed to reproduce this with a fresh cluster. Thanks a lot for your help! |
Hi!
Just encountered a very unexpected issue. I'm using latest etcd and had a key which was used as a lock, i.e. lease attached to it. For some reason lease was there even if I stopped all clients for a while. I decided to remove the key using
etcdctl del
. After running this command whole cluster (5 nodes) went down with error:I had to patch
etcd
to ignore this error, after that cluster went back to live.Not quite sure, how I managed to get there (have stale lease), but I think you may be interested. Maybe there was a bug a while ago which is now fixed, but lurked in my installation and revealed itself only now.
The text was updated successfully, but these errors were encountered: