[asterisk-dev] Lockups in Asterisk 11

Jaco Kroon jaco at uls.co.za
Wed Nov 11 09:03:51 CST 2015


Hi Mark,

I suspect the following relates:

http://jkroon.blogs.uls.co.za/it/voip/asterisk-massively-speeding-up-those-register-requests

That should explain the underlying problem for you, and potentially
provide you with a fix depending on your situation.  We've been using
the proposed "workaround" there since the time of writing with no ill
effect, however, you need to take heed of the warnings posted there.

We had to modify code on at least some instances to avoid DB() dialplan
use, in our case that wasn't difficult, but still, you need to be aware
of the risks.

Kind Regards,
Jaco

On 30/10/2015 22:56, Mark Murawski wrote:
> On 10/30/15 16:04, Mark Murawski wrote:
>> I'm getting the following lockup very randomly in 11.20.  This is pretty
>> devastating to one of my production systems.
>>
>> =======================================================================
>> === 11.20.0
>> === Currently Held Locks
>> =======================================================================
> > .... snip
>
> If this helps figure out the problem, I've added the following code to
> db.c, ast_db_put() and this appears to have alleviated the lockup
>
>        {
>                 int attempts = 10;
>
>                 while (ast_mutex_trylock(&dblock) != 0) {
>                         // didn't lock
>                         attempts--;
>                         usleep(100);
>
>                         if (attempts <= 0) {
>                                 ast_log(LOG_ERROR, "ast_db_put() COULD
> NOT LOCK.  Abandon.\n");
>                                 return -1;
>                         }
>                 }
>         }
>
> Now my logs are filling up with could not lock, but at least I'm not
> locking up entirely anymore.
>




More information about the asterisk-dev mailing list