Summary:ASTERISK-13304: Asterisk uses 100% of processor forever when I used the CLI during a load test
Reporter:fcsil (fcsil)Labels:
Date Opened:2009-01-05 17:59:00.000-0600Date Closed:2009-05-20 07:59:24
Versions:Frequency of
Description:I made a load test in asterisk and when I terminated the test, asterisk continued using 100% of cpu without 0 channels UP.

I attached GDB to asterisk pid and debug thread by thread to found a infinite looping in CLI see the file read.c:533 of edline.

case CC_ERROR:
default: /* functions we don't know about */
(void) fprintf(el->el_errfile,
   "*** editor ERROR ***\r\n\n");
#endif /* DEBUG_READ */
el->el_state.argument = 1;
el->el_state.doingarg = 0;
}   /*<---- closing: for (num = OKCMD; num == OKCMD;) */

when CC_ERROR happens the condition of for is not changed and the loop runs again, but in my scenary, the loop never ends.

I think the IO of memory swap turn the machine too slow to handle correctaly the events from CLI , probably the cause of bug is the cursor posicioned in a invalid place (I don't found a deterministic way to reproduce it).

I'm trying to solve the problem using the same code of CC_FATAL to CC_ERROR.
above my changed code:

[[[unlicensed patch removed]]]

I don't yet reproduce the error after code change (I think it was solved), but I'm not sure about the efects of this change.

my english is wrong :( sorry!.
Comments:By: fcsil (fcsil) 2009-01-05 18:35:53.000-0600

my patch sugestion don't works correctaly, when you press the down key, cause a strange behavior in CLI.

I don't have time to undestand the who edline works internaly,  
I think I will make a new patch using a counter to prevent the infinite looping. It isn't a beautyfull solution but ...


By: Tilghman Lesher (tilghman) 2009-02-26 12:13:00.000-0600

All patches must be uploaded and a license agreement signed.  Please do not embed patches in the body of an issue.

By: Joshua C. Colp (jcolp) 2009-03-11 15:57:06

fcsil: Have you made any progress with this?

By: fcsil (fcsil) 2009-03-12 15:48:18

hi, I have not ideia to solve this issue.
I did not found a deterministic way to reproduce the problem, I think it is a problem in editline code. the patch suggested appears solve the issue but cause a strange behavior when using the the cursor keys.

By: Tilghman Lesher (tilghman) 2009-03-12 16:00:50

fcsil:  there is no suggested patch on this issue, because you did not follow the procedures for contributing a patch.

By: Terry Wilson (twilson) 2009-05-11 12:56:53

It has been a couple of months since the last update to this bug.  If there is no patch we can look at and no one else is experiencing this issue, I'm not sure there is anything we can do here...

By: Leif Madsen (lmadsen) 2009-05-20 07:59:23

Since there is no patch to review, and I have not seen any other reports of an issue like this, then I'm going to close this issue as 'unable to reproduce'. If the reporter can create a patch or provides information that can help move this issue forward, then they are welcome to reopen the issue.