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

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Aug 18 15:15:20 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:                     assigned
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:              
====================================================================== 
Date Submitted:             2008-08-14 14:34 CDT
Last Modified:              2008-08-18 15:15 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
====================================================================== 

---------------------------------------------------------------------- 
 (0091521) murf (administrator) - 2008-08-18 15:15
 http://bugs.digium.com/view.php?id=13305#c91521 
---------------------------------------------------------------------- 
I just tried to reproduce this. Runs 10 times thru the loop and exits the
loop, just as expected.

Hmm, could you "core set verbose 5" and capture the messages that come out
on the console, and attach them to this bug? That should pretty much tell
us what's going on. I don't have queues on my test machine, and had to set
Kanaly1 to 10 to mimic the behavior you might be seeing. The only way this
code could be going nuts is either if Wait() is not doing its thing, or if
Dial is going nuts for some reason. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-18 15:15 murf           Note Added: 0091521                          
======================================================================




More information about the asterisk-bugs mailing list