[asterisk-bugs] [JIRA] (ASTERISK-27679) Memory leaks in rtp_engine.c

Mak Dee (JIRA) noreply at issues.asterisk.org
Fri Feb 16 05:58:14 CST 2018


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

Mak Dee updated ASTERISK-27679:
-------------------------------

    Description: 
Problem described in parent task and I’ve faced the same issue.
I did some investigation and there is what I’ve found out.
When I remove lines which relate to the «realtime» and memory_cache from sorcery.conf then «rtp_engine.c» doesn’t allocate memory during the time. This is figured out in two pastes below:
[^mem_alloc_-_sorcery_memory_cache_and_realtime_dis._(0m._up).txt]
[^mem_alloc_-_sorcery_memory_cache_and_realtime_dis._(35m._up).txt]

When I add lines which relate to the «realtime» and memory_cache to the sorcery.conf then memory allocation by «rtp_engine.c» starts to increase during the time. This is also figured out in two pastes below:
[^mem_alloc_-_sorcery_memory_cache_and_realtime_en._(0m._up).txt]
[^mem_alloc_-_sorcery_memory_cache_and_realtime_en._(1h._up).txt]

Output for memory show allocations rtp_engine.c [^memory_show_allocations_rtp_engine.c.txt]

Sorcery cache:
AORs:
CLI> sorcery memory cache show res_pjsip/aor
Sorcery memory cache: res_pjsip/aor
Number of objects within cache: 15
Maximum allowed objects: 100
Number of seconds before object expires: 1800
Number of seconds before object becomes stale: 1500
Expire all objects on reload: On

Auth:
CLI> sorcery memory cache show res_pjsip/auth
Sorcery memory cache: res_pjsip/auth
Number of objects within cache: 15
There is no limit on the maximum number of objects in the cache
Number of seconds before object expires: 1800
Number of seconds before object becomes stale: 200
Expire all objects on reload: On

Endpoint:
CLI> sorcery memory cache show res_pjsip/endpoint
Sorcery memory cache: res_pjsip/endpoint
Number of objects within cache: 15
Maximum allowed objects: 100
Number of seconds before object expires: 600
Number of seconds before object becomes stale: 60
Expire all objects on reload: On

Registration:
CLI> sorcery memory cache show res_pjsip/registration
Sorcery memory cache: res_pjsip/registration
Number of objects within cache: 0
Maximum allowed objects: 100
Number of seconds before object expires: 600
Number of seconds before object becomes stale: 60
Expire all objects on reload: On

Transport:
CLI> sorcery memory cache show res_pjsip/transport
Sorcery memory cache: res_pjsip/transport
Number of objects within cache: 3
There is no limit on the maximum number of objects in the cache
Object expiration is not enabled - cached objects will not expire
Object staleness is not enabled - cached objects will not go stale
Expire all objects on reload: On

Identify:
CLI> sorcery memory cache show res_pjsip/identify
Sorcery memory cache: res_pjsip/identify
Number of objects within cache: 2
Maximum allowed objects: 100
Number of seconds before object expires: 3600
Number of seconds before object becomes stale: 60
Expire all objects on reload: On

During the test, the PBX didn’t receive or make a calls.

  was:
Problem described in parent task and I’ve faced the same issue.
I did some investigation and there is what I’ve found out.
When I remove lines which relate to the «realtime» and memory_cache from sorcery.conf then «rtp_engine.c» doesn’t allocate memory during the time. This is figured out in two pastes below:
[^mem_alloc_-_sorcery_memory_cache_and_realtime_dis._(0m._up).txt]
[^mem_alloc_-_sorcery_memory_cache_and_realtime_dis._(35m._up).txt]

When I add lines which relate to the «realtime» and memory_cache to the sorcery.conf then memory allocation by «rtp_engine.c» starts to increase during the time. This is also figured out in two pastes below:
[^mem_alloc_-_sorcery_memory_cache_and_realtime_en._(0m._up).txt]
[^mem_alloc_-_sorcery_memory_cache_and_realtime_en._(1h._up).txt]

Output for memory show allocations rtp_engine.c: 
https://pastebin.com/3WmwNzi7

Sorcery cache:
AORs:
CLI> sorcery memory cache show res_pjsip/aor
Sorcery memory cache: res_pjsip/aor
Number of objects within cache: 15
Maximum allowed objects: 100
Number of seconds before object expires: 1800
Number of seconds before object becomes stale: 1500
Expire all objects on reload: On

Auth:
CLI> sorcery memory cache show res_pjsip/auth
Sorcery memory cache: res_pjsip/auth
Number of objects within cache: 15
There is no limit on the maximum number of objects in the cache
Number of seconds before object expires: 1800
Number of seconds before object becomes stale: 200
Expire all objects on reload: On

Endpoint:
CLI> sorcery memory cache show res_pjsip/endpoint
Sorcery memory cache: res_pjsip/endpoint
Number of objects within cache: 15
Maximum allowed objects: 100
Number of seconds before object expires: 600
Number of seconds before object becomes stale: 60
Expire all objects on reload: On

