[asterisk-dev] Tracking down IAX2 memory leak in 1.8.4.2

Alex Villací­s Lasso a_villacis at palosanto.com
Wed Jun 29 14:42:56 CDT 2011


El 28/06/11 18:57, Alex Villací­s Lasso escribió:
> I am trying to track down the root cause of Asterisk bug #17339 (https://issues.asterisk.org/jira/browse/ASTERISK-17339). In asterisk 1.8.4 and later, if there are many IAX2 extensions registered (20 or more), Asterisk starts eating memory - starts at 60 
> Mb, and goes up to 500 Mb after one day. I have found a clue in /proc/ASTERISK_PID/maps that suggests that this is a thread resource mismanagement - possibly stale thread stacks littered at the end of the process memory map. Could you please review my 
> short analysis at the bug report and tell me if there is anything wrong with it?
I have uploaded a small patch that fixes the issue for me. The patch just detaches the thread when it is about to exit and the thread structure indicates that there was no explicit stop. It seems to work for me during a ongoing two-hour run.



More information about the asterisk-dev mailing list