Skip to content

sqlite: fix lock_handle deadlock - #4558

Closed
sainathr19 wants to merge 1 commit into
transact-rs:mainfrom
sainathr19:sqlite-lock-handle-deadlock-repro
Closed

sainathr19 wants to merge 1 commit into
transact-rs:mainfrom
sainathr19:sqlite-lock-handle-deadlock-repro

Conversation

@sainathr19

@sainathr19 sainathr19 commented Nov 27, 2026 •

Copy link
Copy Markdown

Fixes #4557.

Work in progress. First commit adds a repro test that hangs on main; the fix is next.

cargo test --features sqlite,runtime-tokio --test sqlite-lock-handle-deadlock -- --test-threads=1

@sainathr19 sainathr19 changed the title sqlite: repro + fix for lock_handle deadlock (#4557) sqlite: fix lock_handle deadlock Nov 27, 2026
Back-to-back lock_handle() calls can leave stale UnlockDb commands in the
worker's bounded channel; once it fills, the caller and worker deadlock.
This test hangs on main.
@sainathr19
sainathr19 force-pushed the sqlite-lock-handle-deadlock-repro branch from 62b7b9e to 3af8f14 Compare November 27, 2026 09:36
@sainathr19 sainathr19 closed this Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sqlite: back-to-back lock_handle calls can deadlock the connection (stale UnlockDb commands fill the channel)

1 participant