[asterisk-bugs] [Asterisk 0018924]: [patch] uncached realtime peers are put in peers_by_ip => memory leak
Asterisk Bug Tracker
noreply at bugs.digium.com
Tue Mar 8 12:48:12 CST 2011
The following issue is now READY FOR REVIEW.
======================================================================
https://issues.asterisk.org/view.php?id=18924
======================================================================
Reported By: wdoekes
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 18924
Category: Channels/chan_sip/General
Reproducibility: always
Severity: major
Priority: normal
Status: ready for review
Asterisk Version: 1.6.2.17
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2011-03-04 01:53 CST
Last Modified: 2011-03-08 12:48 CST
======================================================================
Summary: [patch] uncached realtime peers are put in
peers_by_ip => memory leak
Description:
Hi,
I was having problems with UDP leaks at first. This was kindly fixed by
rgagnon with his patch in https://issues.asterisk.org/view.php?id=17255. After
applying that fix, I noticed that
memory usage was *still* increasing.
I've managed to trace the problem to the following:
Peers are put in the peers_by_ip list in parse_register_contact. However,
only if the peer is static or cached(-realtime), does it get a scheduled
expire_register() call. The expire_register makes sure the peer gets
removed from the global 'peers' and 'peers_by_ip' list.
These uncached realtime peers should not be in any of those lists, but
they are in the peers_by_ip list. (Which was hard to see, because the sip
show objects only shows the 'peers' container.)
Furthermore, when asterisk is stopped with 'core stop gracefully', these
peers from these two containers are properly unreferenced: the refcount
utility shows no problem.
But, in the mean time, asterisk has been eating away memory because it
keeps on adding peers to the peers_by_ip list which are never removed.
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0017255 [patch] UDP ports not freed/ports leaking
child of 0018027 memory leak in chan_sip.c
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2011-03-08 12:48 lmadsen Status new => ready for review
======================================================================
More information about the asterisk-bugs
mailing list