[Freeswitch-dev] How can I detect the cause of a potential memory leak?

Anthony Minessale anthony.minessale at gmail.com
Mon Nov 14 20:41:07 MSK 2011


valgrind is your best bet:

valgrind --tool=memcheck --log-file=vg.log --leak-check=full
--leak-resolution=high --show-reachable=yes
/usr/local/freeswitch/bin/freeswitch -vg


run this on normal traffic for a while and get the log file.


if you unload mods it would not help with a leak but it would with a
swelling pool.



On Mon, Nov 14, 2011 at 11:30 AM, François Delawarde <
fdelawarde at wirelessmundi.com> wrote:

> Hello,
>
> I'm experiencing what I think is a memory leak in a production system
> with a recent git (2-Nov), with FS consuming >5GB and increasing after a
> few days with never more than 10 calls at once.
>
> While the users are not experiencing problems so far, I'm a bit worried.
> So I have a few questions:
>
> - How can I be sure it's a leak and not some memory pool thing that FS
> would free when the system needs (system has 10GB total)?
>
> - If I unload modules one by one, is the memory used by this module
> freed immediately?
>
> - What would be a "good" way to try and narrow down the cause? Is
> valgrind a good tool for that?
>
> Of course I'll try with GIT HEAD and try my best to find the cause
> before considering to add a new Jira issue, otherwise it's quite
> useless.
>
>
> Thanks,
> François.
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20111114/4afc595d/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list