### Description
The kamailio 5.6.0 segfault on restart
### Troubleshooting
Kamailio sends a Ping Options packet to the registered UA with keepalive functional of
usrloc module. When you restart the kamailio with the systemctl restart kamailio command,
the kamailio is segfault. In version the 5.5.4 same as in 5.6.0
#### Reproduction
1. Enabled keepalive functional of usrloc module.
2. Registered UA on wss protocol.
3. Restart the kamailio
parameters on usrloc module
```
loadmodule "usrloc.so"
modparam("usrloc", "user_column", "username")
modparam("usrloc", "contact_column", "contact")
modparam("usrloc", "expires_column", "expires")
modparam("usrloc", "q_column", "q")
modparam("usrloc", "callid_column", "callid")
modparam("usrloc", "cseq_column", "cseq")
modparam("usrloc", "methods_column", "methods")
modparam("usrloc", "flags_column", "flags")
modparam("usrloc", "cflags_column", "cflags")
modparam("usrloc", "user_agent_column",
"user_agent")
modparam("usrloc", "received_column", "received")
modparam("usrloc", "ruid_column", "ruid")
modparam("usrloc", "keepalive_column",
"keepalive")
modparam("usrloc", "use_domain", 0)
modparam("usrloc", "db_url", "DBURL")
modparam("usrloc", "db_mode", 1)
modparam("usrloc", "matching_mode", 1)
modparam("usrloc", "preload", "location")
modparam("usrloc", "nat_bflag", FLB_NATB)
modparam("usrloc", "handle_lost_tcp", 1)
modparam("usrloc", "timer_interval", 10)
modparam("usrloc", "version_table", 0)
#
modparam("usrloc", "ka_mode", 1)
modparam("usrloc", "ka_method", "OPTIONS")
modparam("usrloc", "ka_from",
"sip:keepalive_test@own.domain")
modparam("usrloc", "ka_domain", "own.domain")
modparam("usrloc", "ka_timeout", 30)
modparam("usrloc", "ka_loglevel", 3)
```
#### Debugging Data
```
[root@dev /]# gdb core.26872
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/>...
[New LWP 26872]
Reading symbols from /usr/sbin/kamailio...Reading symbols from
/usr/lib/debug/usr/sbin/kamailio.debug...done.
done.
Missing separate debuginfo for
Try: yum --enablerepo='*debug*' install
/usr/lib/debug/.build-id/28/2d891905d3d759f5eebb335af499da3efa03ab
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f
/etc/kamailio/kamailio.'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f54e6ee9594 in atomic_cmpxchg_int (var=0x0, old=0, new_v=1) at
../../core/atomic/atomic_x86.h:224
224 ATOMIC_FUNC_CMPXCHG(cmpxchg, "cmpxchgl %2, %1", int , int)
Missing separate debuginfos, use: debuginfo-install
MariaDB-compat-10.4.21-1.el7.centos.x86_64 cyrus-sasl-lib-2.1.26-23.el7.x86_64
glibc-2.17-324.el7_9.x86_64 jansson-2.10-1.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64
krb5-libs-1.15.1-50.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 libselinux-2.5-15.el7.x86_64 libssh2-1.8.0-4.el7.x86_64
libstdc++-4.8.5-44.el7.x86_64 libunistring-0.9.3-9.el7.x86_64 libuv-1.42.0-2.el7.x86_64
libwebsockets-3.0.1-2.el7.x86_64 nspr-4.25.0-2.el7_9.x86_64 nss-3.53.1-7.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-24.el7_9.x86_64 openssl-libs-1.0.2k-25.el7_9.x86_64
pcre-8.32-17.el7.x86_64 zlib-1.2.7-19.el7_9.x86_64
(gdb) set follow-fork-mode child
(gdb) set detach-on-fork off
(gdb) set print pretty on
(gdb) set print elements 0
(gdb) set height 0
(gdb) bt full
#0 0x00007f54e6ee9594 in atomic_cmpxchg_int (var=0x0, old=0, new_v=1) at
../../core/atomic/atomic_x86.h:224
ret = 0
#1 0x00007f54e6ee95e0 in futex_get (lock=0x0) at ../../core/futexlock.h:99
v = 32596
i = 1024
#2 0x00007f54e6eefa76 in wsconn_get (id=1990) at ws_conn.c:463
id_hash = 966
wsc = 0x100000001
__FUNCTION__ = "wsconn_get"
#3 0x00007f54e6f04386 in ws_frame_transmit (evp=0x7fff118f9e30) at ws_frame.c:728
wsev = 0x7fff118f9e70
frame = {
fin = 1,
rsv1 = 0,
rsv2 = 0,
rsv3 = 0,
opcode = 1,
mask = 0,
payload_len = 366,
masking_key = "\000\000\000",
payload_data = 0x7fff118fa4a0 "OPTIONS
sip:loginUA@own.domain:5071;transport=ws SIP/2.0\r\nVia: SIP/2.0/WS
x.x.x.x:5071;branch=z9hG4bKx.2.1.0\r\nFrom:
<sip:keepalive_test@own.domain>;tag=uloc-62e8f62c-690e-7d1-300862f3-62eb7d2c-7d154-2.1\r\nTo:
<sip:loginUA@own.domain>\r\nCall-ID: ksrulka-2.1\r\nCSeq: 80
OPTIONS\r\nContent-Length: 0\r\n\r\n",
wsc = 0x0
}
__FUNCTION__ = "ws_frame_transmit"
#4 0x000000000052a8e1 in sr_event_exec (type=11, evp=0x7fff118f9e30) at
core/events.c:305
ret = 0
i = 33998
#5 0x000000000057c5cc in wss_send (dst=0x7fff118fa230,
buf=0x7fff118fa4a0 "OPTIONS sip:loginUA@own.domain:5071;transport=ws
SIP/2.0\r\nVia: SIP/2.0/WS x.x.x.x:5071;branch=z9hG4bKx.2.1.0\r\nFrom:
<sip:keepalive_test@own.domain>;tag=uloc-62e8f62c-690e-7d1-300862f3-62eb7d2c-7d154-2.1\r\nTo:
<sip:loginUA@own.domain>\r\nCall-ID: ksrulka-2.1\r\nCSeq: 80
OPTIONS\r\nContent-Length: 0\r\n\r\n", len=366) at core/tcp_main.c:5321
port = 33998
ip = {
af = 2,
len = 4,
u = {
addrl = {2894360143, 140733488013344},
addr32 = {2894360143, 0, 294625312, 32767},
addr16 = {28239, 44164, 0, 0, 40992, 4495, 32767, 0},
addr = "On\204\254\000\000\000\000 \240\217\021\377\177\000"
}
}
from = 0x0
local_addr = {
s = {
sa_family = 0,
sa_data = "\000\000\000\000\000\000\207\035r\000\000\000\000"
},
sin = {
sin_family = 0,
sin_port = 0,
sin_addr = {
s_addr = 0
},
sin_zero = "\207\035r\000\000\000\000"
},
sin6 = {
sin6_family = 0,
sin6_port = 0,
sin6_flowinfo = 0,
sin6_addr = {
__in6_u = {
__u6_addr8 =
"\207\035r\000\000\000\000\000\000\000\217\021\377\177\000",
__u6_addr16 = {7559, 114, 0, 0, 0, 4495, 32767, 0},
__u6_addr32 = {7478663, 0, 294584320, 32767}
}
},
sin6_scope_id = 0
},
sas = {
ss_family = 0,
__ss_padding =
"\000\000\000\000\000\000\207\035r\000\000\000\000\000\000\000\217\021\377\177\000\000\000\000\000\000\000\000\000\000\365h",
'\000' <repeats 14 times>, "\370\n\177", '\000'
<repeats 13 times>,
"\\\271\204\000\000\000\000\000\005\000\000\000\000\000\000\000\377\377\377\377\377\177\000\000\350\030i\000\000\000\000\000\360\237\217\021\377\177\000\000\200\020\017wU\177\000\000\000\000\000\000\000\000\000",
__ss_align = 140733488014064
}
}
con = 0x7f54eeeaf040
wsev = {
type = 11,
buf = 0x7fff118fa4a0 "OPTIONS sip:loginUA@own.domain:5071;transport=ws
SIP/2.0\r\nVia: SIP/2.0/WS x.x.x.x:5071;branch=z9hG4bKx.2.1.0\r\nFrom:
<sip:keepalive_test@own.domain>;tag=uloc-62e8f62c-690e-7d1-300862f3-62eb7d2c-7d154-2.1\r\nTo:
<sip:loginUA@own.domain>\r\nCall-ID: ksrulka-2.1\r\nCSeq: 80
OPTIONS\r\nContent-Length: 0\r\n\r\n",
len = 366,
id = 1990
}
evp = {
data = 0x7fff118f9e70,
obuf = {
s = 0x0,
len = 0
},
rcv = 0x0,
dst = 0x0,
req = 0x0,
rpl = 0x0,
rplcode = 0,
mode = 0
}
ret = 0
__FUNCTION__ = "wss_send"
#6 0x00007f54e96275c0 in ul_ka_send (kamsg=0x7fff118fa490, kadst=0x7fff118fa230) at
ul_keepalive.c:259
__FUNCTION__ = "ul_ka_send"
#7 0x00007f54e96274d1 in ul_ka_urecord (ur=0x7f54eefa0898) at ul_keepalive.c:239
uc = 0x7f54eef67a90
kabuf = "OPTIONS sip:loginUA@own.domain:5071;transport=ws SIP/2.0\r\nVia:
SIP/2.0/WS x.x.x.x:5071;branch=z9hG4bKx.2.1.0\r\nFrom:
<sip:keepalive_test@own.domain>;tag=uloc-62e8f62c-690e-7d1-300862f3-62eb7d2c-7d154-2.1\r\nTo:
<sip:loginUA@own.domain>\r\nCall-ID: ksrulka-2.1\r\nCSeq: 80
OPTIONS\r\nContent-Length:
0\r\n\r\n\000\000\326\301b\312\326\301b\312\326\301b\312\326\301b\312",
'\000' <repeats 112 times>,
"SXPF\214\n\000\000\347\002\000\000\000\000\000\000\210\n", '\000'
<repeats 30 times>, "\003\002", '\000' <repeats 318 times>,
"\240'\004\001\000\000\000\000;W\327vU\177\000\000\000\000\000\000\000\000\000\000\345*n\000\000\000\000\000`\250\217\021\377\177\000\000\020ЏnU\177\000\000\210\004JoU\177\000\000\020ЏnU\177\000\000\240\250\217\021\377\177\000\000\235L\316\347T\177\000\000\320ӏnU\177",
'\000' <repeats 13 times>, "\b\000\000\000\000\b\327@\a\000\000\000\000
%\224\000\000\000\000\000\370(\277\000\000\000\000\000\230\347\277\000\000\000\000\000\b\000\000\000\000\000\000\000\023\000\000\000\000\000\000\000\210\004JoU\177\000\000Ш\217\021\377\177\000\000\005\357\205\000\000\000\000\000\377\001\000\000\370\001\000\000\236\335\060\346T\177\000\000\370S\355\355T\177\000\000\000\000\263\355T\177\000\000\020\252\217\021\377\177\000\000k\234m\000\000\000\000\000\360\212\037\354T\177",
'\000' <repeats 74 times>,
"\370S\355\355T\177\000\000\000\000\263\355T\177\000\000\370\n\177\000\004\000\000\000P\003\263\355T\177\000\000\\\271\204\000\a\000\000\000PR\337\356T\177\000\000Ъ\217\021\377\177\000\000]\275m\000\000\000\000\000Щ\217\021\377\177\000\000\005\357\205\000\000\000\000\000\067\002\000\000\027\002\000\000\236\335\060\346T\177\000\000\230D\354\355T\177\000\000\000\000\263\355T\177\000\000\230$\224\000\000\000\000\000\240'\277\000\000\000\000\000\230\347\277\000\000\000\000\000\001\000\000\000\b\000\000\000\026\000\000\000\000\000\000\000\210\004JoU\177\000\000\000\252\217\021\377\177\000\000\000\000\000\000\000\000̇\300\334\060\346T\177\000\000\345*n\000\020\000\000\000\060\252\217\021\377\177\000\000_zm\000\000\000\000\000\230D\354\355T\177\000\000\000\000\263\355T\177\000\000\230D\354\355\004\000\000\000`́\000\000\000\000\000Xj\231\356\003\b\000\000Xj\231\356T\177\000\000
\253\217\021\377\177\000\000\070\375T\000\000\000\000\000\067\002\000\000\313\000\000\000\236\335\060\346T\177\000\000\020,\354\355T\177\000\000\000\000\263\355T\177\000\000\230T\355\355T\177\000\000\210S\355\355T\177\000\000\001\000\000\000\000\000\000\000P\253\217\021\377\177",
'\000' <repeats 14 times>,
"\306\a\000\000\067\002\000\000\233\017\000\000\v\343A\347T\177\000\000`\261\353\355T\177\000\000\000\000\263\355T\177\000\000\360\252\217\021\377\177\000\000_zm\000\000\000\000\000\001\000\000\000\000\000\000\000\370ֻ\355T\177\000\000\067\002\000\000\233\017\000\000\v\343A\347\306\003\000\000
\253\217\021\001\000\000\000\370ֻ\355T\177\000\000
\253\217\021\377\177\000\000\300\032S\000\000\000\000\000\370\n\177\000\000\000\000\000\370ֻ\355T\177\000\000\\\271\204\000\000\000\000\000\270\361\352\356\001\000\000\000\200\253\217\021\377\177\000\000\267\006U",
'\000' <repeats 33 times>,
"\306\a\000\000\067\002\000\000\233\017\000\000\v\343A\347T\177\000\000\060\235\353\355T\177\000\000\000\000\263\355T\177\000\000po\362\356\000\000\000\000@\360\352\356T\177\000\000\260\253\217\021\377\177\000\000\370\006U\000\000\000\000\000\067\002\000\000\000\000\000\000\270\361\352\356T\177",
'\000' <repeats 14 times>,
"\306\a\000\000\340\253\217\021\377\177\000\000N\211_\351T\177\000\000\067\002\000\000_\000\000\000\220z\366\356T\177\000\000@\360\352\356T\177\000\000\220z\366\356T\177\000\000\020\255\217\021\377\177\000\000K\245_\351T\177\000\000\070N\343\355T\177\000\000\000\000\263\355T\177\000\000@\254\217\021\377\177\000\000_zm\000\000\000\000\000xT\343\355T\177\000\000\000\000\000\000\000\200\021\200\070N\343\355T\177\000\000\000\000\263\355T\177\000\000\070N\343\355T\177\000\000\240
\263\355T\177\000\000\000\t\263\355J\000\000\000\240 \263\355T\177\000\000\300\255\217\0
kabuf_len = 366
kamsg = {
s = 0x7fff118fa4a0 "OPTIONS sip:loginUA@own.domain:5071;transport=ws
SIP/2.0\r\nVia: SIP/2.0/WS x.x.x.x:5071;branch=z9hG4bKx.2.1.0\r\nFrom:
<sip:keepalive_test@own.domain>;tag=uloc-62e8f62c-690e-7d1-300862f3-62eb7d2c-7d154-2.1\r\nTo:
<sip:loginUA@own.domain>\r\nCall-ID: ksrulka-2.1\r\nCSeq: 80
OPTIONS\r\nContent-Length: 0\r\n\r\n",
len = 366
}
vaddr = {
s = 0x7f556f4999f8 "x.x.x.x",
len = 13
}
vport = {
s = 0x7f556f499988 "5071",
len = 4
}
sdst = {
s = 0x7f54eef745b0 "sip:y.y.y.y:33998;transport=ws",
len = 37
}
sproto = {
s = 0x84501d "WS",
len = 2
}
duri = {
user = {
s = 0x0,
len = 0
},
passwd = {
s = 0x0,
len = 0
},
host = {
s = 0x7f54eef745b4 "y.y.y.y:33998;transport=ws",
len = 14
},
port = {
s = 0x7f54eef745c3 "33998;transport=ws",
len = 5
},
params = {
s = 0x7f54eef745c9 "transport=ws",
len = 12
},
sip_params = {
s = 0x7f54eef745c9 "transport=ws",
len = 12
},
headers = {
s = 0x0,
len = 0
},
port_no = 33998,
proto = 5,
type = SIP_URI_T,
flags = (unknown: 0),
transport = {
s = 0x7f54eef745c9 "transport=ws",
len = 12
},
ttl = {
s = 0x0,
len = 0
},
user_param = {
s = 0x0,
len = 0
},
maddr = {
s = 0x0,
len = 0
},
method = {
s = 0x0,
len = 0
},
lr = {
s = 0x0,
len = 0
},
r2 = {
s = 0x0,
len = 0
},
gr = {
s = 0x0,
len = 0
},
transport_val = {
s = 0x7f54eef745d3 "ws",
len = 2
},
ttl_val = {
s = 0x0,
len = 0
},
user_param_val = {
s = 0x0,
len = 0
},
maddr_val = {
s = 0x0,
len = 0
},
method_val = {
s = 0x0,
len = 0
},
lr_val = {
s = 0x0,
len = 0
},
r2_val = {
s = 0x0,
len = 0
},
gr_val = {
s = 0x0,
len = 0
}
}
dproto = 5 '\005'
he = 0xb53580 <he.7561>
ssock = 0x7f556e9a3948
idst = {
send_sock = 0x7f556e9a3948,
to = {
s = {
sa_family = 2,
sa_data = "\204\316On\204\254\000\000\000\000\000\000\000"
},
sin = {
sin_family = 2,
sin_port = 52868,
sin_addr = {
s_addr = 2894360143
},
sin_zero = "\000\000\000\000\000\000\000"
},
sin6 = {
sin6_family = 2,
sin6_port = 52868,
sin6_flowinfo = 2894360143,
sin6_addr = {
__in6_u = {
__u6_addr8 = '\000' <repeats 15 times>,
__u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
__u6_addr32 = {0, 0, 0, 0}
}
},
sin6_scope_id = 0
},
sas = {
ss_family = 2,
__ss_padding = "\204\316On\204\254", '\000' <repeats
111 times>,
__ss_align = 0
}
},
id = 0,
send_flags = {
f = 0,
blst_imask = 0
},
proto = 5 '\005',
proto_pad0 = 0 '\000',
proto_pad1 = 0
}
bcnt = 1
aortype = 0
i = 23
tv = {
tv_sec = 1659600172,
tv_usec = 512340
}
tnow = 1659600172
__FUNCTION__ = "ul_ka_urecord"
#8 0x00007f54e95f2985 in mem_timer_udomain (_d=0x7f54ede28b88, istart=0, istep=1) at
udomain.c:1287
ptr = 0x7f54eefa0898
t = 0x7f54ede34e38
i = 755
#9 0x00007f54e9624b28 in synchronize_all_udomains (istart=0, istep=1) at dlist.c:968
res = 0
ptr = 0x7f54ede28a88
#10 0x00007f54e9601a67 in destroy () at usrloc_mod.c:512
__FUNCTION__ = "destroy"
#11 0x00000000005d08c4 in destroy_modules () at core/sr_module.c:839
t = 0x7f556e9bcf98
foo = 0x7f556e9bc240
__FUNCTION__ = "destroy_modules"
#12 0x000000000041e0fa in cleanup (show_status=1) at main.c:561
memlog = 0
__FUNCTION__ = "cleanup"
#13 0x000000000041f9d5 in shutdown_children (sig=15, show_status=1) at main.c:704
__FUNCTION__ = "shutdown_children"
#14 0x000000000042054a in handle_sigs () at main.c:735
chld = 0
chld_status = 0
any_chld_stopped = 0
memlog = -301737376
__FUNCTION__ = "handle_sigs"
#15 0x000000000042ecf1 in main_loop () at main.c:1900
i = 2
pid = 26897
si = 0x0
si_desc = "udp receiver child=1
sock=x.x.x.x:5060\000\177\000\000\250\240\020oU\177\000\000\000,@oU\177\000\000\360\263\217\021\377\177\000\000\070\365\234nU\177\000\000\360\256\201\000\000\000\000\000
\242\020oU\177\000\000c\276\201\000\000\000\000\000\373\257\201\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\263\355T\177\000"
nrprocs = 2
woneinit = 1
__FUNCTION__ = "main_loop"
#16 0x00000000004377eb in main (argc=13, argv=0x7fff118fba48) at main.c:3074
cfg_stream = 0xcbc030
c = -1
r = 0
tmp = 0x7fff118fcf2e ""
tmp_len = 1408
port = 896
proto = 32597
ahost = 0x0
aport = 0
options = 0x7f3c80
":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 = 1300414379
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 0
n_lst = 0x7fff118fb900
p = 0x0
st = {
st_dev = 20,
st_ino = 13137,
st_nlink = 2,
st_mode = 16832,
st_uid = 990,
st_gid = 986,
__pad0 = 0,
st_rdev = 0,
st_size = 40,
st_blksize = 4096,
st_blocks = 0,
st_atim = {
tv_sec = 1658932830,
tv_nsec = 26739696
},
st_mtim = {
tv_sec = 1659434539,
tv_nsec = 91576515
},
st_ctim = {
tv_sec = 1659434539,
tv_nsec = 91576515
},
__unused = {0, 0, 0}
}
tbuf = '\000' <repeats 392 times>,
"\204ƢwU\177\000\000\000\000\000\000\000\000\000\000`џ\021\377\177\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000&\260be\000\000\000\000X\316\242wU\177\000\000\000\000\000\000\000\000\000\000\240\267\217\021\377\177\000\000\300\212\225\001\000\000\000\000\300џ\021\377\177\000\000\260\270\217\021\377\177\000\000&",
'\000' <repeats 22 times>
option_index = 0
long_options = {{
name = 0x7f60af "help",
has_arg = 0,
flag = 0x0,
val = 104
}, {
name = 0x7f0f54 "version",
has_arg = 0,
flag = 0x0,
val = 118
}, {
name = 0x7f60b4 "alias",
has_arg = 1,
flag = 0x0,
val = 1024
}, {
name = 0x7f60ba "subst",
has_arg = 1,
flag = 0x0,
val = 1025
}, {
name = 0x7f60c0 "substdef",
has_arg = 1,
flag = 0x0,
val = 1026
}, {
name = 0x7f60c9 "substdefs",
has_arg = 1,
flag = 0x0,
val = 1027
}, {
name = 0x7f60d3 "server-id",
has_arg = 1,
flag = 0x0,
val = 1028
}, {
name = 0x7f60dd "loadmodule",
has_arg = 1,
flag = 0x0,
val = 1029
}, {
name = 0x7f60e8 "modparam",
has_arg = 1,
flag = 0x0,
val = 1030
}, {
name = 0x7f60f1 "log-engine",
has_arg = 1,
flag = 0x0,
val = 1031
}, {
name = 0x7f60fc "debug",
has_arg = 1,
flag = 0x0,
val = 1032
}, {
name = 0x7f6102 "cfg-print",
has_arg = 0,
flag = 0x0,
val = 1033
}, {
name = 0x7f610c "atexit",
has_arg = 1,
flag = 0x0,
val = 1034
}, {
name = 0x0,
has_arg = 0,
flag = 0x0,
val = 0
}}
__FUNCTION__ = "main"
(gdb) info locals
cfg_stream = 0xcbc030
c = -1
r = 0
tmp = 0x7fff118fcf2e ""
tmp_len = 1408
port = 896
proto = 32597
ahost = 0x0
aport = 0
options = 0x7f3c80
":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 = 1300414379
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 0
n_lst = 0x7fff118fb900
p = 0x0
st = {
st_dev = 20,
st_ino = 13137,
st_nlink = 2,
st_mode = 16832,
st_uid = 990,
st_gid = 986,
__pad0 = 0,
st_rdev = 0,
st_size = 40,
st_blksize = 4096,
st_blocks = 0,
st_atim = {
tv_sec = 1658932830,
tv_nsec = 26739696
},
st_mtim = {
tv_sec = 1659434539,
tv_nsec = 91576515
},
st_ctim = {
tv_sec = 1659434539,
tv_nsec = 91576515
},
__unused = {0, 0, 0}
}
tbuf = '\000' <repeats 392 times>,
"\204ƢwU\177\000\000\000\000\000\000\000\000\000\000`џ\021\377\177\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000&\260be\000\000\000\000X\316\242wU\177\000\000\000\000\000\000\000\000\000\000\240\267\217\021\377\177\000\000\300\212\225\001\000\000\000\000\300џ\021\377\177\000\000\260\270\217\021\377\177\000\000&",
'\000' <repeats 22 times>
option_index = 0
long_options = {{
name = 0x7f60af "help",
has_arg = 0,
flag = 0x0,
val = 104
}, {
name = 0x7f0f54 "version",
has_arg = 0,
flag = 0x0,
val = 118
}, {
name = 0x7f60b4 "alias",
has_arg = 1,
flag = 0x0,
val = 1024
}, {
name = 0x7f60ba "subst",
has_arg = 1,
flag = 0x0,
val = 1025
}, {
name = 0x7f60c0 "substdef",
has_arg = 1,
flag = 0x0,
val = 1026
}, {
name = 0x7f60c9 "substdefs",
has_arg = 1,
flag = 0x0,
val = 1027
}, {
name = 0x7f60d3 "server-id",
has_arg = 1,
flag = 0x0,
val = 1028
}, {
name = 0x7f60dd "loadmodule",
has_arg = 1,
flag = 0x0,
val = 1029
}, {
name = 0x7f60e8 "modparam",
has_arg = 1,
flag = 0x0,
val = 1030
}, {
name = 0x7f60f1 "log-engine",
has_arg = 1,
flag = 0x0,
val = 1031
}, {
name = 0x7f60fc "debug",
has_arg = 1,
flag = 0x0,
val = 1032
}, {
name = 0x7f6102 "cfg-print",
has_arg = 0,
flag = 0x0,
val = 1033
}, {
name = 0x7f610c "atexit",
has_arg = 1,
flag = 0x0,
val = 1034
}, {
name = 0x0,
has_arg = 0,
flag = 0x0,
val = 0
}}
__FUNCTION__ = "main"
(gdb) list
219 ATOMIC_FUNC_DECL2(and, "andl %1, %0", int)
220 ATOMIC_FUNC_DECL2(or, "orl %1, %0", int)
221 ATOMIC_FUNC_TEST(inc_and_test, "incl %0", int, int)
222 ATOMIC_FUNC_TEST(dec_and_test, "decl %0", int, int)
223 ATOMIC_FUNC_XCHG(get_and_set, "xchgl %1, %0", int)
224 ATOMIC_FUNC_CMPXCHG(cmpxchg, "cmpxchgl %2, %1", int , int)
225 ATOMIC_FUNC_XADD(add, "xaddl %0, %1", int)
226 #ifdef __CPU_x86_64
227 ATOMIC_FUNC_DECL1(inc, "incq %0", long)
228 ATOMIC_FUNC_DECL1(dec, "decq %0", long)
(gdb)
```
#### Log Messages
/var/log/kamailio.log
```
Aug 4 11:02:52 dev [26872]: NOTICE: <core> [main.c:733]: handle_sigs(): Thank you
for flying kamailio!!!
```
/var/log/messages
```
Aug 4 11:02:52 dev systemd: Stopping Kamailio (OpenSER) - the Open Source SIP Server...
Aug 4 11:02:52 dev kernel: kamailio[26872]: segfault at 0 ip 00007f54e6ee9594 sp
00007fff118f9b10 error 6 in websocket.so[7f54e6edf000+32000]
Aug 4 11:02:57 dev systemd: kamailio.service: main process exited, code=dumped,
status=11/SEGV
Aug 4 11:02:57 dev systemd: Stopped Kamailio (OpenSER) - the Open Source SIP Server.
Aug 4 11:02:57 dev systemd: Unit kamailio.service entered failed state.
Aug 4 11:02:57 dev systemd: kamailio.service failed.
Aug 4 11:02:57 dev systemd: Starting Kamailio (OpenSER) - the Open Source SIP Server...
Aug 4 11:02:58 dev kamailio: loading modules under config path:
/usr/lib64/kamailio/modules/
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
[root@dev ~]# /usr/sbin/kamailio -v
version: kamailio 5.6.0 (x86_64/linux) b0d6a6
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
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: b0d6a6
compiled on 13:24:32 May 30 2022 with gcc 4.8.5
```
* **Operating System**:
```
[root@dev ~]# uname -a
Linux own.domain 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64
x86_64 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3207
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3207(a)github.com>