[Home]

Summary:ASTERISK-28064: Memory leak issue in json.c, endpoints.c and stasis_channels.c While using AMI
Reporter:Mohit Dhiman (mohitdhiman)Labels:endpoints.c json.c memory stasis_channels.c
Date Opened:2018-09-20 08:53:14Date Closed:2020-01-14 11:14:01.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:General
Versions:13.16.0 Frequency of
Occurrence
Frequent
Related
Issues:
Environment:Centos 7Attachments:( 0) memory_show_summary_memory_leak.txt
( 1) memory_show_summary_normal_case.txt
Description:I am using Asterisk through AMI and at a time call flow is around 250 calls at any time, now every 1 and half day later asterisk resource memory tends to increase very high because of which alot of AMI disconnection is happening.
when i executed command 'memory show summary' during a normal case and high memory usage case i found few files that were allocated high amount of memory like:
high memory case:
json.c   351997999 bytes
endpoints.c  3063068552 bytes
stasis_channels.c  658183761 bytes

normal case:
json.c 600 bytes
endpoints.c 600872 bytes
stasis_channels.c  42317640 bytes
Comments:By: Asterisk Team (asteriskteam) 2018-09-20 08:53:15.906-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Joshua C. Colp (jcolp) 2018-09-21 07:45:24.567-0500

It appears the bug you have submitted is against a rather old version of a supported branch of Asterisk. There have been many issues fixed between the version you are using and the current version of your branch. Please test with the latest version in your Asterisk branch and report whether the issue persists.

Please see the Asterisk Versions [1] wiki page for info on which versions of Asterisk are supported.
[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions



By: Mohit Dhiman (mohitdhiman) 2018-09-22 02:48:17.155-0500

Moving to the latest upgrade will take a lot of consideration and we cannot move to the latest version as of now, it is a planning which will take time. For now if we can find some solution for this in the existing branch, that'd be great.

By: Joshua C. Colp (jcolp) 2018-09-22 05:23:45.237-0500

We don't support old versions, and I wouldn't foresee any individual on here going through all the changes between your old version and current looking for things that may have fixed it. If someone did the change it is possible they'd remember a specific one, but that's about it.

By: Corey Farrell (coreyfarrell) 2018-09-22 13:44:15.625-0500

Also important to notice that nobody is suggesting you "upgrade" to a new major version, 13.23.1 is the "update" containing the latest non-breaking bug fixes to 13.16.0.  You should take a look at the UPGRADE.txt and CHANGES files in the tarball, they'll list the most important changes by version (this would not include memory leak fixes).

Nobody is going to re-review the changes made between these versions past year.  I frequently go after memory leaks so it's possible I fixed the bug, but I've submitted a couple hundred patches in the past year so no chance I wouldn't remember if I fixed this.  If you can reproduce the leak with 13.23.1 then I'd be happy to help find the cause and implement a fix.

By: Mohit Dhiman (mohitdhiman) 2018-09-24 02:06:16.640-0500

Alright then i'll look through the major changes and bug fixes in the latest release and hopefully find the solution for this issue.

By: Asterisk Team (asteriskteam) 2018-10-08 12:00:01.911-0500

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines