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

Corey Farrell (JIRA) noreply at issues.asterisk.org
Mon Oct 7 09:56:47 CDT 2019


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

Corey Farrell commented on ASTERISK-28568:
------------------------------------------

[~gjoseph] the numbers are in kb so that's actually an 18mb increase.  That said we're looking at RSS which shows the amount of memory that is actually in RAM (excluding swapped memory).  Normally the reload functions would not need to be in RSS but executing `core reload` causes the reload functions of every module to execute, thus preventing them from being swapped out.  I don't think RSS is useful for identifying memory leaks since it doesn't tell us how much we've allocated, it tells us what the kernel thinks should not be swapped.

If VSZ were to increase by significant amounts after each reload that could be interesting, though not helpful to isolate the cause.  Since core reload acts on the whole system we would need information provided by MALLOC_DEBUG or other output which can identify the source of different allocations.  Note some increase of VSZ after the first could reloads is expected, this is the result of memory fragmentation (in stringfields for example).

> 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