There are two wolves inside of you. If the first acquires lock A and the second acquires lock B, and then the first attempts to acquire lock B while the first attempts to acquire lock A, they will deadlock. Teach your wolves concurrency.
Comments
Log in with your Bluesky account to leave a comment
There are an indeterminate number of wolves inside of you. One has a large patch to apply, and the others have a steady stream of small patches to apply. All patches must be rebase-clean before they apply for audit reasons.
The probability of the wolves livelocking asymptotically approaches 1.
Coda: All of the wolves know about the livelock, but none of them will fix it as doing so would be a thankless task that will not help them get promoted if it succeeds, and only get them into trouble if it fails.
Just give the deadlocked wolves access to a table occupied by a group of dining philosophers. This may not solve to contention over locks A vs. B, but I am sure that there will be some activity - at least until there are no more philosophers, who may or may not hold alternative keys, temporarily.
Comments
The probability of the wolves livelocking asymptotically approaches 1.
"the first attempts to acquire lock B while the first attempts to acquire lock A"
https://deadlockempire.github.io/
And my writeup
https://www.acepace.net/2020-07-09-deadlock/