[asterisk-bugs] [Asterisk 0019108]: [patch] [regression] "sip prune" does not clean the relevant peer objects -> memleak

Asterisk Bug Tracker noreply at bugs.digium.com
Thu May 5 13:39:45 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19108 
====================================================================== 
Reported By:                vrban
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   19108
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Target Version:             1.4/1.6.2 Issues (Final Release)
Asterisk Version:           1.4.40 
JIRA:                       SWP-3326 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2011-04-12 10:58 CDT
Last Modified:              2011-05-05 13:39 CDT
====================================================================== 
Summary:                    [patch] [regression] "sip prune" does not clean the
relevant peer objects -> memleak
Description: 
a "sip prune realtime peer" cmd does not delete/clean the relevant Peer
object.
So if you extensively use "sip prune" cmd with sip realtime, you have a
nice mem leak. on one of our asterisk e.g.:  

asterisk -rx'sip show objects' |grep static
-= User objects: 1944 static, -359 realtime =-
-= Peer objects: 833682 static, -832764 realtime, 0 autocreate =-

so we have 833682! peer objects, but real peer number is 1944 (we prune
only the peer) so asterisk use around 500MB with this 833682 Peer objects.
====================================================================== 

---------------------------------------------------------------------- 
 (0134525) svnbot (reporter) - 2011-05-05 13:39
 https://issues.asterisk.org/view.php?id=19108#c134525 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 317281

_U  branches/1.8/
U   branches/1.8/channels/chan_sip.c

------------------------------------------------------------------------
r317281 | russell | 2011-05-05 13:39:44 -0500 (Thu, 05 May 2011) | 29
lines

Merged revisions 317255 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r317255 | russell | 2011-05-05 13:29:53 -0500 (Thu, 05 May 2011) | 22
lines
  
  Merged revisions 317211 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r317211 | russell | 2011-05-05 13:20:29 -0500 (Thu, 05 May 2011) | 15
lines
    
    chan_sip: fix broken realtime peer count, fix memory leak
    
    This patch addresses two bugs in chan_sip:
    
    1) The count of realtime peers and users was off.  The increment
checked the
    value of the caching option, while the decrement did not.
    
    2) Add a missing regfree() for a regex.
    
    (closes issue https://issues.asterisk.org/view.php?id=19108)
    Reported by: vrban
    Patches:
          missing_regfree.patch uploaded by vrban (license 756)
          sip_object_counter.patch uploaded by vrban (license 756)
  ........
................

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-05-05 13:39 svnbot         Checkin                                      
2011-05-05 13:39 svnbot         Note Added: 0134525                          
======================================================================




More information about the asterisk-bugs mailing list