Skip to content

πŸ› fix(soft): restore raced stale markers - #899

Merged
gaborbernat merged 2 commits into
tox-dev:mainfrom
dxbjavid:soft-take-over-put-back
Oct 31, 2026
Merged

gaborbernat merged 2 commits into
tox-dev:mainfrom
dxbjavid:soft-take-over-put-back

Conversation

@dxbjavid

@dxbjavid dxbjavid commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Three or more contenders reclaiming a dead soft-lock marker can strand a live holder's marker under a break name. The lock may then become unusable or admit a second holder. This affects SoftFileLock, MarkerSoftFileLock, and SoftFileLease on filesystems that support atomic name exchange.

Contenders now check the marker again before exchanging names and unwind nested exchanges in order. If the filesystem refuses a return exchange, the contender leaves its marker at the lock path for later recovery, so another process cannot claim an empty path.

dxbjavid and others added 2 commits October 31, 2026 13:08
An exchange can succeed during takeover, then the filesystem can refuse it
while unwinding.
Retrying forever wedges acquire; deleting the contender's marker exposes an
empty path beside a live holder.

Stop on refusal and retain the marker for later recovery.
@gaborbernat gaborbernat changed the title fix(soft): unwind racing take-overs of a dead marker in reverse πŸ› fix(soft): restore raced stale markers Oct 31, 2026
@gaborbernat
gaborbernat merged commit 77eb01a into tox-dev:main Oct 31, 2026
50 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants