[OpenSIPS-Devel] Possible bug on m_alloc or kernel
Daniel Zanutti
daniel.zanutti at gmail.com
Sat Apr 6 22:29:01 EDT 2019
Hi
I'm using opensips 1.11.9 version for almost 2 years and had no
problem like this before. Then a few days ago, opensips started to
crash. I checked coredump, was related to memory allocation.
It's weird that fm_malloc could generate this problem. The problematic
call has this code:
leg->r_cseq.s = (char*)shm_malloc( cseq->len );
Var cseq->len = 3, so no big deal.
I compared changes from my version 1.11.9 to 1.11.11 and found no
changes on memory management.
Unfortunately I cannot upgrade to 2.X at this time, so I need to
figure out using current version.
Could you guys help me understand what is the problem? Could this be a
kernel problem? I'm using debian 8.11, updated.
Thanks
################
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000000000051ae4d in fm_remove_free (n=0x7f5d9947a0a0,
qm=0x7f5d98eae000) at mem/f_malloc.c:172
172 *pf=n->u.nxt_free;
(gdb) bt full
#0 0x000000000051ae4d in fm_remove_free (n=0x7f5d9947a0a0,
qm=0x7f5d98eae000) at mem/f_malloc.c:172
pf = 0x0
hash = 1
#1 fm_malloc (qm=0x7f5d98eae000, size=8, size at entry=3) at mem/f_malloc.c:386
frag = 0x7f5d9947a0a0
n = <optimized out>
hash = 1
__FUNCTION__ = "fm_malloc"
#2 0x00007f5ddced34a3 in shm_malloc (size=3) at ../../evi/../mem/shm_mem.h:336
p = <optimized out>
#3 dlg_add_leg_info (dlg=dlg at entry=0x7f5d99518a28,
tag=tag at entry=0x7f5ddfd863d8, rr=rr at entry=0x7ffe4da5a680,
contact=contact at entry=0x7ffe4da5a670, cseq=cseq at entry=0x7ffe4da5a660,
sock=<optimized out>, mangled_from=mangled_from at entry=0x0,
mangled_to=mangled_to at entry=0x0) at dlg_hash.c:338
leg = 0x7f5d99586e30
new_legs = 0x7f5d99586e30
head = 0x0
rrp = <optimized out>
__FUNCTION__ = "dlg_add_leg_info"
#4 0x00007f5ddcedf96a in init_leg_info (dlg=dlg at entry=0x7f5d99518a28,
msg=msg at entry=0x7f5ddfd78520, tag=0x7f5ddfd863d8,
mangled_from=mangled_from at entry=0x0, mangled_to=mangled_to at entry=0x0,
t=0x0) at dlg_handlers.c:241
skip_recs = 0
cseq = {s = 0x820ae4 <buf+356> "103 INVITE\r\nUser-Agent:
Plataforma NCall\r\nProxy-Authorization: Digest username=\"11055\",
realm=\"sip1.agitel.com.br\", algorithm=MD5,
uri=\"sip:554532221172 at 18.231.26.42:5060\",
nonce=\"5ca8ed170000cf432c89"..., len = 3}
contact = {s = 0x820a81 <buf+257>
"sip:11055 at 177.70.11.181:5060>\r\nCall-ID:
0929d2d75c36753e2a6bdda43291ed3e at sip1.agitel.com.br\r\nCSeq: 103
INVITE\r\nUser-Agent: Plataforma NCall\r\nProxy-Authorization: Digest
username=\"11055\", realm=\"sip1.a"..., len = 28}
rr_set = {s = 0x0, len = 0}
is_req = <optimized out>
#5 0x00007f5ddcee4c8b in dlg_create_dialog (t=0x0,
req=req at entry=0x7f5ddfd78520, flags=flags at entry=8) at
dlg_handlers.c:883
dlg = 0x7f5d99518a28
s = {s = 0x820aa9 <buf+297>
"0929d2d75c36753e2a6bdda43291ed3e at sip1.agitel.com.br\r\nCSeq: 103
INVITE\r\nUser-Agent: Plataforma NCall\r\nProxy-Authorization: Digest
username=\"11055\", realm=\"sip1.agitel.com.br\", algorithm=MD5,
uri=\"sip:5"..., len = 51}
extra_ref = <optimized out>
types = <optimized out>
__FUNCTION__ = "dlg_create_dialog"
More information about the Devel
mailing list