[sr-dev] [kamailio/kamailio] Kamailio memory leak - versions 5.1.4 and 5.1.7 (#1895)

Jay J notifications at github.com
Sun Mar 24 21:54:37 CET 2019


Another occurence:

```
11(8342) ERROR: usrloc [ucontact.c:100]: new_ucontact(): no more shm memory
11(8342) ERROR: usrloc [urecord.c:149]: mem_insert_ucontact(): failed to create new contact
11(8342) ERROR: usrloc [urecord.c:573]: insert_ucontact(): failed to insert contact
11(8342) ERROR: registrar [save.c:522]: insert_contacts(): failed to insert contact
11(8342) ERROR: sl [sl_funcs.c:362]: sl_reply_error(): stateless error reply used: I'm terribly sorry, server error occurred (1/SL)
31(8362) ERROR: <core> [core/tcp_main.c:973]: tcpconn_new(): mem. allocation failure
31(8362) ERROR: <core> [core/tcp_main.c:4042]: handle_new_connect(): tcpconn_new failed, closing socket
31(8362) ERROR: <core> [core/tcp_main.c:973]: tcpconn_new(): mem. allocation failure
31(8362) ERROR: <core> [core/tcp_main.c:4042]: handle_new_connect(): tcpconn_new failed, closing socket
31(8362) ERROR: <core> [core/tcp_main.c:973]: tcpconn_new(): mem. allocation failure
```

```
 kamcmd mod.stats all shm
Module: core
{
        dns_cache_mk_bad_entry(881): 7864
        dns_cache_mk_rd_entry(1230): 13800
        msg_lump_cloner(986): 501728
        sip_msg_shm_clone(496): 2862448
        tcpconn_new(971): 36272
        build_req_buf_from_sip_req(2182): 814696
        counters_prefork_init(207): 39168
        create_avp(175): 57912
        cfg_clone_str(130): 256
        cfg_shmize(217): 1088
        init_pt(113): 8
        init_pt(108): 8
        init_pt(107): 4760
        cfg_parse_str(906): 192
        register_timer(1012): 560
        cfg_register_ctx(47): 96
        init_tcp(4700): 8192
        init_tcp(4694): 32768
        init_tcp(4686): 8
        init_tcp(4679): 8
        init_tcp(4672): 8
        init_tcp(4666): 8
        init_tcp(4654): 8
        init_avps(90): 8
        init_avps(89): 8
        init_dst_blacklist(437): 16384
        init_dst_blacklist(430): 8
        timer_alloc(515): 96
        init_dns_cache(369): 8
        init_dns_cache(361): 16384
        init_dns_cache(354): 16
        init_dns_cache(345): 8
        init_timer(284): 8
        init_timer(283): 16384
        init_timer(282): 8
        init_timer(281): 8
        init_timer(270): 8
        init_timer(238): 8
        init_timer(221): 278544
        init_timer(220): 8
        init_timer(207): 8
        cfg_child_cb_new(828): 64
        sr_cfg_init(360): 8
        sr_cfg_init(353): 8
        sr_cfg_init(346): 8
        sr_cfg_init(334): 8
        sr_cfg_init(322): 8
        qm_shm_lock_init(1195): 8
        Total: 4709872
}

Module: ndb_redis
{
        Total: 0
}

Module: pv
{
        Total: 0
}

Module: sqlops
{
        Total: 0
}

Module: textops
{
        Total: 0
}

Module: xhttp_rpc
{
        Total: 0
}

Module: db_mysql
{
        Total: 0
}

Module: auth
{
        Total: 0
}

Module: htable
{
        ht_init_tables(386): 24576
        ht_add_table(281): 936
        Total: 25512
}

Module: xlog
{
        Total: 0
}

Module: cnxcc
{
        __alloc_new_credit_data(1217): 1080
        __alloc_new_credit_data(1207): 480
        __get_or_create_credit_data_entry(1177): 288
        __add_call_by_cid(1534): 4464
        __alloc_new_call_by_money(1278): 16512
        __alloc_new_credit_data(1233): 48
        shm_str_dup(723): 10728
        __shm_str_hash_alloc(1090): 21984
        __mod_init(286): 16
        __mod_init(276): 16
        __mod_init(275): 16
        __mod_init(273): 16
        __mod_init(272): 16
        __mod_init(270): 16
        __mod_init(269): 16
        Total: 55696
}

Module: rtpengine
{
        shm_str_dup(723): 3336
        rtpp_function_call(2281): 3592
        rtpengine_hash_table_init(85): 1024
        rtpengine_hash_table_init(76): 2048
        rtpengine_hash_table_init(67): 2048
        get_rtpp_set(746): 200
        add_rtpengine_socks(841): 88
        get_rtpp_set(755): 8
        rtpengine_hash_table_init(58): 72
        add_rtpengine_socks(860): 24
        mod_init(1448): 72
        mod_init(1441): 24
        mod_init(1428): 88
        mod_init(1421): 8
        rtpengine_hash_table_init(111): 14400
        rtpengine_hash_table_init(96): 2048
        Total: 29080
}

Module: mangler
{
        Total: 0
}

Module: acc
{
        Total: 0
}

Module: rr
{
        Total: 0
}

Module: dialog
{
        build_new_dlg(456): 151088
        dlg_set_leg_info(541): 24712
        dlg_get_iuid_shm_clone(287): 8328
        dlg_set_toroute(1157): 8128
        dlg_set_leg_info(532): 8136
        dlg_set_leg_info(524): 36240
        init_dlg_callback(55): 16
        register_dlgcb(124): 40
        init_dlg_table(295): 131088
        init_dlg_table(287): 8
        init_dlg_table(280): 8
        init_dlg_table(275): 8
        init_dlg_timer(57): 8
        init_dlg_timer(48): 32
        new_dlg_profile(188): 312
        Total: 368152
}

Module: uac
{
        reg_ht_add(530): 41784
        reg_ht_add_byuser(479): 1760
        reg_ht_add_byuuid(448): 2016
        uac_reg_update(1093): 11472688
        uac_reg_init_ht(237): 512
        uac_reg_init_ht(223): 24
        uac_reg_init_ht(211): 512
        uac_reg_init_ht(199): 24
        uac_reg_init_ht(187): 8
        Total: 11519328
}

Module: tm
{
        str_duplicate(196): 312
        new_dlg_uac(324): 248
        _reply_light(490): 72496
        cancel_reason_pack(1201): 5416
        update_totag_set(311): 4904
        update_totag_set(310): 4136
        build_local_reparse(345): 253264
        relay_reply(1920): 323544
        build_cell(339): 1800657088
        build_uac_req(1592): 190580248
        init_tm_stats_child(58): 8704
        insert_tmcb(137): 15281328
        init_tmcb_lists(74): 16
        init_tmcb_lists(72): 16
        init_hash_table(481): 2097152
        Total: 2009288872
}

Module: tls
{
        fix_domain(987): 816
        tls_new_domain(157): 576
        tls_new_cfg(1323): 48
        tls_ct_wq_init(49): 8
        mod_init(322): 8
        mod_init(306): 8
        ser_realloc(299): 194536
        ser_malloc(293): 1404184
        lock_set_alloc(70): 24
        Total: 1600208
}

Module: sl
{
        init_sl_stats_child(125): 6528
        sl_startup(83): 8
        init_sl_stats(110): 8
        Total: 6544
}

Module: tmx
{
        tmx_init_pretran_table(90): 512
        Total: 512
}

Module: kex
{
        pkg_proc_stats_init(79): 1632
        Total: 1632
}

Module: usrloc
{
        build_stat_name(52): 64
        new_udomain(94): 49152
        new_udomain(87): 48
        new_dlist(563): 16
        new_dlist(555): 32
        init_ulcb_list(45): 16
        Total: 49328
}

Module: pike
{
        pike_init(125): 16
        lock_set_alloc(70): 1040
        init_ip_tree(115): 4112
        pike_init(107): 8
        Total: 5176
}

Module: websocket
{
        wsconn_init(109): 16
        wsconn_init(100): 8192
        wsconn_init(89): 8
        wsconn_init(79): 8
        Total: 8224
}

Module: cfgutils
{
        mod_init(863): 8
        mod_init(857): 8
        mod_init(849): 8
        Total: 24
}

Module: nathelper
{
        mod_init(483): 8
        Total: 8
}

Module: dispatcher
{
        reindex_dests(629): 1600
        ds_avl_insert(3064): 2568
        ds_set_attrs(257): 48
        pack_dest(355): 216
        init_data(226): 16
        init_data(218): 16
        ds_parse_reply_codes(987): 816
        mod_init(308): 8
        mod_init(306): 8
        ds_ping_active_init(118): 8
        Total: 5304
}
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1895#issuecomment-475999025
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190324/1182bf9d/attachment-0001.html>


More information about the sr-dev mailing list