[sr-dev] [kamailio/kamailio] Segfault start Kamailio 5.5 #2 (#2738)

ReznikovAlexei notifications at github.com
Tue May 18 17:53:17 CEST 2021


### Description

I am upgraded Kamailio from 5.4.5 to 5.5, but i have got segfault when I try start Kamailio with custom config, with default config Kamailio start work done.

#### Reproduction

/usr/sbin/kamailio -Ee -d -DD -P /var/run/kamailio/kamailio.pid -m 64 -M 32 -f /etc/kazoo/kamailio/kamailio.cfg -w /run/kamailio/

#### Debugging Data


```
[root at hostname kamailio]# gdb /usr/sbin/kamailio /run/kamailio/core.14281 
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/kamailio...Reading symbols from /usr/lib/debug/usr/sbin/kamailio.debug...done.
done.
[New LWP 14281]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/sbin/kamailio -Ee -d -DD -P /var/run/kamailio/kamailio.pid -m 64 -M 32 -f'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f3b29de7e96 in __memcpy_ssse3_back () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.6-13.el7.x86_64 cyrus-sasl-lib-2.1.26-23.el7.x86_64 elfutils-libelf-0.176-5.el7.x86_64 elfutils-libs-0.176-5.el7.x86_64 glibc-2.17-323.el7_9.x86_64 jansson-2.10-1.el7.x86_64 json-c-0.11-4.el7_0.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-50.el7.x86_64 libattr-2.4.46-13.el7.x86_64 libcap-2.22-11.el7.x86_64 libcom_err-1.42.9-19.el7.x86_64 libcurl-7.29.0-59.el7_9.1.x86_64 libevent-2.0.21-4.el7.x86_64 libgcc-4.8.5-44.el7.x86_64 libidn-1.28-4.el7.x86_64 librabbitmq-0.8.0-3.el7.x86_64 libselinux-2.5-15.el7.x86_64 libssh2-1.8.0-4.el7.x86_64 libstdc++-4.8.5-44.el7.x86_64 libuuid-2.23.2-65.el7_9.1.x86_64 libxml2-2.9.1-6.el7.5.x86_64 mariadb-libs-5.5.68-1.el7.x86_64 nspr-4.25.0-2.el7_9.x86_64 nss-3.53.1-3.el7_9.x86_64 nss-softokn-freebl-3.53.1-6.el7_9.x86_64 nss-util-3.53.1-1.el7_9.x86_64 openldap-2.4.44-22.el7.x86_64 openssl-libs-1.0.2k-21.el7_9.x86_64 pcre-8.32-17.el7.x86_64 systemd-libs-219-78.el7_9.3.x86_64 xz-libs-5.2.2-1.el7.x86_64 zlib-1.2.7-19.el7_9.x86_64
(gdb) 
(gdb) bt full
#0  0x00007f3b29de7e96 in __memcpy_ssse3_back () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007f3b2781dfed in pv_parse_hdr_name (sp=0x7f3b27ee6668, in=0x7ffe06ab4e40) at pv_core.c:3272
        s = {s = 0x7f3b27f6f9b0 "\017", len = 111890060}
        p = 0x4000 <Address 0x4000 out of bounds>
        nsp = 0x0
        hdr = {type = HDR_OTHER_T, name = {s = 0x7f3b27ee61e0 "\303\304\366';\177", len = 111889776}, body = {s = 0x44308c <rval_new_empty+87> "H\211E\300H\203}\300", len = 669935208}, len = 111889968, parsed = 0x7ffe06ab4e7c, 
          next = 0x7ffe06ab4e80}
        __FUNCTION__ = "pv_parse_hdr_name"
#2  0x000000000062ee65 in pv_parse_spec2 (in=0x7f3b27ee6650, e=0x7f3b27ee6668, silent=0) at core/pvapi.c:969
        p = 0x7f3b27ee66df ")"
        s = {s = 0x7f3b27ee66cd "Subscription-State)", len = 18}
        pvname = {s = 0x7f3b27ee66c9 "hdr(Subscription-State)", len = 3}
        pvstate = 5
        tr = 0x0
        pte = 0x7f3b27d23c30
        n = 0
        __FUNCTION__ = "pv_parse_spec2"
#3  0x000000000062a71e in pv_cache_add (name=0x7ffe06ab5090) at core/pvapi.c:359
        pvn = 0x7f3b27ee6650
        pvid = 454074875
        p = 0xffffffff000037c9 <Address 0xffffffff000037c9 out of bounds>
        __FUNCTION__ = "pv_cache_add"
#4  0x000000000062bf56 in pv_spec_lookup (name=0x7ffe06ab5170, len=0x7ffe06ab516c) at core/pvapi.c:498
        pvs = 0x0
        tname = {s = 0x7f3b27f700fa "$hdr(Subscription-State)\n", len = 24}
        __FUNCTION__ = "pv_spec_lookup"
#5  0x000000000063241d in pv_parse_format (in=0x7ffe06ab5280, el=0x7f3b27ee64c8) at core/pvapi.c:1194
        p = 0x7f3b27f700fa "$hdr(Subscription-State)\n"
        p0 = 0x7f3b27f700e3 "|end|sent subscription $hdr(Subscription-State)\n"
        n = 2
        e = 0x7f3b27ee65c8
        e0 = 0x7f3b27ee6540
        s = {s = 0x7f3b27f700fa "$hdr(Subscription-State)\n", len = 25}
        len = 24
        __FUNCTION__ = "pv_parse_format"
#6  0x00007f3b1e1cbd31 in xdbg_fixup_helper (param=0x7f3b27f6ca20, param_no=2, mode=0) at xlog.c:509
        xm = 0x7f3b27ee64c8
        s = {s = 0x7f3b27f700e0 "$ci|end|sent subscription $hdr(Subscription-State)\n", len = 51}
        __FUNCTION__ = "xdbg_fixup_helper"
#7  0x00007f3b1e1cd07f in xlog_fixup_helper (param=0x7f3b27f6ca20, param_no=2, mode=0) at xlog.c:573
        xlp = 0x7f3b27ee6400
        s = {s = 0x7f3b27f71138 "L_DEBUG", len = 0}
        __FUNCTION__ = "xlog_fixup_helper"
#8  0x00007f3b1e1cdf4c in xlog_fixup (param=0x7f3b27f6ca20, param_no=2) at xlog.c:617
        __FUNCTION__ = "xlog_fixup"
#9  0x00000000006743c9 in fix_actions (a=0x7f3b27f6c9a8) at core/route.c:932
        t = 0x7f3b27f6c9a8
        p = 0x7f3b1e1d1947
        tmp = 0x7ffe06ab57a0 "\220X\253\006\376\177"
        tmp_p = 0x7f3b27f700e0
        ret = 0
---Type <return> to continue, or q <return> to quit---
        i = 1
        cmd = 0x7f3b27d4e8d8
        s = {s = 0x7f3b27f69b0c "$subs(pres_uri)\n", len = 669940504}
        he = 0x41c380 <_start>
        ip = {af = 670481008, len = 32571, u = {addrl = {139892050293376, 8589934592}, addr32 = {670495360, 32571, 0, 2}, addr16 = {62080, 10230, 32571, 0, 0, 0, 2, 0}, 
            addr = "\200\362\366';\177\000\000\000\000\000\000\002\000\000"}}
        si = 0x7ffe06ab5700
        lval = 0x7f3b1e1cdf4c <xlog_fixup+924>
        rve = 0x7f3b27f69b1b
        err_rve = 0x7f3b1e1d1b4a
        rve_type = RV_NONE
        err_type = 8680369
        expected_type = 32766
        rv = 0x4655da <fix_rval_expr+1805>
        rve_param_no = 0
        __FUNCTION__ = "fix_actions"
#10 0x000000000066fd5b in fix_actions (a=0x7f3b27f7b640) at core/route.c:723
        t = 0x7f3b27f7b640
        p = 0x0
        tmp = 0x7ffe06ab5a20 "\020[\253\006\376\177"
        tmp_p = 0x7f3b27f6c4c0
        ret = 0
        i = 2
        cmd = 0x7f3b27d4e8d8
        s = {s = 0x7f3b27f4c348 "\001", len = 14281}
        he = 0x41c380 <_start>
        ip = {af = 670469920, len = 32571, u = {addrl = {139892050275344, 8589934592}, addr32 = {670477328, 32571, 0, 2}, addr16 = {44048, 10230, 32571, 0, 0, 0, 2, 0}, 
            addr = "\020\254\366';\177\000\000\000\000\000\000\002\000\000"}}
        si = 0x7ffe06ab5980
        lval = 0x7f3b27f69fa0
        rve = 0x7f3b27f6f9b0
        err_rve = 0x0
        rve_type = RV_INT
        err_type = 8680369
        expected_type = 32766
        rv = 0x4655da <fix_rval_expr+1805>
        rve_param_no = 0
        __FUNCTION__ = "fix_actions"
#11 0x000000000066fd92 in fix_actions (a=0x7f3b27f7b790) at core/route.c:727
        t = 0x7f3b27f7b790
        p = 0x7f3b282c7a68
        tmp = 0x7f3b27eb6d08 ""
        tmp_p = 0x7f3b27f69ac0
        ret = 0
        i = 2
        cmd = 0x7f3b27d4e8d8
        s = {s = 0x7f3b27ea2560 "registrar", len = 9}
        he = 0x41c380 <_start>
        ip = {af = 670457200, len = 32571, u = {addrl = {139892050259904, 8589934592}, addr32 = {670461888, 32571, 0, 2}, addr16 = {28608, 10230, 32571, 0, 0, 0, 2, 0}, addr = "\300o\366';\177\000\000\000\000\000\000\002\000\000"}}
        si = 0x7ffe06ab5c00
        lval = 0x7f3b27f68e90
        rve = 0x7f3b27f6b340
---Type <return> to continue, or q <return> to quit---
        err_rve = 0x0
        rve_type = RV_INT
        err_type = 111893136
        expected_type = 32766
        rv = 0x4655da <fix_rval_expr+1805>
        rve_param_no = 0
        __FUNCTION__ = "fix_actions"
#12 0x000000000066fd92 in fix_actions (a=0x7f3b27f658d8) at core/route.c:727
        t = 0x7f3b27f7b8e0
        p = 0x7ffe06ab5ed0
        tmp = 0x2a055380 <Address 0x2a055380 out of bounds>
        tmp_p = 0x7f3b27eda940
        ret = 0
        i = 2
        cmd = 0x7f3b27d4e8d8
        s = {s = 0x7f3b283cebc0 "CUSTOM_BRANCH_HEADERS", len = 21}
        he = 0x7ffe06ab5da0
        ip = {af = 111893808, len = 32766, u = {addrl = {7947659, 140729010314544}, addr32 = {7947659, 0, 111893808, 32766}, addr16 = {17803, 121, 0, 0, 23856, 1707, 32766, 0}, 
            addr = "\213Ey\000\000\000\000\000\060]\253\006\376\177\000"}}
        si = 0x100000400
        lval = 0x7f3b27f65ce0
        rve = 0x7f3b27f676f0
        err_rve = 0x0
        rve_type = RV_INT
        err_type = RV_NONE
        expected_type = RV_NONE
        rv = 0x7f3b283cf948
        rve_param_no = 0
        __FUNCTION__ = "fix_actions"
#13 0x0000000000680d97 in fix_rl (rt=0xb9e580 <event_rt>) at core/route.c:2102
        i = 24
        ret = 0
#14 0x0000000000680e46 in fix_rls () at core/route.c:2128
        ret = 0
#15 0x0000000000436704 in main (argc=14, argv=0x7ffe06ab6448) at main.c:3047
        cfg_stream = 0x2918040
        c = -1
        r = 0
        tmp = 0x7ffe06ab6823 ""
        tmp_len = 1472
        port = 960
        proto = 32571
        ahost = 0x0
        aport = 0
        options = 0x7dd1e8 ":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 = 452880456
        rfd = 4
        debug_save = 1
        debug_flag = 1
        dont_fork_cnt = 2
        n_lst = 0x7ffe06ab6300
---Type <return> to continue, or q <return> to quit---
        p = 0xf0b5ff <Address 0xf0b5ff out of bounds>
        st = {st_dev = 20, st_ino = 10213, st_nlink = 2, st_mode = 16832, st_uid = 997, st_gid = 1000, __pad0 = 0, st_rdev = 0, st_size = 140, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1621343100, tv_nsec = 303103820}, 
          st_mtim = {tv_sec = 1621343111, tv_nsec = 571168953}, st_ctim = {tv_sec = 1621343111, tv_nsec = 571168953}, __unused = {0, 0, 0}}
        tbuf = '\000' <repeats 392 times>...
        option_index = 0
        long_options = {{name = 0x7df5ff "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x7da674 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x7df604 "alias", has_arg = 1, flag = 0x0, val = 1024}, {
            name = 0x7df60a "subst", has_arg = 1, flag = 0x0, val = 1025}, {name = 0x7df610 "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x7df619 "substdefs", has_arg = 1, flag = 0x0, val = 1027}, {
            name = 0x7df623 "server-id", has_arg = 1, flag = 0x0, val = 1028}, {name = 0x7df62d "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {name = 0x7df638 "modparam", has_arg = 1, flag = 0x0, val = 1030}, {
            name = 0x7df641 "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x7df64c "debug", has_arg = 1, flag = 0x0, val = 1032}, {name = 0x7df652 "cfg-print", has_arg = 0, flag = 0x0, val = 1033}, {
            name = 0x7df65c "atexit", has_arg = 1, flag = 0x0, val = 1034}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
        __FUNCTION__ = "main"
(gdb) 
(gdb) info locals
cfg_stream = 0x2918040
c = -1
r = 0
tmp = 0x7ffe06ab6823 ""
tmp_len = 1472
port = 960
proto = 32571
ahost = 0x0
aport = 0
options = 0x7dd1e8 ":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 = 452880456
rfd = 4
debug_save = 1
debug_flag = 1
dont_fork_cnt = 2
n_lst = 0x7ffe06ab6300
p = 0xf0b5ff <Address 0xf0b5ff out of bounds>
st = {st_dev = 20, st_ino = 10213, st_nlink = 2, st_mode = 16832, st_uid = 997, st_gid = 1000, __pad0 = 0, st_rdev = 0, st_size = 140, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1621343100, tv_nsec = 303103820}, st_mtim = {
    tv_sec = 1621343111, tv_nsec = 571168953}, st_ctim = {tv_sec = 1621343111, tv_nsec = 571168953}, __unused = {0, 0, 0}}
tbuf = '\000' <repeats 392 times>...
option_index = 0
long_options = {{name = 0x7df5ff "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x7da674 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x7df604 "alias", has_arg = 1, flag = 0x0, val = 1024}, {name = 0x7df60a "subst", 
    has_arg = 1, flag = 0x0, val = 1025}, {name = 0x7df610 "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x7df619 "substdefs", has_arg = 1, flag = 0x0, val = 1027}, {name = 0x7df623 "server-id", has_arg = 1, flag = 0x0, 
    val = 1028}, {name = 0x7df62d "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {name = 0x7df638 "modparam", has_arg = 1, flag = 0x0, val = 1030}, {name = 0x7df641 "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {
    name = 0x7df64c "debug", has_arg = 1, flag = 0x0, val = 1032}, {name = 0x7df652 "cfg-print", has_arg = 0, flag = 0x0, val = 1033}, {name = 0x7df65c "atexit", has_arg = 1, flag = 0x0, val = 1034}, {name = 0x0, has_arg = 0, flag = 0x0, 
    val = 0}}
__FUNCTION__ = "main"
(gdb) 
(gdb) list
1981	int main(int argc, char** argv)
1982	{
1983	
1984		FILE* cfg_stream;
1985		int c,r;
1986		char *tmp;
1987		int tmp_len;
1988		int port;
1989		int proto;
1990		char *ahost = NULL;
```

### Additional Information

I am used this configuration environment with some edit for start Kamailio.
```
https://github.com/2600hz/kazoo-configs-kamailio/tree/5.0/kamailio
```



-- 
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/2738
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210518/c1243c92/attachment-0001.htm>


More information about the sr-dev mailing list