Deleted locks can still be acquired

Bug #1928494 reported by Tim Burke
6
This bug affects 1 person
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://review.opendev.org/c/openstack/swift/+/791022 but it requires two stat calls during every lock acquisition.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.