Open
Description
Jira Link: DB-17504
Description
When a thread pool worker becomes idle, it follows these steps:
- Checks the task queue
- Adds itself to the waiting workers list
- Waits on a condition variable for new work
However, a race condition can occur if a task is added to the queue immediately after the worker checks it but before it begins waiting. This results in:
- The worker waiting on the condition variable
- While the task queue is non-empty (causing a potential deadlock)
Issue Type
kind/bug
Warning: Please confirm that this issue does not contain any sensitive information
- I confirm this issue does not contain any sensitive information.