Deleted locks can still be acquired
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
In Progress
|
Undecided
|
Tim Burke |
Bug Description
We don't delete locks in many places (just the relinker, AFAIK), but when we do, you can run into trouble:
* Process A acquires the lock
* Process B blocks trying to acquire
* Process A deletes the lock
* Process A releases the lock
* Process B can now acquire the (deleted!) lock
This can lead to duplicate locks being held; as soon as Process A deletes the lock file, a new Process C can create a new one and think it has exclusive access. You can also run into similar issues if lock files get renamed (though I don't think we've got anything that would do that).
I've got a proposed fix at https:/