[asterisk-bugs] [Asterisk 0013305]: AEL while loop - high cpu usage and crash

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Aug 19 00:52:58 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13305 
====================================================================== 
Reported By:                yarns
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   13305
Category:                   PBX/pbx_ael
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     closed
Asterisk Version:           1.4.19 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 no change required
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-08-14 14:34 CDT
Last Modified:              2008-08-19 00:52 CDT
====================================================================== 
Summary:                    AEL while loop - high cpu usage and crash
Description: 
extensions.ael

Set(CDR(accountcode)=${CUT(EXTEN,,2)});
MixMonitor(RECORD_${STRFTIME(${EPOCH},GMT+8,%C%y%m%d%H%M%S)}_${CALLERID(num)}_${CUT(EXTEN,,2-3)}_${CDR(uniqueid)}.gsm|W(1)b);
if (${GROUP_COUNT(IAX2/gsm)}<${Kanaly1})
{
    Set(GROUP()=IAX2/gsm);
    Dial(IAX2/gsm/${CUT(EXTEN,,3)});
	try=0;
    while (${try} < 10)
    {
        Wait(0.25);
        if ("${DIALSTATUS}" = "CHANUNAVAIL")
        {
            Dial(IAX2/gsm/${CUT(EXTEN,,3)});
            try=${try}+1;
        }
        else
        {
            proba=20;
        };
    };
};

30 agents, quadcore cpu, 8GB RAM
while entering into while loop cpu goes to 135% (without loop - 12%),
after 2 hours crash:
Aug 14 15:38:51 asterisk2 kernel: asterisk[27997]: segfault at
0000000000000418 rip 00002aaab1a66b22 rsp 00000000416d9ce0 error 4

If someone need more specific information just tell me what to do to get
it.

Best regards
====================================================================== 

---------------------------------------------------------------------- 
 (0091535) yarns (reporter) - 2008-08-19 00:52
 http://bugs.digium.com/view.php?id=13305#c91535 
---------------------------------------------------------------------- 
Hello,

i paste bad code - in else statment should be:
try=20 not proba=20
so if dialstatus is different than CHANUNAVAIL its break while loop.


 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-19 00:52 yarns          Note Added: 0091535                          
======================================================================




More information about the asterisk-bugs mailing list