Nngix maybe dead lock in ngnix_event_timer

In file src/event/ngx_event_timer.c:
function:
void ngx_event_expire_timers (void)
{
… …
for ( ;; ) {

    [color=#FF0000]ngx_mutex_lock(ngx_event_timer_mutex);[/color]

    root = ngx_event_timer_rbtree.root;

    [color=#FF0000]if (root == sentinel) {
        return;
    }[/color]

… …
}

While timer rb-tree is empty, mutex_lock ‘ngx_event_timer_mutex’ would
not unlock!

This bug is avaliable in every nginx version. Should fix it pls.

Posted at Nginx Forum:

Hi,

While timer rb-tree is empty, mutex_lock ‘ngx_event_timer_mutex’ would
not unlock!

This bug is avaliable in every nginx version. Should fix it pls.

There is nothing to unlock, ngx_mutex_lock() is no-op.

Best regards,
Piotr S. < [email protected] >