Skip to content

Transactions are deadlocking at insert_inner #1152

@D1plo1d

Description

@D1plo1d

Transactions are deadlocking inside of commit and never returning in my application. LLDB shows the thread as stuck on this line:

while self.tree.insert_inner(k, v_opt.clone(), &mut guard)?.is_err()
{
}

Source things: https://github.com/spacejam/sled/blob/master/src/transaction.rs#L364

  1. expected result: I expect TransactionTree::commit to always return a result.
  2. actual result: TransactionTree::commit intermittently blocks until I kill the application.
  3. sled version: 0.34.2 + some small error handling experiments: https://github.com/D1plo1d/sled/tree/53d0e30a749f27fb808101730f1794a5f85b6216
  4. rustc version: rustc 1.44.1 (c7087fe00 2020-06-17)
  5. operating system: Ubuntu 20.04
  6. minimal code sample that helps to reproduce the issue: Intermittent issue. TBH I could use a hand figuring out how to reliably reproduce my issue.
  7. logs, panic messages, stack traces: Not sure what would be helpful here (please let me know!). I added a couple trace! macros to commit and observed that the commit started but never finished.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions