spacejam / sled

the champagne of beta embedded databases

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deadlock under high load

justinlovinger opened this issue · comments

I have an application making hundreds of get calls and dozens of insert calls a second over 8 concurrent threads. Sled consistently deadlocks after several minutes of this. I wasn't able to trigger a deadlock without insert calls, but get calls themselves did deadlock.

  • Sled version 0.34.7.
  • rustc version 1.59.0.
  • Linux.

Hey! I have same problems :(
Any chance to fix this?

Since sled is using parking lot, enable their deadlock detection feature and run the small code in a separate thread to detect the deadlock, you could post where it is occurring at.

please post a stacktrace

I encountered a deadlock problem under high concurrent insertions and removals from the database when using the flush_async method. I believe the issue stemmed from the parking_lot crate. After updating to version '0.12.1', the problem has been resolved.

We're getting a deadlock on a futex while only doing sequential single-threaded get calls. Reproduces after a few seconds of trying to run our script.

From strace:
futex(0x7f06b3781bd0, FUTEX_WAIT_PRIVATE, 1, NULL