[Home]

Summary:ASTERISK-18247: Asterisk taking up 673 mb of ram in idle state
Reporter:Jacco van Tuijl (jacco)Labels:
Date Opened:2011-08-09 02:57:39Date Closed:2011-09-14 16:37:53
Priority:MajorRegression?
Status:Closed/CompleteComponents:PBX/General
Versions:1.8.5.0 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-18250 Resource leak in timerfd
Environment:debian squeezeAttachments:( 0) backtrace_crash_11-08-11.txt
( 1) gdb_output
Description:over time asterisk takes up more and more memory until the system runs out of resources and asterisk stops functioning
Comments:By: Jacco van Tuijl (jacco) 2011-08-09 03:18:24.925-0500

gdb -p `pidof asterisk` -ex 'thread apply all bt full' -ex detach -ex quit >gdb_output

By: Jacco van Tuijl (jacco) 2011-08-09 03:21:25.159-0500

one thing I noticed in the gdb outout is:
0x0817367e in inotify_daemon (data=0x0) at stdtime/localtime.c:290
       buf = {iev = {wd = 0, mask = 0, cookie = 0, len = 0, name = 0xb738b304 ""},
         name = '\000' <repeats 2856 times>

it might be related and seems a bit useless to me to repeat \000 2856 times

By: Jacco van Tuijl (jacco) 2011-08-10 05:25:19.582-0500

using dahadi as timing solves the memory leak for me; timerfd is the source of the memory leak
this bug is related:
https://issues.asterisk.org/jira/browse/ASTERISK-18250

my advice is to remove timerfd from release version until it's stable; or at least not make it de default timing module.


By: Jacco van Tuijl (jacco) 2011-08-10 05:25:20.137-0500

using dahadi as timing solves the memory leak for me; timerfd is the source of the memory leak
this bug is related:
https://issues.asterisk.org/jira/browse/ASTERISK-18250

my advice is to remove timerfd from release version until it's stable; or at least not make it de default timing module.


By: singler (singler) 2011-08-11 01:12:05.854-0500

I am using asterisk 1.8.5 on 32 bit debian squeeze. Today I experienced asterisk crash.
In syslog: kernel: [9552804.194007] asterisk[10583]: segfault at 4 ip b57db4d2 sp b17fe230 error 4 in chan_sip.so[b5768000+b3000]
I am using dahdi timer because of "threadlock" in asterisk (issue ASTERISK-18142)
I am reporting here because size of core dump was 3GB on idle system so I suspect a memory leak.
I am attaching backtrace_crash_11-08-11.txt

By: Leif Madsen (lmadsen) 2011-09-14 16:37:53.561-0500

Closing this issue as the source was res_timing_timerfd (although honestly I saw in the backtrace res_timing_pthread which is not recommended).

As of Asterisk 1.8.7.0-rc1 res_timing_timerfd should be ready for use.