Hi,
2010/5/26 Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Does the same deadlock appears with 3.0/sip-router?
I have tried to reproduce the problem with the master version from git. (
kamctl fifo version shows: Server:: kamailio (3.0.99-dev1 (i386/linux))). I
have used a modified version of kamailio.cfg sample file so it supports
pua_dialoginfo and presence_dialoginfo. After some hours of testing, one of
the udp worker processes has blocked. From the backtrace, the deadlock
doesn't look the same but apparently the pua_dialoginfo module is also
involved. Here is the backtrace:
#0 0xb764766e in strncmp () from /lib/i686/cmov/libc.so.6
#1 0xb6f63ea2 in search_htable (pres=0xbfffc828, hash_code=359) at
hash.c:127
#2 0xb6f72574 in send_publish (publ=0x82d8814) at send_publish.c:426
#3 0xb6f5a9f2 in dialog_publish (state=0xb6f5d554 "confirmed",
entity=0xbfffcb0c, peer=0xa7245470, callid=0xa7245480, initiator=0,
lifetime=43200,
localtag=0x0, remotetag=0x0, localtarget=0xbfffcb04,
remotetarget=0xa7245498) at dialog_publish.c:349
#4 0xb6f5bf09 in __dialog_sendpublish (dlg=0xad5e13bc, type=8,
_params=0xb713ac04) at pua_dialoginfo.c:225
#5 0xb71113c4 in run_dlg_callbacks (type=8, dlg=0xad5e13bc, msg=0x82d7ad8,
dir=2, dlg_data=0x0) at dlg_cb.c:252
#6 0xb711a296 in dlg_onreply (t=0xad5d84dc, type=128, param=0xbfffcca8) at
dlg_handlers.c:381
#7 0xb727b2c5 in run_trans_callbacks_internal (cb_lst=0xad5d851c, type=128,
trans=0xad5d84dc, params=0xbfffcca8) at t_hooks.c:290
#8 0xb727b5ab in run_trans_callbacks (type=128, trans=0x1, req=0xb3b75130,
rpl=0x82d7ad8, code=200) at t_hooks.c:317
#9 0xb72a4543 in relay_reply (t=0xad5d84dc, p_msg=0x82d7ad8, branch=0,
msg_status=200, cancel_bitmap=0xbfffcfa0, do_put_on_wait=1) at
t_reply.c:1749
#10 0xb72a5021 in reply_received (p_msg=0x82d7ad8) at t_reply.c:2222
#11 0x0808c985 in forward_reply (msg=0x82d7ad8) at forward.c:751
#12 0x080c7ec4 in receive_msg (
buf=0x82634c0 "SIP/2.0 200 OK\r\nRecord-Route:
<sip:192.168.1.47;lr=on;did=d94.d1a539e5>\r\nVia: SIP/2.0/UDP
192.168.1.47;branch=z9hG4bKa7f2.1b4b7f12.0, SIP/2.0/UDP
127.0.1.1:5061;received=192.168.1.47;branch=z9hG4bK-31"...,
len=597, rcv_info=0xbfffd1b8) at receive.c:266
#13 0x0814ac83 in udp_rcv_loop () at udp_server.c:527
#14 0x0809b54f in main_loop () at main.c:1462
#15 0x0809e7fb in main (argc=3, argv=0xbfffd4d4) at main.c:2315
I have gone through the code and the process is blocked in this line of code
at ./modules_k/pua/hash.c:127
if((p->pres_uri->len==pres->pres_uri->len) &&
(strncmp(p->pres_uri->s,
pres->pres_uri->s,pres->pres_uri->len)==0))
but I don't understand why it is blocking in the strncmp function as all the
values seem ok. From gdb:
(gdb) print p->pres_uri->s
$8 = 0xa7294204 "sip:service@192.168.1.47:5060D
IALOG_PUBLISH.598-3004(a)127.0.1.1\nm=audio 6000 RTP/AVP 0\r\na=rtpmap:0
PCMU/8000\r\n"
(gdb) print p->pres_uri->len
$9 = 29
(gdb) print pres->pres_uri->len
$10 = 29
(gdb) print pres->pres_uri->s
$11 = 0x82d8850 "sip:service@192.168.1.47:5060u\210-\b#\002"
Any idea why this is happening?
Thanks.
Best regards,
Santi