I'm running burning tests against kamailio and after some time ~ 2 days I see kamailio out of mem:
ERROR: tm [t_lookup.c:1271]: new_t(): ERROR: new_t: out of mem: ERROR: tm [t_lookup.c:1411]: t_newtran(): ERROR: t_newtran: new_t failed
The result of command kamcmd mod.stats all is:
Module: core { sip_msg_shm_clone(494): 10653392 build_req_buf_from_sip_req(2149): 2565480 msg_lump_cloner(978): 2943584 create_avp(175): 969736 xavp_new_value(94): 858469320 counters_prefork_init(207): 16896 cfg_clone_str(130): 88 cfg_shmize(217): 744 init_pt(110): 8 init_pt(105): 8 init_pt(104): 3080 dtrie_insert(157): 240 dtrie_insert(148): 48 dtrie_init(60): 160 dtrie_init(51): 32 register_timer(1011): 360 cfg_register_ctx(47): 32 init_tcp(4635): 8192 init_tcp(4629): 32768 init_tcp(4621): 8 init_tcp(4614): 8 init_tcp(4607): 8 init_tcp(4601): 8 init_tcp(4589): 8 init_avps(90): 8 init_avps(89): 8 init_dst_blacklist(437): 16384 init_dst_blacklist(430): 8 timer_alloc(514): 96 init_dns_cache(366): 8 init_dns_cache(358): 16384 init_dns_cache(351): 16 init_dns_cache(345): 8 init_timer(283): 8 init_timer(282): 16384 init_timer(281): 8 init_timer(280): 8 init_timer(269): 8 init_timer(237): 8 init_timer(220): 278544 init_timer(219): 8 init_timer(206): 8 cfg_child_cb_new(830): 64 sr_cfg_init(361): 8 sr_cfg_init(354): 8 sr_cfg_init(347): 8 sr_cfg_init(335): 8 sr_cfg_init(323): 8 shm_core_lock_init(153): 8 Total: 875992224 }
Module: dmq { alloc_job_queue(229): 128 shm_str_dup(723): 24 build_dmq_node(156): 448 add_peer(67): 168 mod_init(243): 8 mod_init(237): 96 init_dmq_node_list(66): 24 init_peer_list(33): 24 Total: 920 }
Module: auth_db { Total: 0 }
Module: dialog { init_dlg_table(284): 131088 init_dlg_table(276): 8 init_dlg_table(269): 8 init_dlg_table(264): 8 init_dlg_timer(57): 8 init_dlg_timer(48): 32 new_dlg_profile(187): 624 Total: 131776 }
Module: rr { Total: 0 }
Module: xlog { Total: 0 }
Module: kex { pkg_proc_stats_init(79): 1056 Total: 1056 }
Module: db_postgres { lock_set_alloc(70): 80 Total: 80 }
Module: pv { Total: 0 }
Module: textops { Total: 0 }
Module: htable { ht_cell_new(183): 1104 ht_init_tables(381): 8388608 ht_add_table(278): 928 Total: 8390640 }
Module: sqlops { Total: 0 }
Module: tm { build_uac_req(1543): 848 prepare_new_uac(479): 28880 _reply_light(542): 751504 build_local_reparse(341): 1168568 relay_reply(1884): 643088 build_cell(317): 9826624 prepare_new_uac(524): 8112 prepare_new_uac(509): 10192 init_tm_stats_child(60): 5632 insert_tmcb(137): 136 init_tmcb_lists(74): 16 init_tmcb_lists(72): 16 init_hash_table(467): 2097152 Total: 14540768 }
Module: usrloc { new_urecord(65): 136 new_ucontact(98): 1096 new_urecord(58): 288 shm_str_dup(723): 1200 build_stat_name(51): 64 new_udomain(93): 40960 new_udomain(86): 48 new_dlist(573): 16 new_dlist(565): 32 register_ulcb(94): 32 init_ulcb_list(45): 16 lock_set_alloc(70): 4112 Total: 48000 }
Module: tmx { tmx_check_pretran(250): 864 tmx_check_pretran(271): 1216 tmx_init_pretran_table(90): 256 Total: 2336 }
Module: sl { init_sl_stats_child(125): 4224 sl_startup(83): 8 init_sl_stats(110): 8 Total: 4240 }
Module: carrierroute { rule_fixup_recursor(584): 8 shm_str_dup(723): 56 add_route_rule(74): 152 add_route_flags(225): 48 create_domain_data(83): 32 create_carrier_data(59): 8 create_carrier_data(50): 64 load_route_data_db(295): 8 load_domain_map(182): 48 load_domain_map(171): 24 load_carrier_map(126): 48 load_carrier_map(115): 24 reload_route_data(172): 64 init_route_data(74): 8 Total: 592 }
Module: dispatcher { reindex_dests(600): 1008 add_dest2list(350): 168 add_dest2list(324): 4200 init_data(204): 16 init_data(195): 16 mod_init(309): 8 mod_init(307): 8 ds_ping_active_init(102): 8 Total: 5432 }
Module: db_text { dbt_init_cache(81): 256 dbt_init_cache(69): 8 dbt_init_cache(54): 8 Total: 272 }
The result of command kamctl shmem is:
shmem:fragments = 6353 shmem:free_size = 406208 shmem:max_used_size = 8464105472 shmem:real_used_size = 8463699264 shmem:total_size = 8464105472 shmem:used_size = 5190698208
The server has 8G of shared memory allocated, and the issue happens more or less after 2 days running tests.
I'm using sipp to generate traffic, it is sending 500CAPS.
There is any possibility of memory leak on Kamailio 4.4.0?
Best Regards