On Jun 12, 2010 at 13:19, Santiago Gimeno <santiago.gimeno(a)gmail.com> wrote:
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.
By "blocked" you mean eating 100% cpu?
Could you run a ps -lwwww <pid_of_blocked_process> ?
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
[...]
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?
If it's using 100% cpu it might mean the list that search_htable()
iterates on is corrupted and has become cyclic.
You could also try compiling with debugging options, e.g.:
make config mode=debug; make all
or
make config CC_EXTRA_OPTS="-O0" ; make all
Andrei