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

Harald Raetscher hra at teamware-gmbh.de
Thu Mar 22 07:10:01 MST 2007


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





More information about the asterisk-dev mailing list