<p></p>

<h3>Description</h3>

<h3>Troubleshooting</h3>
<h4>Reproduction</h4>
<p>kamailio -c -x tlsf -f misc/examples/pkg/kamailio-basic.cfg</p>
<h4>Debugging Data</h4>
<pre><code>core was generated by `kamailio -c -x tlsf -f misc/examples/pkg/kamailio-basic.cfg'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000555e79902495 in str_hash_add (ht=0x555e79d6e0f0 <main_rt+16>, e=0x7f01c0521a48) at core/str_hash.h:85
85              clist_insert(&ht->table[h], e, next, prev);
(gdb) bt full
#0  0x0000555e79902495 in str_hash_add (ht=0x555e79d6e0f0 <main_rt+16>, e=0x7f01c0521a48) at core/str_hash.h:85
        h = 6
#1  0x0000555e79902e46 in route_add (rt=0x555e79d6e0e0 <main_rt>, name=0x555e79bd87be "0", i=0) at core/route.c:134
        e = 0x7f01c0521a48
        __func__ = "route_add"
#2  0x0000555e799035f3 in init_rlist (r_name=0x555e79bd87c0 "main", rt=0x555e79d6e0e0 <main_rt>, n_entries=2, hash_size=8) at core/route.c:160
        __func__ = "init_rlist"
#3  0x0000555e79903647 in init_routes () at core/route.c:172
No locals.
#4  0x0000555e79776eaa in main (argc=6, argv=0x7ffec006df78) at main.c:2408
        cfg_stream = 0x0
        c = -1
        r = 0
        tmp = 0x0
        tmp_len = 0
        port = 0
        proto = 0
        ahost = 0x0
        aport = 0
        options = 0x555e79ba60a8 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
        ret = -1
        seed = 0
        rfd = 0
        debug_save = 0
        debug_flag = 0
        dont_fork_cnt = 0
        n_lst = 0x0
        p = 0x0
        st = {st_dev = 0, st_ino = 0, st_nlink = 0, st_mode = 0, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 0, st_blksize = 0, st_blocks = 0, st_atim = {tv_sec = 0, tv_nsec = 0}, st_mtim = {tv_sec = 0, 
            tv_nsec = 0}, st_ctim = {tv_sec = 0, tv_nsec = 0}, __unused = {0, 0, 0}}
        tbuf = '\000' <repeats 2336 times>...
        option_index = 0
        long_options = {{name = 0x555e79ba85a6 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x555e79ba3504 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x555e79ba85ab "alias", has_arg = 1, flag = 0x0, 
            val = 1024}, {name = 0x555e79ba85b1 "subst", has_arg = 1, flag = 0x0, val = 1025}, {name = 0x555e79ba85b7 "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x555e79ba85c0 "substdefs", has_arg = 1, flag = 0x0, 
            val = 1027}, {name = 0x555e79ba85ca "server-id", has_arg = 1, flag = 0x0, val = 1028}, {name = 0x555e79ba85d4 "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {name = 0x555e79ba85df "modparam", has_arg = 1, 
            flag = 0x0, val = 1030}, {name = 0x555e79ba85e8 "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x555e79ba85f3 "debug", has_arg = 1, flag = 0x0, val = 1032}, {name = 0x555e79ba85f9 "cfg-print", has_arg = 0, 
            flag = 0x0, val = 1033}, {name = 0x555e79ba8603 "atexit", has_arg = 1, flag = 0x0, val = 1034}, {name = 0x555e79ba860a "defenv", has_arg = 1, flag = 0x0, val = 1035}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
        __func__ = "main"
(gdb) info locals
h = 6
(gdb) list
80                                                              struct str_hash_entry* e)
81      {
82              int h;
83
84              h=get_hash1_raw(e->key.s, e->key.len) % ht->size;
85              clist_insert(&ht->table[h], e, next, prev);
86      }
87
88
89
(gdb) 
</code></pre>
<h3>Possible Solutions</h3>
<p>works after reverting</p>
<ul>
<li><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/kamailio/kamailio/commit/ddafeebfaf1537c684eee22be228867563dd02ac/hovercard" href="https://github.com/kamailio/kamailio/commit/ddafeebfaf1537c684eee22be228867563dd02ac"><tt>ddafeeb</tt></a></li>
<li><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/kamailio/kamailio/commit/2d7aee506c617f2d258719562f8debf2b4ba087e/hovercard" href="https://github.com/kamailio/kamailio/commit/2d7aee506c617f2d258719562f8debf2b4ba087e"><tt>2d7aee5</tt></a></li>
</ul>
<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>bash-5.0# kamailio -v
version: kamailio 5.5.2 (x86_64/linux) 55e232-dirty
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 55e232 -dirty
compiled on 15:08:48 Sep  5 2021 with gcc 9.3.0

</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>

<pre><code>Alpine Docker Image 3.12
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2843">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZMN7LEKA4AVMVL4KSDUAODDJANCNFSM5DO5FBVA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/ABO7UZI2XYKOGYPLOTZ4D5DUAODDJA5CNFSM5DO5FBVKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4OXL2TDQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2843",
"url": "https://github.com/kamailio/kamailio/issues/2843",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>