[asterisk-bugs] [JIRA] (ASTERISK-28568) Potential memory leak on core reload

George Joseph (JIRA) noreply at issues.asterisk.org
Mon Oct 7 06:28:47 CDT 2019


     [ https://issues.asterisk.org/jira/browse/ASTERISK-28568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Joseph updated ASTERISK-28568:
-------------------------------------

    Assignee: Michael Maier
      Status: Waiting for Feedback  (was: Triage)

After so many reloads, 18Kb isn't really unreasonable.  With a lot of activity, the memory allocated to Asterisk by the operating system becomes fragmented into smaller contiguous chunks so if Asterisk needs a larger chunk than is available, the glibc runtime has to ask the operating system for more memory.  

Try this...

If you configure Asterisk with --enable-devmode there should be a CLI command called "malloc trim".  What it does is try to return free memory to the operating system.  Run it a few times in quick succession then check the resident memory utilization and see what happens.


> Potential memory leak on core reload
> ------------------------------------
>
>                 Key: ASTERISK-28568
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28568
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Configs/Basic-PBX
>    Affects Versions: 16.5.0
>         Environment: CentOS 7 64Bit x86_64
>            Reporter: Michael Maier
>            Assignee: Michael Maier
>            Severity: Minor
>         Attachments: etc_asterisk.tar.gz, memory-consumption-reload.csv
>
>
> Executing "core reload"s seem to consume more and more memory. 
> This is an example done with the attached simple configuration (based on FreePBX 14). Memory usage is measured with
> ps aux | grep sbin/asterisk | grep -v grep
> The memory value in the attached sheet is based on the RSS column of ps.
> Most reloads are done without any change. If there are more trunks / extensions, routes, ... the memory usage is growing much faster.



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



More information about the asterisk-bugs mailing list