Nngix maybe dead lock in ngnix_event_timer

ljzwaterbull nginx-forum at nginx.us
Fri Jan 21 13:32:34 MSK 2011


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: http://forum.nginx.org/read.php?2,168188,168188#msg-168188




More information about the nginx mailing list