Registration:
CLI> sorcery memory cache show res_pjsip/registration
Sorcery memory cache: res_pjsip/registration
Number of objects within cache: 0
Maximum allowed objects: 100
Number of seconds before object expires: 600
Number of seconds before object becomes stale: 60
Expire all objects on reload: On

Transport:
CLI> sorcery memory cache show res_pjsip/transport
Sorcery memory cache: res_pjsip/transport
Number of objects within cache: 3
There is no limit on the maximum number of objects in the cache
Object expiration is not enabled - cached objects will not expire
Object staleness is not enabled - cached objects will not go stale
Expire all objects on reload: On

Identify:
CLI> sorcery memory cache show res_pjsip/identify
Sorcery memory cache: res_pjsip/identify
Number of objects within cache: 2
Maximum allowed objects: 100
Number of seconds before object expires: 3600
Number of seconds before object becomes stale: 60
Expire all objects on reload: On

During the test, the PBX didn’t receive or make a calls.


> Memory leaks in rtp_engine.c
> ----------------------------
>
>                 Key: ASTERISK-27679
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27679
>             Project: Asterisk
>          Issue Type: Sub-task
>      Security Level: None
>          Components: Core/RTP
>    Affects Versions: 13.18.2, 14.6.2, 15.2.0
>         Environment: CentOS Linux release 7.4.1708 (Core)
> Docker version 17.09.1-ce, build 19e2cf6
> Asterisk and DB are working in different docker containers.
>            Reporter: Mak Dee
>              Labels: pjsip
>         Attachments: mem_alloc_-_sorcery_memory_cache_and_realtime_dis._(0m._up).txt, mem_alloc_-_sorcery_memory_cache_and_realtime_dis._(35m._up).txt, mem_alloc_-_sorcery_memory_cache_and_realtime_en._(0m._up).txt, mem_alloc_-_sorcery_memory_cache_and_realtime_en._(1h._up).txt, memory_show_allocations_rtp_engine.c.txt
>
>
> Problem described in parent task and I’ve faced the same issue.
> I did some investigation and there is what I’ve found out.
> When I remove lines which relate to the «realtime» and memory_cache from sorcery.conf then «rtp_engine.c» doesn’t allocate memory during the time. This is figured out in two pastes below:
> [^mem_alloc_-_sorcery_memory_cache_and_realtime_dis._(0m._up).txt]
> [^mem_alloc_-_sorcery_memory_cache_and_realtime_dis._(35m._up).txt]
> When I add lines which relate to the «realtime» and memory_cache to the sorcery.conf then memory allocation by «rtp_engine.c» starts to increase during the time. This is also figured out in two pastes below:
> [^mem_alloc_-_sorcery_memory_cache_and_realtime_en._(0m._up).txt]
> [^mem_alloc_-_sorcery_memory_cache_and_realtime_en._(1h._up).txt]
> Output for memory show allocations rtp_engine.c [^memory_show_allocations_rtp_engine.c.txt]
> Sorcery cache:
> AORs:
> CLI> sorcery memory cache show res_pjsip/aor
> Sorcery memory cache: res_pjsip/aor
> Number of objects within cache: 15
> Maximum allowed objects: 100
> Number of seconds before object expires: 1800
> Number of seconds before object becomes stale: 1500
> Expire all objects on reload: On
> Auth:
> CLI> sorcery memory cache show res_pjsip/auth
> Sorcery memory cache: res_pjsip/auth
> Number of objects within cache: 15
> There is no limit on the maximum number of objects in the cache
> Number of seconds before object expires: 1800
> Number of seconds before object becomes stale: 200
> Expire all objects on reload: On
> Endpoint:
> CLI> sorcery memory cache show res_pjsip/endpoint
> Sorcery memory cache: res_pjsip/endpoint
> Number of objects within cache: 15
> Maximum allowed objects: 100
> Number of seconds before object expires: 600
> Number of seconds before object becomes stale: 60
> Expire all objects on reload: On
> Registration:
> CLI> sorcery memory cache show res_pjsip/registration
> Sorcery memory cache: res_pjsip/registration
> Number of objects within cache: 0
> Maximum allowed objects: 100
> Number of seconds before object expires: 600
> Number of seconds before object becomes stale: 60
> Expire all objects on reload: On
> Transport:
> CLI> sorcery memory cache show res_pjsip/transport
> Sorcery memory cache: res_pjsip/transport
> Number of objects within cache: 3
> There is no limit on the maximum number of objects in the cache
> Object expiration is not enabled - cached objects will not expire
> Object staleness is not enabled - cached objects will not go stale
> Expire all objects on reload: On
> Identify:
> CLI> sorcery memory cache show res_pjsip/identify
> Sorcery memory cache: res_pjsip/identify
> Number of objects within cache: 2
> Maximum allowed objects: 100
> Number of seconds before object expires: 3600
> Number of seconds before object becomes stale: 60
> Expire all objects on reload: On
> During the test, the PBX didn’t receive or make a calls.



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



More information about the asterisk-bugs mailing list