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

Mark (JIRA) noreply at issues.asterisk.org
Sun Sep 15 02:33:47 CDT 2019


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

Mark commented on ASTERISK-28521:
---------------------------------

{quote}I assume you were still running with the udp transport?{quote}

Yes

{quote}As well just to be clear the only messages being transmitted are REGISTERs and OPTIONs correct?{quote}

Yes, normal keep alive messages

{quote}What happens if you've configured it to use the tls transport, but set the qualify_frequency=0 (essentially disabling OPTIONs)?{quote}

I've tried this before with no luck. Asterisk starts with app 60MB allocated and reaches 150MB in under a day.

{quote}I've setup a test here between two Asterisk instances, with instance 1 registering (using your configuration) to instance 2. So far I have not seen memory really going up. I even made a bunch of outbound calls.{quote}

Are you also running OpenBSD for your tests? I'm not 100% sure right now (needs more testing), but i see differences when running Asterisk 16.5.1 with OpenBSD 6.5 (no memory increase) and OpenBSD 6.6-beta.

> pjsip: Memory Leak
> ------------------
>
>                 Key: ASTERISK-28521
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28521
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/General
>    Affects Versions: 16.4.0, 16.4.1, 16.5.0
>         Environment: Asterisk 16.5.0, OpenBSD 6.6-beta
>            Reporter: Mark
>            Assignee: Mark
>              Labels: pjsip
>         Attachments: pjsip.conf, summary_12h, summary_start
>
>
> 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