|Summary:||ASTERISK-16288: Memory leak on reload|
|Reporter:||Jeremy B (captainjez)||Labels:|
|Date Opened:||2010-06-24 20:20:24||Date Closed:||2011-06-07 14:00:39|
|Environment:||Attachments:||( 0) memory_output.zip|
|Description:||I've compiled a fresh version of Asterisk 18.104.22.168 under FreeBSD 8.0, however on a "dialplan reload" or "module reload" the memory usage of Asterisk jumps on average by around 100k in size. When I reduce the hash_users, hash_peers and hash_dialogs sizes down from the defaults, the memory jump is reduced to around 10-15k on average. I've set them to:|
I'm able to always reproduce this, i've tried removing modules to see if there's something specific causing a leak, however to no avail.
Details are as follows:
FreeBSD 8.0-RELEASE-p3 #0: Wed May 26 05:45:12 UTC 2010 firstname.lastname@example.org:/usr/obj/usr/src/sys/GENERIC
Asterisk was compiled from source, the version in ports tree is too far behind so we can't use this.
Happy to provide any other information required to assist.
|Comments:||By: Jeremy B (captainjez) 2010-06-26 18:43:31|
I've just built Asterisk 22.214.171.124 and i'm still having the issue. I'm not running DAHDi, and i've got the following modules loaded:
By: Tilghman Lesher (tilghman) 2010-06-27 22:03:42
Compile with MALLOC_DEBUG and get the output of "memory show summary" and "memory show allocations", then do a "module reload", repeat the first two commands, and upload all of the output as files to this issue.
By: Jeremy B (captainjez) 2010-06-27 23:57:01
I've uploaded the information as requested.
By: Tilghman Lesher (tilghman) 2010-06-28 11:18:16
I honestly don't see any memory leak in that output. If there's any real memory leak, it's either in one of the 3rd party libraries loaded or it's just normal Linux memory allocation and nothing to be concerned with.
By: Tilghman Lesher (tilghman) 2010-06-28 15:26:10
If you can show a slow memory leak that manifests in the information that you've provided, then we can take a look at that, but right now, there isn't anything else that we can see is wrong.
By: Jeremy B (captainjez) 2010-06-28 15:53:16
I'll gather some more data for you over the next couple of days.
By: Jeremy B (captainjez) 2010-06-28 15:54:05
Also to note this is freebsd not Linux.
By: Digium Subversion (svnbot) 2010-07-10 10:11:01
r275469 | russell | 2010-07-10 10:11:01 -0500 (Sat, 10 Jul 2010) | 29 lines
Merged revisions 245192 via svnmerge from
r245192 | mmichelson | 2010-02-06 08:43:03 -0600 (Sat, 06 Feb 2010) | 21 lines
Remove useless sip options related to hash table size.
First off, these options weren't actually doing anything.
By the time the options were parsed, the peer and dialog
containers had already been allocated with their default
Second, hash table size is something that doesn't really
make sense to change in a config file. If a user is that
interested in changing the hashtable size, he can modify
the source itself.
I have removed the parsing of the hash_peer, hash_user,
and hash_dialog options. I have removed the hash_user_size
variable altogether since it is not used at all. I also
changed hash_peer_size and hash_dialog_size to be constant,
and have changed the symbols to be in all caps as constants
typically are. I have also removed the entire section in
sip.conf.sample regarding configurable hashtable sizes.
(merge to 1.6.2 inspired by issue ASTERISK-16288)
By: Leif Madsen (lmadsen) 2010-07-21 12:26:53
Also I see res_timing_pthread being in use here -- please test after this revision: http://svn.digium.com/view/asterisk?view=rev&revision=278465
The system should be much more stable with res_timing_pthread.
By: Paul Belanger (pabelanger) 2010-08-04 11:56:02
Suspended due to lack of activity. Please request a bug marshal in #asterisk-bugs on the IRC network irc.freenode.net to reopen the issue should you have the additional information requested.
Further information can be found at http://www.asterisk.org/developers/bug-guidelines