[Home]

Summary:ASTERISK-08018: Asterisk 1.4 99% cpu usage and crashing
Reporter:Chris Hodgetts (chodgetts)Labels:
Date Opened:2006-10-27 04:03:49Date Closed:2006-11-28 21:07:12.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) output.txt
Description:Upgrading from Asterisk 1.2 to Asterisk 1.4 results in max CPU usage, and eventually a crash of Asterisk.

Decided I would try from SVN, removed all trace of Asterisk, recompiled and problem still presents it's self.

After one or two outbound calls Asterisk starts to use 99% CPU and will eventually crash but only on a call - not while running 'idle'.

When a call is being made, CPU usage drops back to about 2 or 3%, once the call is terminated, usage will return back to 99% - once asterisk gets into this "mode" of using 99%, no audio is passed, even though cpu usage has dropped back for a call.

****** ADDITIONAL INFORMATION ******

I am running Debian Unstable.
This problem only has presented it's self on Asterisk 1.4.

The same hardware is being used as I used for 1.2:
CPU:             Pentium II 400mhz
MemTotal:        60284 kB

I am running Asterisk in G729 passthrough mode, this problem presents on all my SIP clients, PAP2, Grandstream BT100 and the Xten softphone.

This issue is also replicatable on my hardware, and using 1.4-Beta2 and two SVN Revisions still presented this bug.

I have asked on IRC #Asterisk-DEV they suggested I post here.
Comments:By: Russell Bryant (russell) 2006-10-27 10:49:15

If you can ever catch me on IRC, I'd be interested in logging into this system to see if I can figure out what is going on.

By: Chris Hodgetts (chodgetts) 2006-10-27 15:14:52

Hello, no problems

I am based in New Zealand, but do Shift work, so I am sure there will be a time when we are both on IRC at the same time.

My name on the IRC Channel is Chris-H,

By: Chris Hodgetts (chodgetts) 2006-10-28 02:59:28

Russell, if you want to get me on e-mail to arrange a time my address is

nospam [at] archnetnz [dot] com

Cheers

By: Chris Hodgetts (chodgetts) 2006-11-08 03:29:50.000-0600

OK ..

So a fresh built box (Debian Unstable) still kinda reveals this problem...
Using G729 pass through..

Using (almost) identical hardware, both Compaq Deskpro EN's..

The CPU usage does not go up to 99% but RTP is still choppy, and using the same config settings, and changing the NAT settings on the firewall, outbound audio is non existant..

Inbound audio works, but on the second outbound call, the audio is either not there, or very choppy to a point where it is non usable..

Still not really sure whats going on... but a new box and similar problems are presenting it's self...

Perhaps it's a debian thing, (no disrespect to debian), as in dependencies or the way a package is built that Asterisk has trouble with, not sure - although at least it's not crashing on the newly built box.

Any more help would be great...

Cheers and thanks in advance

By: Russell Bryant (russell) 2006-11-08 14:09:49.000-0600

I'm glad to hear the full CPU usage issue is not there anymore.  Perhaps it was something that has already been fixed.

When you say outbound audio is not there, how do you verify this?  What do you see when you do "rtp debug"?  That will show you what Asterisk is (or is not) sending and receiving.  

Regarding the choppy audio, I really suspect your network connection.  You can try enabling the jitterbuffer in Asterisk to see if that helps.  If you have SIP on both ends, you'll have to use the "jbforce" option to force the jitterbuffer to be enabled.  See sip.conf.sample for the relevant options.

By: Chris Hodgetts (chodgetts) 2006-11-28 17:14:24.000-0600

Hello,

Sorry this took so long to get back to you..

I think it might be a PAP2 issue, using Ekiga the audio flows both ways correctly.

Using G729 codec on the PAP2 one way audio only (Ekiga has no g729 support), so g729 pass through on 1.4 could be the problem?

what I dont understand is that inbound audio works Ok.

Putting a g729 codec on the box, and setting ulaw to the pap2, then audio gets sent both ways correctly.

By: Chris Hodgetts (chodgetts) 2006-11-28 19:08:34.000-0600

Interesting:

Inbound call, from GSM Cellphone to Asterisk 1.4 audio flows both directions.
Outbound call, via PAP2 > Asterisk > VSP the audio does not flow.

It might be a configure error in asterisk, but it does work with another client.

I am a little puzzled. I will keep working on it,

You could close this job, as the initial problem of Asterisk going to 100% CPU seems to have stopped after an upgrade from CVS... I assume *something* fixed it.

By: Joshua C. Colp (jcolp) 2006-11-28 21:07:11.000-0600

Since the reporter reports this appears to have been fixed I am closing this out. If the audio issue turns out to be something that is Asterisk related please open a new bug for it. Thanks!