<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>Hi Jason ,</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><br></div><div>It could be that it crashed in a CANCEL / 200 OK race condition. I clearly remember sending CANCEL for that call. </div><div>Maybe the reply that shows in "bt full" is the 200 OK reply that Kamailio generates for CANCEL ?</div><div>It might also be possible that it crashed after a succesfull t_suspend() , but I am not sure the other side received the INVITE and answered.</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; ">Dragos</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif;
background-color: transparent; font-style: normal; "><br></div> <div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Jason Penton <jason.penton@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Dragos Oancea <droancea@yahoo.com>; Kamailio (SER) - Development Mailing List <sr-dev@lists.sip-router.org> <br><b><span style="font-weight: bold;">Cc:</span></b> "miconda@gmail.com" <miconda@gmail.com> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, April 4, 2013 9:33 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [sr-dev] segfault with t_suspend() / t_continue()<br> </font> </div> <br>
<div id="yiv2025900642"><div dir="ltr">Hey Dragos,<div><br></div><div style="">okay I just looked at your config and I see you are not using suspend/continue in a reply block so you shouldn't have crash.</div><div style=""><br></div><div style="">Cheers</div>
<div style="">jason</div></div><div class="yiv2025900642gmail_extra"><br><br><div class="yiv2025900642gmail_quote">On Thu, Apr 4, 2013 at 9:26 PM, Dragos Oancea <span dir="ltr"><<a rel="nofollow" ymailto="mailto:droancea@yahoo.com" target="_blank" href="mailto:droancea@yahoo.com">droancea@yahoo.com</a>></span> wrote:<br>
<blockquote class="yiv2025900642gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "><div><span>Hi Daniel, hi Guys,</span></div><div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; ">
<span><br></span></div><div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span>I did not stress test it, I only had one registered device (which sent the INVITE) , and another one was supposed to register after some event triggered by kamailio via a http query (using the utils module) - that's</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span>the reason I parked the transaction with "t_suspend()" .</span></div><div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; ">
<span>When the REGISTER for the second device comes I send the INVITE to the it .( lookup() , t_relay() ) . This is a scenario that works for me. I could say I tested 10 times and 1 time crashed.</span></div><div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; ">
<span>I plan to stress test these days, let me know if I should get some information for you while doing it. </span></div><div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; ">
<br></div><div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span><br></span></div><div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; ">
<span>Regards,</span></div><div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span>Dragos</span></div><div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; ">
<span><br></span></div><div><br></div> <div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "> <div style="font-size:12pt;"> <div dir="ltr">
<font face="Arial"><div class="yiv2025900642im"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Daniel-Constantin Mierla <<a rel="nofollow" ymailto="mailto:miconda@gmail.com" target="_blank" href="mailto:miconda@gmail.com">miconda@gmail.com</a>><br> <b><span style="font-weight:bold;">To:</span></b> Dragos Oancea <<a rel="nofollow" ymailto="mailto:droancea@yahoo.com" target="_blank" href="mailto:droancea@yahoo.com">droancea@yahoo.com</a>>; Kamailio (SER) - Development Mailing List
<<a rel="nofollow" ymailto="mailto:sr-dev@lists.sip-router.org" target="_blank" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>> <br> </div><b><span style="font-weight:bold;">Sent:</span></b> Thursday, April 4, 2013 8:53 PM<div><div class="yiv2025900642h5"><br>
<b><span style="font-weight:bold;">Subject:</span></b> Re: [sr-dev] segfault with t_suspend() / t_continue()<br> </div></div></font> </div><div><div class="yiv2025900642h5"> <br>
<div>
<div>
Hello,<br>
<br>
at first sight looks like a missing safety check, but I may be wrong
after a long day. I need to look a bit deeper at it.<br>
<br>
Did you stress test it or was just casual trying? You said it
happened one, couldn't be reproduced, right?<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div>On 4/4/13 8:28 PM, Dragos Oancea wrote:<br>
</div>
<blockquote type="cite">
<div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; ">
<div><span>Hi Daniel,</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span><br>
</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span>Here is the output of `bt full`:</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span>
http://pastebin.com/tnrWML3L<br>
</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; ">Let me know if I can be of any
assistance further.</div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><br>
</div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; ">Regards,</div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; ">Dragos</div>
<div><br>
</div>
<div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; ">
<div style="font-size:12pt;">
<div dir="ltr"> <font face="Arial">
<hr size="1"> <b><span style="font-weight:bold;">From:</span></b>
Daniel-Constantin Mierla <a rel="nofollow" ymailto="mailto:miconda@gmail.com" target="_blank" href="mailto:miconda@gmail.com"><miconda@gmail.com></a><br>
<b><span style="font-weight:bold;">To:</span></b>
Dragos Oancea <a rel="nofollow" ymailto="mailto:droancea@yahoo.com" target="_blank" href="mailto:droancea@yahoo.com"><droancea@yahoo.com></a>; Kamailio (SER)
- Development Mailing List
<a rel="nofollow" ymailto="mailto:sr-dev@lists.sip-router.org" target="_blank" href="mailto:sr-dev@lists.sip-router.org"><sr-dev@lists.sip-router.org></a> <br>
<b><span style="font-weight:bold;">Sent:</span></b>
Thursday, April 4, 2013 7:28 PM<br>
<b><span style="font-weight:bold;">Subject:</span></b>
Re: [sr-dev] segfault with t_suspend() / t_continue()<br>
</font> </div>
<br>
<div>
<div> Hello,<br>
<br>
could be related, but the issue seems to be while
processing a SIP reply, not with suspend/continue of a
request. Can you send the output of 'bt full'?<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div>On 4/4/13 6:56
PM, Dragos Oancea wrote:<br>
</div>
<blockquote type="cite">
<div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; ">
<div>Hello,<br>
</div>
<div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; ">
<div>
<div>
<div>
<div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; ">
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span><br>
</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span><br>
</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span>I got the following
coredump while doing some testing with
t_suspend() and t_continue() on the
first INVITE:</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span><br>
</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span>
<div style="background-color:transparent;">(gdb)
bt</div>
<div style="background-color:transparent;">#0
qm_detach_free (qm=0x7fe2dae65000,
size=16) at mem/q_malloc.c:269</div>
<div style="background-color:transparent;">#1
qm_malloc (qm=0x7fe2dae65000,
size=16) at mem/q_malloc.c:386</div>
<div style="background-color:transparent;">#2
0x00007fe2e5e6d541 in
update_totag_set (t=0x7fe2db0f42d0,
ok=<value optimized out>) at
t_reply.c:372</div>
<div style="background-color:transparent;">#3
0x00007fe2e5e72387 in relay_reply
(t=<value optimized out>,
p_msg=<value optimized out>,
branch=2, msg_status=200,
cancel_data=0x7fff63fdf9b0,
do_put_on_wait=1) at t_reply.c:1854</div>
<div style="background-color:transparent;">#4
0x00007fe2e5e733e6 in
reply_received
(p_msg=0x7fe2e6a55ba0) at
t_reply.c:2370</div>
<div style="background-color:transparent;">#5
0x00000000004547f5 in
do_forward_reply
(msg=0x7fe2e6a55ba0, mode=<value
optimized out>) at forward.c:799</div>
<div style="background-color:transparent;">#6
0x000000000049a5ba in receive_msg
(buf=<value optimized out>,
len=961, rcv_info=0x7fff63fdfc40) at
receive.c:270</div>
<div style="background-color:transparent;">#7
0x00000000005281a6 in udp_rcv_loop
() at udp_server.c:544</div>
<div style="background-color:transparent;">#8
0x0000000000464d3a in main_loop ()
at main.c:1638</div>
<div style="background-color:transparent;">#9
0x0000000000467a6c in main
(argc=<value optimized out>,
argv=<value optimized out>) at
main.c:2566</div>
<div><br>
</div>
</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span><br>
</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span><br>
</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span>I suspend the
transaction in one route and then I
continue it in another route, similar
to below:</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><br>
</div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span>route[INVITE]<span style="white-space:pre-wrap;"> </span></span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span><span style="white-space:pre-wrap;"></span></span># <span style="white-space:pre-wrap;"> </span>Suspend
and put to memcache:</div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span style="white-space:pre-wrap;"></span><span style="white-space:pre-wrap;"> </span>t_suspend();</div>
<div style="background-color:transparent;">
xlog("proceesing suspended in
transaction
[$T(id_index):$T(id_label)]\n");</div>
<div style="background-color:transparent;">
$var(transaction_index)=$T(id_index);</div>
<div style="background-color:transparent;">
$var(transaction_label)=$T(id_label);</div>
<div style="background-color:transparent;">
</div>
<div style="background-color:transparent;">
$mct(wait_$tU)= "" +
$var(transaction_index) + ":" +
$var(transaction_label);</div>
<div style="background-color:transparent;">
$mctex(wait_$tU) = 100;</div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; ">}</div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><br>
</div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span>route[INVITE_resume]
<span style="white-space:pre-wrap;"> </span>{</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><br>
</div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span># get the
transaction index and lable from
memcache </span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span> $avp(check) =
$mct(wait_$tU) ; # I should have the
transaction index and the transaction
label here </span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span>
<div style="background-color:transparent;">
$var(my_transaction_index) =
$(avp(check){s.select,0,:});</div>
<div style="background-color:transparent;">
$var(my_transaction_label) =
$(avp(check){s.select,1,:});</div>
<div style="background-color:transparent;">
$var(a)=
$(var(my_transaction_index){<a rel="nofollow" target="_blank" href="http://s.int/">s.int</a>});</div>
<div style="background-color:transparent;">
$var(b) =
$(var(my_transaction_label){<a rel="nofollow" target="_blank" href="http://s.int/">s.int</a>});</div>
<div><br>
</div>
</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span>
<div style="background-color:transparent;">
t_continue( "$var(a)", "$var(b)" ,
"my_relay_route");</div>
<div>}</div>
</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span> </span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span><br>
</span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span>route[INVITE_resume]
executes only on an asynchronous event
(a certain SIP message that might come
or not) . </span></div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><span><br>
</span></div>
<div>I use kamailio 4.0.0/Centos Linux. I
suspect it happened when I sent CANCEL,
but I could not reproduce. I still have
the core file.</div>
<div><br>
</div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; ">Regards,</div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; ">Dragos</div>
<div style="font-style: normal; font-size: 13px; background-color: transparent; font-family: arial, helvetica, sans-serif; "><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
sr-dev mailing list
<a rel="nofollow" ymailto="mailto:sr-dev@lists.sip-router.org" target="_blank" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a rel="nofollow" target="_blank" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<br>
<pre>--
Daniel-Constantin Mierla - <a rel="nofollow" target="_blank" href="http://www.asipto.com/">http://www.asipto.com</a>
<a rel="nofollow" target="_blank" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a rel="nofollow" target="_blank" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
- <a rel="nofollow" target="_blank" href="http://conference.kamailio.com/">http://conference.kamailio.com</a> -</pre>
</div>
</div>
<br>
<br>
</div>
</div>
</div>
</blockquote>
<br>
<pre>--
Daniel-Constantin Mierla - <a rel="nofollow" target="_blank" href="http://www.asipto.com/">http://www.asipto.com</a>
<a rel="nofollow" target="_blank" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a rel="nofollow" target="_blank" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
- <a rel="nofollow" target="_blank" href="http://conference.kamailio.com/">http://conference.kamailio.com</a> -</pre>
</div>
</div><br><br> </div></div></div> </div> </div></div><br>_______________________________________________<br>
sr-dev mailing list<br>
<a rel="nofollow" ymailto="mailto:sr-dev@lists.sip-router.org" target="_blank" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
<br></blockquote></div><br></div>
</div><br><br> </div> </div> </div></body></html>