[asterisk-dev] Possible deadlock situation in chan_sip.c?

Moises Silva moises.silva at gmail.com
Thu Mar 22 08:12:35 MST 2007


Harald, the error says that chan_sip is waiting for the lock, the
deadlock is probably in other unkown place in the code.

On 3/22/07, Harald Raetscher <hra at teamware-gmbh.de> wrote:
> I don't know if the code in the for loop can break, but how is it
> possible that the iflock hasn't been released. The log that I've already
> posted points to this situation, right?
>
> Again:
> [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 for 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 locked 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'?
> ...
>
> Regards,
>
> Harald Rätscher
>
> Harald Raetscher wrote:
> > Can this code section from chan_sip.c (begin at line 14920) cause
> > deadlocks if any error occurs between the mutex lock for iflock?
>
> What do you mean by 'any error'? Is there code in that for loop that can
> cause the function to be existed without releasing the lock? If not,
> there is no path through the function that would not end up releasing
> the lock.
> _______________________________________________
> --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
>
>
>
> _______________________________________________
> --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
>


-- 
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"


More information about the asterisk-dev mailing list