[Freeswitch-users] memory leak

Anthony Minessale anthony.minessale at gmail.com
Wed Jul 13 21:40:55 MSD 2011


Try this commit (or newer)  I think it fixes the problem

commit e339b549e014f30c5de256cf2b3ba94a91bb06e3
Author: Anthony Minessale <anthm at freeswitch.org>
Date:   Wed Jul 13 10:37:32 2011 -0500

    FS-3386 this is probably relevant, try this revision




On Wed, Jul 13, 2011 at 11:59 AM, Stephen Wilde <wstephen80 at gmail.com> wrote:
> I had a similar issue with commit 9cf44f3a5ee7cba9fc378447780499d41c4de671
> of 6 July with a memory increase rate of 2Gb/day but now I have done a
> revert to an old commit (2246f3ca75eee93a7e7f4409aa816513b99e657a) for a
> reason not related to the memory leak.
> For this reason I have not yet open a jira.
> Due to a feature released recently, I'll do a git pull in next hours so I'll
> share the info I have.
> Stephen
>
> On Wed, Jul 13, 2011 at 5:27 PM, Tihomir Culjaga <tculjaga at gmail.com> wrote:
>>
>> hello,
>>
>> i upgraded to the latest GIT compiled configured FS without any issues...
>> everything looks great... but when i put this into some traffic i noticed FS
>> uses more and more memory... until it finished into swap. I didn't have
>> issues like that previously but unfortunately i cannot recall what was the
>> version with no issues.
>>
>> The server is 64bit CentOS 5.4 and the FS version is the latest (well 4
>> days old tops). Im using just the standard modules (the list provided below)
>> and FS keeps leaking memory
>>
>>     <load module="mod_console"/>
>>     <load module="mod_logfile"/>
>>     <load module="mod_enum"/>
>>     <load module="mod_cdr_csv"/>
>>     <load module="mod_event_socket"/>
>>     <load module="mod_sofia"/>
>>     <load module="mod_loopback"/>
>>     <load module="mod_commands"/>
>>     <load module="mod_conference"/>
>>     <load module="mod_db"/>
>>     <load module="mod_dptools"/>
>>     <load module="mod_expr"/>
>>     <load module="mod_fifo"/>
>>     <load module="mod_hash"/>
>>     <load module="mod_voicemail"/>
>>     <load module="mod_esf"/>
>>     <load module="mod_fsv"/>
>>     <load module="mod_cluechoo"/>
>>     <load module="mod_valet_parking"/>
>>     <load module="mod_dialplan_xml"/>
>>     <load module="mod_dialplan_asterisk"/>
>>     <load module="mod_spandsp"/>
>>     <load module="mod_g723_1"/>
>>     <load module="mod_g729"/>
>>     <load module="mod_amr"/>
>>     <load module="mod_ilbc"/>
>>     <load module="mod_speex"/>
>>     <load module="mod_h26x"/>
>>     <load module="mod_siren"/>
>>     <load module="mod_sndfile"/>
>>     <load module="mod_native_file"/>
>>     <load module="mod_local_stream"/>
>>     <load module="mod_tone_stream"/>
>>     <load module="mod_spidermonkey"/>
>>     <load module="mod_lua"/>
>>     <load module="mod_say_en"/>
>>
>>
>> This is the dialplan im triggering...
>>
>>    <extension name="doRedirect">
>>       <condition field="destination_number" expression="^300030.*$">
>>          <action application="info"/>
>>          <action application="redirect"
>> data="<sip:0999901234567889 at 10.1.1.11:5060;user=phone>;q=0.99"/>
>>          <action application="hangup"/> <!-- well ... not really needed
>> but only Got knows for sure-->
>>       </condition>
>>    </extension>
>>
>> I have i have tried a pure "hello world" dialplan as:
>>
>>    <extension name="testDP">
>>       <condition field="destination_number" expression="^300030.*$">
>>          <action application="info"/>
>>          <action application="hangup"/>
>>       </condition>
>>    </extension>
>>
>> But the situation is exactly the same.
>>
>>
>>
>> This is the behavior i'm having .... memory just keep growing and growing
>> until it hits the swap where the server is doomed.
>>
>>  tail -f smaps_log.log (this is from cat /proc/$PID/smaps | grep heap)
>> TIM,SIZE,RSS,SHARED_CLEAN,SHARED_DIRTY,PRIVATE_CLEAN,PRIVATE_DIRTY,SWAP
>> 2011-07-13 13:50:34,19268,18916,0,0,0,18916,0
>> 2011-07-13 13:51:34,19268,18972,0,0,0,18972,0
>> 2011-07-13 13:52:34,20324,20088,0,0,0,20088,0
>> 2011-07-13 13:53:34,21264,20920,0,0,0,20920,0
>> 2011-07-13 13:54:34,21048,20856,0,0,0,20856,0
>> 2011-07-13 13:55:35,22396,22076,0,0,0,22076,0
>> 2011-07-13 13:56:35,22396,22164,0,0,0,22256,0
>> 2011-07-13 13:57:35,23220,22936,0,0,0,22936,0
>> 2011-07-13 13:58:35,23480,23288,0,0,0,23288,0
>>
>> $ tail -f mem.log (this is from ps)
>> TIMESTAMP            PID  RSS    %MEM
>> 2011-07-13 13:48:55  2405 65144 12.8
>> 2011-07-13 13:49:55  2405 66932 13.2
>> 2011-07-13 13:50:55  2405 69576 13.7
>> 2011-07-13 13:51:55  2405 71552 14.1
>> 2011-07-13 13:52:55  2405 73576 14.5
>> 2011-07-13 13:53:55  2405 75804 14.9
>> 2011-07-13 13:54:55  2405 78388 15.4
>> 2011-07-13 13:55:55  2405 80544 15.9
>> 2011-07-13 13:56:55  2405 81784 16.1
>> 2011-07-13 13:57:55  2405 83720 16.5
>> 2011-07-13 13:58:55  2405 86524 17.0
>>
>>
>>
>>
>> FS runs under root account and it is started as:
>>
>> /usr/local/freeswitch/bin/freeswitch -nc -nonat -db /dev/shm -conf
>> /usr/local/freeswitch/conf/ -log /usr/local/freeswitch/log/ -run
>> /usr/local/freeswitch/run/
>>
>>
>> Also ulimit is like this;
>>
>>         ulimit -c unlimited
>>         ulimit -d unlimited
>>         ulimit -f unlimited
>>         ulimit -i unlimited
>>         ulimit -n 999999
>>         ulimit -q unlimited
>>         ulimit -u unlimited
>>         ulimit -v unlimited
>>         ulimit -x unlimited
>>         ulimit -s 240
>>         ulimit -l unlimited
>>
>>
>> so, does anyone have a clue on why the memory goes up ?
>> ... what I'm doing wrong ?
>>
>> Regards,
>> Tihomir.
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Join us at ClueCon 2011, Aug 9-11, Chicago
>> http://www.cluecon.com 877-7-4ACLUE
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900



More information about the FreeSWITCH-users mailing list