[asterisk-dev] Deadlock while using MGCP on Asterisk
Mark Michelson
mmichelson at digium.com
Thu Feb 25 10:58:41 CST 2010
Adrien Lemoine wrote:
> Hello all,
>
>
>
> I’m running Asterisk 1.2.35 with chan_mgcp activated.
>
>
>
> The process host around 2,4K users.
>
>
>
> Along the day I’ve got some debug reports like :
>
>
>
> Feb 24 22:25:42 DEBUG[28546] channel.c: Avoiding deadlock for
> 'MGCP/aaln/1 at 028421223635-1'
>
> Feb 24 22:29:04 DEBUG[28670] channel.c: Avoiding initial deadlock for
> 'MGCP/aaln/1 at 028421223635-1'
>
>
>
> Then, at random time (around 10~16 hours after a restart), Asterisk
> comes into deadlocks :
>
>
>
> Feb 25 16:28:22 WARNING[8149] channel.c: Avoided deadlock for
> '0xb713cb60', 9 retries!
>
> Feb 25 16:29:07 WARNING[8180] channel.c: Avoided initial deadlock for
> '0xb713cb60', 9 retries!
>
> Feb 25 16:40:21 WARNING[8629] channel.c: Avoided initial deadlock for
> '0xb713cb60', 9 retries!
>
>
>
> Avoided seems to correlate that Asterisk is in deadlock status. I put in
> attached a gdb output during the deadlock if it can helps.
>
>
>
> How can I correct these errors and avoid the crash not the deadlock J
>
>
>
> Regards,
>
>
>
> Adrien .L
>
>
>
Thread 10 is clashing with thread 2 in the backtrace. Thread 10 is stuck in a
loop where it is attempting to lock the channel that is held by thread 2. Thread
10 cannot lock the channel, so it prints the message about avoiding the
deadlock. In addition, thread 10 attempts to avoid the deadlock by unlocking the
MGCP subchannel that it had previously locked. However, this doesn't seem to
actually allow thread 2 to continue. Apparently, the lock that thread 2 is
trying to acquire is not the MGCP subchannel that thread 10 is relinquishing to
attempt to avoid the deadlock. The lock that thread 2 is attempting to acquire
must be one held by another thread. Unfortunately, I can't glean any more
information than that from the backtrace.
Mark Michelson
More information about the asterisk-dev
mailing list