[asterisk-bugs] [Asterisk 0014037]: Memory usage increase when using SUBSCRIBE + vars defined in sip.conf

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Dec 16 09:56:40 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14037 
====================================================================== 
Reported By:                marvinek
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   14037
Category:                   Channels/chan_sip/Subscriptions
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.22 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-12-09 04:39 CST
Last Modified:              2008-12-16 09:56 CST
====================================================================== 
Summary:                    Memory usage increase when using SUBSCRIBE + vars
defined in sip.conf
Description: 
I have a peer defined in sip.conf with pre-set variables (see excerpt
bellow)
and subscription enabled for that peer. I can see ( by memory show summary
) that  all variables get allocated again with each subscribe request from
the phone. These allocations do not get ever released until phone is
restarted an re-registers (propably with different session id ?). This
results in asterisk eating up all memory. I can reproduce this with
Grandstream GXP-2000 , Linksys SPA96 and asterisk Releases 1.4.11, 1.4.22  
  

memory show ... shows increasing allocations in config.c
When I remove pre-defined vars from sip.conf problem disappears.

  
====================================================================== 

---------------------------------------------------------------------- 
 (0096448) svnbot (reporter) - 2008-12-16 09:56
 http://bugs.digium.com/view.php?id=14037#c96448 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 164672

U   branches/1.4/channels/chan_sip.c

------------------------------------------------------------------------
r164672 | russell | 2008-12-16 09:56:40 -0600 (Tue, 16 Dec 2008) | 11
lines

Fix a memory leak related to the use of the "setvar" configuration option.

The problem was that these variables were being appended to the list of
vars
on the sip_pvt every time a re-registration or re-subscription came in.
Since it's just a waste of memory to put them there unless the request was
an
INVITE, then the fix is to check the request type before copying the vars.

(closes issue http://bugs.digium.com/view.php?id=14037)
Reported by: marvinek
Tested by: russell

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=164672 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-12-16 09:56 svnbot         Checkin                                      
2008-12-16 09:56 svnbot         Note Added: 0096448                          
======================================================================




More information about the asterisk-bugs mailing list