[asterisk-bugs] [Asterisk 0017234]: [patch] Memory leak in manager.c

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Jun 1 11:42:04 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17234 
====================================================================== 
Reported By:                mav3rick
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   17234
Category:                   Core/ManagerInterface
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Target Version:             1.6.2.9
Asterisk Version:           1.6.2.7-rc2 
JIRA:                       SWP-1333 
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:             2010-04-23 06:02 CDT
Last Modified:              2010-06-01 11:42 CDT
====================================================================== 
Summary:                    [patch] Memory leak in manager.c
Description: 
I detected a memory leak in manager.c, on latest Asterisk 1.6.2.7-rc2.
Leak is reproductible in 1.6.2.6.

   6622144 bytes in 30993 allocations in file 'manager.c'
   7100873 bytes in 33065 allocations in file 'manager.c'
   7352505 bytes in 34160 allocations in file 'manager.c'
   7636791 bytes in 35405 allocations in file 'manager.c'
   8039968 bytes in 37165 allocations in file 'manager.c'
   9430346 bytes in 43322 allocations in file 'manager.c'

I'm sending Originate (async) AMI commands using the built-in HTTP
server.

Attached: valgrind run with --leak-check=full --show-reachable=yes, and
"memory show allocations". Asterisk was compiled with MALLOC_DEBUG and
DONT_OPTIMIZE.


======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0017365 Race condition causes manager session e...
====================================================================== 

---------------------------------------------------------------------- 
 (0122708) svnbot (reporter) - 2010-06-01 11:42
 https://issues.asterisk.org/view.php?id=17234#c122708 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 266683

_U  branches/1.6.2/
U   branches/1.6.2/main/manager.c

------------------------------------------------------------------------
r266683 | tilghman | 2010-06-01 11:42:02 -0500 (Tue, 01 Jun 2010) | 23
lines

Merged revisions 266682 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r266682 | tilghman | 2010-06-01 11:41:00 -0500 (Tue, 01 Jun 2010) | 16
lines
  
  Eliminate stale manager events after a set interval, even if AMI clients
don't query for them.
  
  Actions (or failures to act) by external clients should not cause memory
leaks
  in Asterisk, especially when those continued leaks could cause Asterisk
to
  misbehave later.
  
  (closes issue https://issues.asterisk.org/view.php?id=17234)
   Reported by: mav3rick
   Patches: 
         20100510__issue17234.diff.txt uploaded by tilghman (license 14)
         20100517__issue17234__trunk.diff.txt uploaded by tilghman
(license 14)
   Tested by: mav3rick, davidw
  
  (closes issue https://issues.asterisk.org/view.php?id=17365)
   Reported by: davidw
........

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-06-01 11:42 svnbot         Checkin                                      
2010-06-01 11:42 svnbot         Note Added: 0122708                          
======================================================================




More information about the asterisk-bugs mailing list