Hi!


Can this code section from chan_sip.c (begin at line 14920) cause
deadlocks if any error occurs between the mutex lock for iflock?



--- snip ---

            /* Check for interfaces needing to be killed */

            ast_mutex_lock(&iflock);

restartsearch:

            t = time(NULL);

            /* don't scan the interface list if it hasn't been a
reasonable period

               of time since the last time we did it (when MWI is being
sent, we can

               get back to this point every millisecond or less)

            */

            for (sip = iflist; !fastrestart && sip; sip = sip->next) {

                  ...

            }

            ast_mutex_unlock(&iflock);

--- snip ---



Asterisk log:



--- snip ---

[Mar 16 12:31:18] ERROR[11927]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: chan_sip.c
line 4303 (sip_alloc): Deadlock? waited 5 sec for mutex '

&iflock'?

[Mar 16 12:31:18] ERROR[11927]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: chan_sip.c
line 14920 (do_monitor): '&iflock' was locked here.

[Mar 16 12:31:18] ERROR[11942]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: pbx.c line
2105 (ast_extension_state_del): Deadlock? waited 5 sec fo

r mutex '&(&hints)->lock'?

[Mar 16 12:31:18] ERROR[11942]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: pbx.c line
1982 (ast_hint_state_changed): '&(&hints)->lock' was lock

ed here.

[Mar 16 12:31:18] ERROR[11927]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: chan_sip.c
line 4303 (sip_alloc): Deadlock? waited 5 sec for mutex '

&iflock'?

[Mar 16 12:31:18] ERROR[11927]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: chan_sip.c
line 14920 (do_monitor): '&iflock' was locked here.

[Mar 16 12:31:18] ERROR[11942]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: pbx.c line
2105 (ast_extension_state_del): Deadlock? waited 5 sec fo

r mutex '&(&hints)->lock'?

[Mar 16 12:31:18] ERROR[11942]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: pbx.c line
1982 (ast_hint_state_changed): '&(&hints)->lock' was lock

ed here.

[Mar 16 12:31:18] ERROR[11927]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: chan_sip.c
line 4303 (sip_alloc): Deadlock? waited 5 sec for mutex '

&iflock'?

[Mar 16 12:31:18] ERROR[11927]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: chan_sip.c
line 14920 (do_monitor): '&iflock' was locked here.

[Mar 16 12:31:18] ERROR[11942]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: pbx.c line
2105 (ast_extension_state_del): Deadlock? waited 5 sec fo

r mutex '&(&hints)->lock'?

[Mar 16 12:31:18] ERROR[11942]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: pbx.c line
1982 (ast_hint_state_changed): '&(&hints)->lock' was lock

ed here.

--- snip ---



Cheers



Harald



-------

Teamware GmbH
Stahlgruberring 11, D-81829 München
Registergericht München, HRB 104293
Geschäftsführer: Dr.-Ing. Thomas Kupec, Armin Sperber

Telefon:   089-427 005.15
E-Mail:    [EMAIL PROTECTED]
Web:       http://www.tmwr.de

 <http://www.tmwr.de/>





_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to