[asterisk-bugs] [JIRA] (ASTERISK-28521) pjsip: Memory Leak

Mark (JIRA) noreply at issues.asterisk.org
Sun Sep 22 02:39:48 CDT 2019


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

Mark edited comment on ASTERISK-28521 at 9/22/19 2:39 AM:
----------------------------------------------------------

My results with pjsip 2.8 (again 5 reg. numbers, 7 endpoints)

* memory show summary - after start
5270112 bytes in        382 allocations in file ../src/pj/pool_policy_malloc.c

* memory show summary - 24h and a few test calls later it's almost identical
5383008 bytes in        389 allocations in file ../src/pj/pool_policy_malloc.c

Compared to tests with 2.9 + diff 30,31 above, memory consumption as show with 'top' is almost the same after >24h. Also, when inspecting graphs from my monitoring system regarding cpu/memory, at least i don't see any real differences between 2.8/2.9 + diff 30,31 here. CPU user time stays < 6% during a call.



was (Author: mpa):
My results with pjsip 2.8 (again 5 reg. numbers, 7 endpoints)

* memory show summary - after start
5270112 bytes in        382 allocations in file ../src/pj/pool_policy_malloc.c

* memory show summary - 2,5h and multiple calls later it's almost identical
5383008 bytes in        389 allocations in file ../src/pj/pool_policy_malloc.c

Compared to tests with 2.9 + diff 30,31 above, memory consumption as show with 'top' is almost the same after >24h. Also, when inspecting graphs from my monitoring system regarding cpu/memory, at least i don't see any real differences between 2.8/2.9 + diff 30,31 here. CPU user time stays < 6% during a call.


> pjsip: Memory Leak
> ------------------
>
>                 Key: ASTERISK-28521
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28521
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip, Resources/res_pjsip_outbound_registration
>    Affects Versions: 16.4.0, 16.4.1, 16.5.0
>         Environment: Asterisk 16.5.0, OpenBSD 6.6-beta
>            Reporter: Mark
>            Assignee: George Joseph
>              Labels: patch, pjsip
>         Attachments: 0001-pjproject_bundled-Revert-pjproject-commits-causing-l.patch, 0030-revert_ssl.patch, 0031-revert_ssl.patch, pjsip.ast2.conf, pjsip.conf, pjsip.conf, summary_12h, summary_start, test_revert_ssl_remote_cert.patch
>
>
> After updating OpenBSD 6.6-current about 4 weeks ago, i've also
> updated Asterisk 16.4.0 -> 16.4.1. Since then, Asterisk started 
> using more and more memory. Right now, i'm running Asterisk 
> 16.5.0 and OpenBSD 6.6-beta in a very small test environment and 
> i still see the same issue.
> Weeks ago, Asterisk started with ~60MB and stayed around that 
> value...now it starts with ~60MB and increases by 80MB/24h 
> without any calls made.
> After compiling with MALLOC_DEBUG and running "memory show 
> summary" every few hours, there's only one line that goes through 
> the roof:
> * after start
>  5542784 bytes in        464 allocations in file ../src/pj/pool_policy_malloc.c
> * 12h later
> 67805312 bytes in      25962 allocations in file ../src/pj/pool_policy_malloc.c
> The same applies for "memory show allocations":
> * after start
> $ grep "pool_policy_malloc.c" allocations_start | wc -l
> 468
> * 12h later
> $ grep "pool_policy_malloc.c" allocations_12h | wc -l
> 25968
> The only setting that stops Asterisk from allocating more and more
>  memory is, when removing "registration" and "endpoints" from
>  pjsip.conf. This way, Asterisk only listens on 5061 TLS and does 
> nothing.



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



More information about the asterisk-bugs mailing list