|Summary:||ASTERISK-08050: memleak in chan_sip|
|Reporter:||Roy Sigurd Karlsbakk (rkarlsba)||Labels:|
|Date Opened:||2006-11-02 07:51:31.000-0600||Date Closed:||2006-11-21 06:40:05.000-0600|
|Environment:||Attachments:||( 0) memallocs.txt.gz|
( 1) memsummary.txt.gz
( 2) roykpatch.txt
some two hours ago, asterisk just started to eat memory like a hungry horse, and has now allocated almost 200 megs since it started. nothing has happened, and I see nothing in the logs. I have full debug logs, but it's far too much to go through (300 megs so far since midnight).
Attached are output from 'show memory summary/allocations'
|Comments:||By: Russell Bryant (russell) 2006-11-02 08:24:57.000-0600|
Is this code patched? The line numbers provided in the ASTMM output do not match the code in 1.2.13, or the current 1.2 branch.
By: Roy Sigurd Karlsbakk (rkarlsba) 2006-11-02 08:52:02.000-0600
just the 1.2 jitterbuffer code, although there's no jitterbuffering on the box since it's only doing SIP/SIP. The system's been running stably without leak for ages until I upgraded to 1.2.13
By: Olle Johansson (oej) 2006-11-07 09:42:35.000-0600
what did you upgrade from?
By: Roy Sigurd Karlsbakk (rkarlsba) 2006-11-07 10:40:37.000-0600
By: Olle Johansson (oej) 2006-11-07 15:59:47.000-0600
I think I know the issue here. Because of the timer changes, we expose an issue where a reply comes in to a dialog at the same time as we're working on destruction of the very same dialog. If that happens, pvt->packets are deleted by sip_ack and then sip_destroy stops with an error message, not freeing the memory structures or string fields.
Will try to come up with a patch.
By: Olle Johansson (oej) 2006-11-08 03:41:46.000-0600
first try - try this patch. Thanks.
By: Olle Johansson (oej) 2006-11-10 13:09:06.000-0600
Roy - please wake up!
By: Roy Sigurd Karlsbakk (rkarlsba) 2006-11-13 04:34:42.000-0600
I'm awake :) Patching up asterisk and trying.......
By: Roy Sigurd Karlsbakk (rkarlsba) 2006-11-14 04:35:19.000-0600
It looks good for now, but please give it another few days to show it's fixed
By: Olle Johansson (oej) 2006-11-14 05:08:27.000-0600
Committed patch to 1.2 trunk, 1.4 and svn trunk. Will keep open for a few days.
By: Anthony LaMantia (alamantia) 2006-11-20 14:11:26.000-0600
roy are you happy with the results of the patch?
By: Roy Sigurd Karlsbakk (rkarlsba) 2006-11-21 05:44:11.000-0600
Indeed! This works well
Please close this