Commit Graph

2 Commits

Author SHA1 Message Date
Bartosz Taudul
092bfcc2a0 Add deadlock cycle detection to the lock event engine.
The scan consumes the final Waiting/SharedHolding flags of each lock
map: a thread blocked in a lock acquisition emits no Obtain and no other
event, so an unclosed wait at the last known state is a permanent wait
per the event contract. A failed try_lock never emits a wait, so it
cannot fabricate an edge. Locks recorded by clients with inverted
release ordering are skipped entirely, as their holder attribution is
ambiguous.

A thread that holds a shared lock and waits for exclusive cannot
progress while its own shared hold persists; this is reported as a
size-1 cycle.
2026-09-24 22:21:50 +02:00
Bartosz Taudul
b81fe9db72 Rewrite server-side lock tracking as an append-only event engine.
Capture has serialized lock events since d6f32a083 and 3e3aa80fa, so
the out-of-order reconstruction machinery has nothing left to repair.
Mark now targets the recorded Wait/Obtain event index; the old reverse
scan could walk off the start of the timeline for a thread that never
waited.
2026-09-21 18:14:11 +02:00