[asterisk-bugs] [Asterisk 0010775]: Asterisk suddenly slows down, and eats 100% cpu
noreply at bugs.digium.com
noreply at bugs.digium.com
Mon Sep 24 04:53:11 CDT 2007
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=10775
======================================================================
Reported By: atis
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 10775
Category: Core-General
Reproducibility: random
Severity: major
Priority: normal
Status: new
Asterisk Version: 1.4.10
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 09-20-2007 16:36 CDT
Last Modified: 09-24-2007 04:53 CDT
======================================================================
Summary: Asterisk suddenly slows down, and eats 100% cpu
Description:
I'm running 1.4.10 (with reverted res_features from
http://bugs.digium.com/view.php?id=10415). Approximately
once or twice per week (restarted daily) asterisk suddenly starts acting
slowly, and eats 100% cpu. Call volume drops as it takes really long time
for customers to get to agents, but this doesn't improve situation in any
way.
Last week i recompiled with DONT_OPTIMIZE, DEBUG_THREADS and DEBUG_LOCKS,
so now i can attach debug output.
I killed asterisk with "killall -5 asterisk", so that core is dumped.
Attached files:
backtrace.txt - backtraces taken from core
report.txt - various information ("top", "core show threads", "core show
locks", "core show channels") right before i killed asterisk.
normal.txt - top, and channel count when under normal load (30 minutes
after kill)
cli.txt - multiple consecutive executions of "core show threads" and "core
show locks", when problem raised.
======================================================================
----------------------------------------------------------------------
atis - 09-24-07 04:53
----------------------------------------------------------------------
Ok, i digged into sources and found that it's all related to last lines of
code in main/asterisk.c. There's infinite loop "for(;;)", that reads
something from console. I don't know what have caused this - i double
checked all my system looking for tty9, there's nothing that could have
caused it. As temporary solution - i disabled console in safe_asterisk (and
would recommend to do so in distribution).
However the problem is somewhere there, i'm just not enough familiar with
code to find it.Maybe because of "num_read", that i suppose means
characters read? Why it's 5 megabytes? Could this slow down everything?
Note, that it's the same value in all 3 backtraces.
http://bugs.digium.com/view.php?id=1 0x00000000004db0d7 in read_char
(el=0x96ac70, cp=0x7fffc6d954c6 "") at
read.c:296^
num_read = 5116828^
tried = 0^
Issue History
Date Modified Username Field Change
======================================================================
09-24-07 04:53 atis Note Added: 0071023
======================================================================
More information about the asterisk-bugs
mailing list