diff --git a/CHANGES b/CHANGES index e54699b7ce..771d8b7694 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,10 @@ +3.2.0-dev.192 | 2020-02-28 11:36:12 -0800 + + * threading::Queue::WakeUp(): lock mutex before notifying condition_variable (Max Kellermann) + + Not locking the associated mutex can create race conditions and lockups. + 3.2.0-dev.190 | 2020-02-28 00:42:17 -0800 * Stmt: use class IntrusivePtr (Max Kellermann) diff --git a/VERSION b/VERSION index f3a3cc3bab..9abec97d07 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.2.0-dev.190 +3.2.0-dev.192 diff --git a/src/threading/Queue.h b/src/threading/Queue.h index 4c3453d0c8..ad59f15268 100644 --- a/src/threading/Queue.h +++ b/src/threading/Queue.h @@ -255,7 +255,10 @@ template inline void Queue::WakeUp() { for ( int i = 0; i < NUM_QUEUES; i++ ) + { + auto lock = acquire_lock(mutex[i]); has_data[i].notify_all(); + } } }