Hello Henning,
Thank you for your quick response.
The increase happens in the core module (create-avp). See bellow:
[root@labcom070 kamailio]# kamcmd mod.stats all shm
Module: core
{
create_avp(178): 52257504
<----------------------------
counters_prefork_init(211): 53760
cfg_clone_str(132): 112
cfg_shmize(221): 832
main_loop(1381): 16
init_pt(104): 16
init_pt(103): 16
init_pt(102): 6224
cfg_register_ctx(47): 96
init_tcp(5197): 8192
init_tcp(5191): 32768
init_tcp(5182): 16
init_tcp(5175): 16
init_tcp(5167): 16
init_tcp(5161): 16
init_tcp(5149): 16
init_avps(92): 16
init_avps(91): 16
init_dst_blocklist(435): 16384
init_dst_blocklist(427): 16
timer_alloc(494): 96
init_dns_cache(368): 16
init_dns_cache(359): 16384
init_dns_cache(351): 16
init_dns_cache(343): 16
init_timer(264): 16
init_timer(263): 16384
init_timer(262): 16
init_timer(261): 16
init_timer(250): 16
init_timer(218): 16
init_timer(207): 278544
init_timer(206): 16
init_timer(194): 16
cfg_child_cb_new(832): 64
sr_cfg_init(371): 16
sr_cfg_init(364): 16
sr_cfg_init(356): 16
sr_cfg_init(344): 16
sr_cfg_init(332): 16
ksr_shutdown_phase_init(123): 16
rpc_hash_add(118): 16
qm_shm_lock_init(1463): 16
Total: 52687808
<------------------
}
[root@labcom070 kamailio]# kamctl stats shmem
{
"jsonrpc": "2.0",
"result": [
"shmem:fragments = 900",
"shmem:free_size = 6180368",
"shmem:max_used_size = 66980272",
"shmem:real_used_size = 60928496",
"shmem:total_size = 67108864",
"shmem:used_size = 54884944"
],
"id": 393115
}
These reports above are shown after the end of calls (4000)
where the outgoing INVITE is not answered. In normal calls the issue
does not occur and the reports are shown below:
[root@labcom070 kamailio]# kamcmd mod.stats all shm
Module: core
{
counters_prefork_init(211): 53760
cfg_clone_str(132): 112
cfg_shmize(221): 832
main_loop(1381): 16
init_pt(104): 16
init_pt(103): 16
init_pt(102): 6224
cfg_register_ctx(47): 96
init_tcp(5197): 8192
init_tcp(5191): 32768
init_tcp(5182): 16
init_tcp(5175): 16
init_tcp(5167): 16
init_tcp(5161): 16
init_tcp(5149): 16
init_avps(92): 16
init_avps(91): 16
init_dst_blocklist(435): 16384
init_dst_blocklist(427): 16
timer_alloc(494): 96
init_dns_cache(368): 16
init_dns_cache(359): 16384
init_dns_cache(351): 16
init_dns_cache(343): 16
init_timer(264): 16
init_timer(263): 16384
init_timer(262): 16
init_timer(261): 16
init_timer(250): 16
init_timer(218): 16
init_timer(207): 278544
init_timer(206): 16
init_timer(194): 16
cfg_child_cb_new(832): 64
sr_cfg_init(371): 16
sr_cfg_init(364): 16
sr_cfg_init(356): 16
sr_cfg_init(344): 16
sr_cfg_init(332): 16
ksr_shutdown_phase_init(123): 16
rpc_hash_add(118): 16
qm_shm_lock_init(1463): 16
Total: 430304
}
[root@labcom070 kamailio]# kamctl stats shmem
{
"jsonrpc": "2.0",
"result": [
"shmem:fragments = 6",
"shmem:free_size = 64143184",
"shmem:max_used_size = 4070816",
"shmem:real_used_size = 2965680",
"shmem:total_size = 67108864",
"shmem:used_size = 2627856"
],
"id": 683948
}
Regars,
Vanderlei
Show replies by date
Hello Vanderlei,
thanks for the follow up, this looks indeed suspicious. I think Daniel already pushed a
possible fix to git master branch, maybe you give this a try to see if it solves your
problem.
Cheers,
Henning
From: Vanderlei Torres Batistela via sr-users <sr-users(a)lists.kamailio.org>
Sent: Mittwoch, 10. Juli 2024 14:35
To: sr-users(a)lists.kamailio.org
Cc: Vanderlei Torres Batistela <v.batistela(a)hotmail.com>
Subject: [SR-Users] Re: Possible Kamailio memmory leak - version 5.8.2
Hello Henning,
Thank you for your quick response.
The increase happens in the core module (create-avp). See bellow:
[root@labcom070 kamailio]# kamcmd mod.stats all shm
Module: core
{
create_avp(178): 52257504
<----------------------------
counters_prefork_init(211): 53760
cfg_clone_str(132): 112
cfg_shmize(221): 832
main_loop(1381): 16
init_pt(104): 16
init_pt(103): 16
init_pt(102): 6224
cfg_register_ctx(47): 96
init_tcp(5197): 8192
init_tcp(5191): 32768
init_tcp(5182): 16
init_tcp(5175): 16
init_tcp(5167): 16
init_tcp(5161): 16
init_tcp(5149): 16
init_avps(92): 16
init_avps(91): 16
init_dst_blocklist(435): 16384
init_dst_blocklist(427): 16
timer_alloc(494): 96
init_dns_cache(368): 16
init_dns_cache(359): 16384
init_dns_cache(351): 16
init_dns_cache(343): 16
init_timer(264): 16
init_timer(263): 16384
init_timer(262): 16
init_timer(261): 16
init_timer(250): 16
init_timer(218): 16
init_timer(207): 278544
init_timer(206): 16
init_timer(194): 16
cfg_child_cb_new(832): 64
sr_cfg_init(371): 16
sr_cfg_init(364): 16
sr_cfg_init(356): 16
sr_cfg_init(344): 16
sr_cfg_init(332): 16
ksr_shutdown_phase_init(123): 16
rpc_hash_add(118): 16
qm_shm_lock_init(1463): 16
Total: 52687808
<------------------
}
[root@labcom070 kamailio]# kamctl stats shmem
{
"jsonrpc": "2.0",
"result": [
"shmem:fragments = 900",
"shmem:free_size = 6180368",
"shmem:max_used_size = 66980272",
"shmem:real_used_size = 60928496",
"shmem:total_size = 67108864",
"shmem:used_size = 54884944"
],
"id": 393115
}
These reports above are shown after the end of calls (4000)
where the outgoing INVITE is not answered. In normal calls the issue
does not occur and the reports are shown below:
[root@labcom070 kamailio]# kamcmd mod.stats all shm
Module: core
{
counters_prefork_init(211): 53760
cfg_clone_str(132): 112
cfg_shmize(221): 832
main_loop(1381): 16
init_pt(104): 16
init_pt(103): 16
init_pt(102): 6224
cfg_register_ctx(47): 96
init_tcp(5197): 8192
init_tcp(5191): 32768
init_tcp(5182): 16
init_tcp(5175): 16
init_tcp(5167): 16
init_tcp(5161): 16
init_tcp(5149): 16
init_avps(92): 16
init_avps(91): 16
init_dst_blocklist(435): 16384
init_dst_blocklist(427): 16
timer_alloc(494): 96
init_dns_cache(368): 16
init_dns_cache(359): 16384
init_dns_cache(351): 16
init_dns_cache(343): 16
init_timer(264): 16
init_timer(263): 16384
init_timer(262): 16
init_timer(261): 16
init_timer(250): 16
init_timer(218): 16
init_timer(207): 278544
init_timer(206): 16
init_timer(194): 16
cfg_child_cb_new(832): 64
sr_cfg_init(371): 16
sr_cfg_init(364): 16
sr_cfg_init(356): 16
sr_cfg_init(344): 16
sr_cfg_init(332): 16
ksr_shutdown_phase_init(123): 16
rpc_hash_add(118): 16
qm_shm_lock_init(1463): 16
Total: 430304
}
[root@labcom070 kamailio]# kamctl stats shmem
{
"jsonrpc": "2.0",
"result": [
"shmem:fragments = 6",
"shmem:free_size = 64143184",
"shmem:max_used_size = 4070816",
"shmem:real_used_size = 2965680",
"shmem:total_size = 67108864",
"shmem:used_size = 2627856"
],
"id": 683948
}
Regars,
Vanderlei