[Home]

Summary:ASTERISK-23219: Asterisk restarts with increasing LA
Reporter:Nikolay (tensor)Labels:
Date Opened:2014-01-30 00:21:14.000-0600Date Closed:2014-01-30 15:26:49.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:
Versions:1.8.15.0 Frequency of
Occurrence
Related
Issues:
Environment:hardware: 2 CPU xeon E5649, 36GB RAM, CentOS release 6.2 (Final), kernel 2.6.32-220.13.1.el6.x86_64, asterisk version is 1.8.15-cert2.Attachments:
Description:We have found out the problem with unexpected abnormal asterisk behaviour.

Symtpomps: In a company there is a callcenter with asterisk as a PBX. Network connection is made by SIP protocol. Didfferent amount of calls can arive to the callcenter. Some days the call quantity can equal 750 calls
simaltaneously, some days amount is 200 calls  simaltaneously (some of calls are on operators of a queue, some calls are queued and wait for operator - that is normal situation in callcenter).
Suddenly new calls cannot be made - calling party hears busy. The current calls ger dropped. Load Average of the server immidiately increases from 1.6 to approx. 170.
In fulllog of asterisk we see next strings
[Jan 15 14:28:11] WARNING[13861] channel.c: Channel allocation failed: Refusing due to active shutdown
[Jan 15 14:28:11] WARNING[13861] chan_sip.c: Unable to allocate AST channel structure for SIP channel
[Jan 15 14:28:11] NOTICE[13861] chan_sip.c: Unable to create/find SIP channel for this INVITE

After that all calls are droppped, asterisk is automatically restarted (no system administrator gave command to restart it),  new calls are successfully established.
The coredump in /tmp directory was NOT created in this situation.
Comments:By: Matt Jordan (mjordan) 2014-01-30 15:26:44.789-0600

This:

{noformat}
[Jan 15 14:28:11] WARNING[13861] channel.c: Channel allocation failed: Refusing due to active shutdown
{noformat}

comes from this:

{noformat}
/* If shutting down, don't allocate any new channels */
if (shutting_down) {
ast_log(LOG_WARNING, "Channel allocation failed: Refusing due to active shutdown\n");
return NULL;
}
{noformat}

The variable {{shutting_down}} is only set to a non-zero value if {{ast_begin_shutdown}} is called:

{noformat}
void ast_begin_shutdown(int hangup)
{
shutting_down = 1;

if (hangup) {
ao2_callback(channels, OBJ_NODATA | OBJ_MULTIPLE, ast_channel_softhangup_cb, NULL);
}
}
{noformat}

{{ast_begin_shutdown}} is only called from {{can_safely_quit}} in {{asterisk.c}}, which - for all intents and purposes - is the handler for someone shutting down your system. So no, it didn't crash (hence the lack of core file), and yes, someone did shut down your system :-)