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

A race is possible in etcd's Lock() #177

Open
debedb opened this issue Aug 3, 2017 · 1 comment
Open

A race is possible in etcd's Lock() #177

debedb opened this issue Aug 3, 2017 · 1 comment

Comments

@debedb
Copy link

debedb commented Aug 3, 2017

Consider line 499:

l.last, err = l.client.Set(context.Background(), l.key, l.value, setOpts)

It is possible for Set() to succeed, and immediately the following call to Set() from a different goroutine to fail - modifying l.last to be nil. Which will then result in Unlock() not issuing a Delete call and so not unlocking.

debedb added a commit to debedb/libkv that referenced this issue Aug 3, 2017
2. Fixes docker#177
3. Allows for an env var to override default etcd endpoint for testing
abronan pushed a commit to abronan/libkv that referenced this issue Aug 12, 2017
2. Fixes docker#177
3. Allows for an env var to override default etcd endpoint for testing
@jlhawn
Copy link
Contributor

jlhawn commented Dec 19, 2017

I think this is fixed by #186

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

2 participants