-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
MemoryManager::can_grow_directly makes use of a parking_lot::CondVar. This is a blocking primitive, and as a result will block the current tokio worker thread until such a time as the condition is signalled.
As the tokio worker pool is a bounded thread pool, often with workers equal to the number of threads, this can potentially result in a deadlock where all the worker threads are blocked waiting for memory that will never be freed as all the workers are blocked.
To Reproduce
Expected behavior
It should be a simple case of switching to using https://docs.rs/tokio/latest/tokio/sync/struct.Notify.html instead of a CondVar
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working