[asterisk-dev] Lockups in Asterisk 11

Mark Murawski markm-lists at intellasoft.net
Fri Oct 30 15:56:40 CDT 2015


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