Severity: MEDIUM
Location: DatabaseContext.java:190-195 (cleanupDeadThreads only prunes the CONTEXTS map), utility/LockManager (ownership keyed by requester with no liveness sweep / timeout), TransactionContext.java:519-530 (kill() nulls lockedFiles without unlocking).
A thread acquires an explicit lock (acquireLock().type("X").lock()), then dies from an uncaught error before commit/rollback. cleanupDeadThreads removes its context, dropping the only reference to explicitLockedFiles. The LockManager entries remain owned by the dead requester forever; every later commit touching those files times out with LockTimeoutException until restart.
Fix: in cleanupDeadThreads/removeAllContexts, roll back any active TransactionContext found (which releases locks via reset()); optionally add a dead-owner sweep to LockManager for Thread requesters.
Filed from an internal engine deep-audit (2026-07). Traced to source; verify against current main before fixing and add a regression test.
Severity: MEDIUM
Location:
DatabaseContext.java:190-195(cleanupDeadThreadsonly prunes theCONTEXTSmap),utility/LockManager(ownership keyed by requester with no liveness sweep / timeout),TransactionContext.java:519-530(kill()nullslockedFileswithout unlocking).A thread acquires an explicit lock (
acquireLock().type("X").lock()), then dies from an uncaught error before commit/rollback.cleanupDeadThreadsremoves its context, dropping the only reference toexplicitLockedFiles. TheLockManagerentries remain owned by the dead requester forever; every later commit touching those files times out withLockTimeoutExceptionuntil restart.Fix: in
cleanupDeadThreads/removeAllContexts, roll back any activeTransactionContextfound (which releases locks viareset()); optionally add a dead-owner sweep toLockManagerforThreadrequesters.Filed from an internal engine deep-audit (2026-07). Traced to source; verify against current
mainbefore fixing and add a regression test.