[asterisk-bugs] [JIRA] (ASTERISK-22945) [patch] Memory leak in chan_sip.c with realtime autoclear

ibercom (JIRA) noreply at issues.asterisk.org
Thu Jun 12 13:31:57 CDT 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-22945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=219389#comment-219389 ] 

ibercom edited comment on ASTERISK-22945 at 6/12/14 1:30 PM:
-------------------------------------------------------------

The first one, my English is bad.

My patch is for asterisk 11.7 and it has worked for asterisk 11.9 and 11.10 now.
I haven't had problems and no crash. My system has a big load:

asterisk*CLI> core show uptime
System uptime: 1 week, 5 days, 1 hour, 21 minutes, 58 seconds
Last reload: 1 week, 3 days, 5 hours, 35 minutes, 59 seconds

asterisk1*CLI> core show calls
33 active calls
165771 calls processed

Now sip peers and peer objects are synchronized:

2265 sip peers [Monitored: 2265 online, 0 offline Unmonitored: 0 online, 0 offline]
= Peer objects: 2265 static, 0 realtime, 1 autocreate =

The patch is very simple but it works.



was (Author: ibercom):
The first one, my English is bad.

My patch is for asterisk 11.7 and it has worked for asterisk 11.9 and 11.10 now.
I haven't had problems and no crash. My system has a big load:

asterisk*CLI> core show uptime
System uptime: 1 week, 5 days, 1 hour, 21 minutes, 58 seconds
Last reload: 1 week, 3 days, 5 hours, 35 minutes, 59 seconds

asterisk1*CLI> core show calls
33 active calls
165771 calls processed

Now sip peers and peer objects are synchronized:

2265 sip peers [Monitored: 2265 online, 0 offline Unmonitored: 0 online, 0 offline]
-= Peer objects: 2265 static, 0 realtime, 1 autocreate =-

The patch is very simple but it works.


> [patch] Memory leak in chan_sip.c with realtime autoclear
> ---------------------------------------------------------
>
>                 Key: ASTERISK-22945
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22945
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General
>    Affects Versions: 11.6.0
>            Reporter: ibercom
>         Attachments: asterisk11-chan_sip-simplifies.patch, asterisk11.patch, cli-command.txt, memory-allocations.gz
>
>
> I have 2 servers with SIP realtime config and asterisk 1.8 and 11 each one.
> Server 1.8 have about 2000 register peers without obvious problems.
> Server 11 have about 20 register peers and chan_sip.c is constantly leaking memory with each call to the other peers.
> The SIP realtime config is the same:
> rtcachefriends=yes
> rtsavesysname=yes
> rtupdate=yes
> rtautoclear=yes		<< I think than here is the problem
> ignoreregexpire=yes
> When Server 11 look for some peer (not register peer) in sippeers table, it works with this info. Another (+1) static (realtime?) object. When the registration expires, memory leak. You can look for the same peer after some time and asterisk allocates memory again and it isn't freed.
> I have attached cli-command.txt which shows the asterisk's state with only 112 calls processed.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list