Skip to content

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

@debedb

Description

@debedb

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions