<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Could <tt>you also print <tt>r_b<tt>u<tt>f and</tt><tt>
*r_buf ?<br>
<br>
<tt>Regards,</tt><br>
</tt></tt></tt></tt></tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 04.10.2016 16:08, Ramachandran,
Agalya (Contractor) wrote:<br>
</div>
<blockquote
cite="mid:de7537a3a7d647b4b1823a61314d197b@COPDCEX28.cable.comcast.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1417440777;
        mso-list-type:hybrid;
        mso-list-template-ids:1508268820 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:blue">Hi Bogdan,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">I have printed the
“t” variable value. It says
</span><span style="color:red">“$1 = (struct cell *) 0x0”. </span><span
style="color:blue"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Is there any link
available to upload/share the core files? Because size of
the core file 45KB and couldn’t attach in e-mail.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">(gdb) frame 0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">#0
final_response_handler (fr_tl=0x7fded2484110) at timer.c:383<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">383 if
(is_invite(t) && should_cancel_branch(t,
r_buf->branch) ) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">(gdb) list +<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">378
current_processing_ctx = my_ctx;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">379 /*
set the T context too */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">380
set_t( t );<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">381<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">382 /*
out-of-lock do the cancel I/O */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">383 if
(is_invite(t) && should_cancel_branch(t,
r_buf->branch) ) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">384
set_cancel_extra_hdrs( CANCEL_REASON_SIP_480,
sizeof(CANCEL_REASON_SIP_480)-1);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">385
cancel_branch(t, r_buf->branch );<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">386
set_cancel_extra_hdrs( NULL, 0);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">387 }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:red">(gdb) p t<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:red">$1 = (struct cell
*) 0x0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Agalya<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
style="color:windowtext"> Bogdan-Andrei Iancu
[<a class="moz-txt-link-freetext" href="mailto:bogdan@opensips.org">mailto:bogdan@opensips.org</a>]
<br>
<b>Sent:</b> Tuesday, October 04, 2016 6:44 AM<br>
<b>To:</b> Ramachandran, Agalya (Contractor)
<a class="moz-txt-link-rfc2396E" href="mailto:Agalya_Ramachandran@comcast.com"><Agalya_Ramachandran@comcast.com></a>; OpenSIPS users
mailling list <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br>
<b>Subject:</b> Re: opensips crash when doing load test<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><tt><span style="font-size:10.0pt">Hello
Agalya,</span></tt><span
style="font-size:10.0pt;font-family:"Courier New""><br>
<br>
<tt>In frame 0, could you print the "t" variable ? BTW, is
there any way to get access to the core file ?</tt><br>
<br>
<tt>Best regards,</tt><br>
<br>
</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<pre>Bogdan-Andrei Iancu<o:p></o:p></pre>
<pre>OpenSIPS Founder and Developer<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 30.09.2016 16:48, Ramachandran, Agalya
(Contractor) wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:blue">Hi Bogdan, </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">One more dump</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#0
final_response_handler (fr_tl=0x7fded2484110) at
timer.c:383</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">383
if (is_invite(t) && should_cancel_branch(t,
r_buf->branch) ) {</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Missing separate
debuginfos, use: debuginfo-install
cyrus-sasl-lib-2.1.26-20.el7_2.x86_64
glibc-2.17-106.el7_2.4.x86_64
keyutils-libs-1.5.8-3.el7.x86_64
krb5-libs-1.13.2-12.el7_2.x86_64
libcom_err-1.42.9-7.el7.x86_64
libcurl-7.29.0-25.el7.centos.x86_64
libidn-1.28-4.el7.x86_64 libselinux-2.2.2-6.el7.x86_64
libssh2-1.4.3-10.el7_2.1.x86_64 nspr-4.10.8-2.el7_1.x86_64
nss-3.19.1-19.el7_2.x86_64
nss-softokn-freebl-3.16.2.3-13.el7_1.x86_64
nss-util-3.19.1-9.el7_2.x86_64
openldap-2.4.40-9.el7_2.x86_64
openssl-libs-1.0.1e-51.el7_2.4.x86_64
pcre-8.32-15.el7.x86_64 xz-libs-5.1.2-12alpha.el7.x86_64
zlib-1.2.7-15.el7.x86_64</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">(gdb) bt</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#0
final_response_handler (fr_tl=0x7fded2484110) at
timer.c:383</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#1
timer_routine (ticks=<optimized out>,
set=<optimized out>) at timer.c:1066</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#2
0x000000000049d3cd in handle_timer_job () at timer.c:597</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#3
0x000000000059223e in handle_io (fm=<optimized out>,
fm=<optimized out>, fm=<optimized out>,
idx=<optimized out>, event_type=2)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> at
net/net_udp.c:265</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#4
io_wait_loop_epoll (h=<optimized out>,
t=<optimized out>, repeat=<optimized out>) at
net/../io_wait_loop.h:225</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#5 udp_rcv_loop
(si=si@entry=0x7fded841dcb0) at net/net_udp.c:308</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#6
0x0000000000593e05 in udp_start_processes
(chd_rank=chd_rank@entry=0x84c570 <chd_rank.10940>,
startup_done=startup_done@entry=0x0)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> at
net/net_udp.c:448</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#7
0x0000000000419b73 in main_loop () at main.c:736</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">#8 main
(argc=<optimized out>, argv=<optimized out>)
at main.c:1282</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Ramachandran, Agalya
(Contractor) <br>
<b>Sent:</b> Friday, September 30, 2016 9:44 AM<br>
<b>To:</b> 'Bogdan-Andrei Iancu' <a
moz-do-not-send="true"
href="mailto:bogdan@opensips.org"><bogdan@opensips.org></a>;
OpenSIPS users mailling list
<a moz-do-not-send="true"
href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br>
<b>Subject:</b> opensips crash when doing load test<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Hi Bogdan, </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">I have taken
2.1.4 code base, added the below fixes on top of it</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoListParagraph"
style="text-indent:-.25in;mso-list:l0 level1 lfo2"><!--[if !supportLists]--><span
style="mso-list:Ignore">1.<span style="font:7.0pt
"Times New Roman"">
</span></span><!--[endif]--><span style="color:blue">Fix
potential starvation for the timer tasks.
</span><span
style="font-size:9.0pt;font-family:Consolas;color:#444444;background:white">66c337cc89a2b5c3e1bbd78c289371efcda21886</span><o:p></o:p></p>
<p class="MsoListParagraph"
style="text-indent:-.25in;mso-list:l0 level1 lfo2"><!--[if !supportLists]--><span
style="mso-list:Ignore">2.<span style="font:7.0pt
"Times New Roman"">
</span></span><!--[endif]--><span style="color:blue">rest_client:
Improve polling logic during TCP connect -
</span><span
style="font-size:9.0pt;font-family:Consolas;color:#444444;background:white">c40f2b057209b8078520abc95e5d1bf5e5a28db6</span><o:p></o:p></p>
<p class="MsoListParagraph"
style="text-indent:-.25in;mso-list:l0 level1 lfo2"><!--[if !supportLists]--><span
style="mso-list:Ignore">3.<span style="font:7.0pt
"Times New Roman"">
</span></span><!--[endif]--><span style="color:blue">rest_client:
Add "connect_poll_interval" module parameter -
</span><span
style="font-size:9.0pt;font-family:Consolas;color:#444444;background:white">f5abfb3dee649a14ae39ad74d7f04454f815748f</span><o:p></o:p></p>
<p class="MsoListParagraph"
style="text-indent:-.25in;mso-list:l0 level1 lfo2"><!--[if !supportLists]--><span
style="mso-list:Ignore">4.<span style="font:7.0pt
"Times New Roman"">
</span></span><!--[endif]--><span style="color:blue">rest_client:
Fix bogus condition -</span><span
style="font-size:9.0pt;font-family:Consolas;color:#444444;background:white">3ba7be6692c6987faecb9c4c904035d5e7c0f916</span><o:p></o:p></p>
<p class="MsoListParagraph"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">When I try to
perform load test on that code base, randomly am seeing
OpenSIPS is crashing.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Here is the full
trace of the core file. Let me know if you need any
additional information or logs.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Am seeing crash
is occurring at start_timer_extra_processes().</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal">[root@poc-siplb-cmc-e-004 corefiles]# gdb
/usr/local/sbin/opensips core.opensips.sig11.3977<o:p></o:p></p>
<p class="MsoNormal">GNU gdb (GDB) Red Hat Enterprise Linux
7.6.1-80.el7<o:p></o:p></p>
<p class="MsoNormal">Copyright (C) 2013 Free Software
Foundation, Inc.<o:p></o:p></p>
<p class="MsoNormal">License GPLv3+: GNU GPL version 3 or
later <<a moz-do-not-send="true"
href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>><o:p></o:p></p>
<p class="MsoNormal">This is free software: you are free to
change and redistribute it.<o:p></o:p></p>
<p class="MsoNormal">There is NO WARRANTY, to the extent
permitted by law. Type "show copying"<o:p></o:p></p>
<p class="MsoNormal">and "show warranty" for details.<o:p></o:p></p>
<p class="MsoNormal">This GDB was configured as
"x86_64-redhat-linux-gnu".<o:p></o:p></p>
<p class="MsoNormal">For bug reporting instructions, please
see:<o:p></o:p></p>
<p class="MsoNormal"><<a moz-do-not-send="true"
href="http://www.gnu.org/software/gdb/bugs/">http://www.gnu.org/software/gdb/bugs/</a>>...<o:p></o:p></p>
<p class="MsoNormal">Reading symbols from
/usr/local/sbin/opensips...done.<o:p></o:p></p>
<p class="MsoNormal">[New LWP 3977]<o:p></o:p></p>
<p class="MsoNormal">[Thread debugging using libthread_db
enabled]<o:p></o:p></p>
<p class="MsoNormal">Using host libthread_db library
"/lib64/libthread_db.so.1".<o:p></o:p></p>
<p class="MsoNormal">Core was generated by
`/usr/local/sbin/opensips -P /var/run/opensips.pid'.<o:p></o:p></p>
<p class="MsoNormal">Program terminated with signal 11,
Segmentation fault.<o:p></o:p></p>
<p class="MsoNormal">#0 final_response_handler
(fr_tl=0x7f55fcd82948) at timer.c:383<o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">383
if (is_invite(t) && should_cancel_branch(t,
r_buf->branch) ) {</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">Missing separate
debuginfos, use: debuginfo-install
cyrus-sasl-lib-2.1.26-20.el7_2.x86_64
glibc-2.17-106.el7_2.4.x86_64
keyutils-libs-1.5.8-3.el7.x86_64
krb5-libs-1.13.2-12.el7_2.x86_64
libcom_err-1.42.9-7.el7.x86_64
libcurl-7.29.0-25.el7.centos.x86_64
libidn-1.28-4.el7.x86_64 libselinux-2.2.2-6.el7.x86_64
libssh2-1.4.3-10.el7_2.1.x86_64 nspr-4.10.8-2.el7_1.x86_64
nss-3.19.1-19.el7_2.x86_64
nss-softokn-freebl-3.16.2.3-13.el7_1.x86_64
nss-util-3.19.1-9.el7_2.x86_64
openldap-2.4.40-9.el7_2.x86_64
openssl-libs-1.0.1e-51.el7_2.4.x86_64
pcre-8.32-15.el7.x86_64 xz-libs-5.1.2-12alpha.el7.x86_64
zlib-1.2.7-15.el7.x86_64</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">(gdb) bt</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">#0
final_response_handler (fr_tl=0x7f55fcd82948) at
timer.c:383</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">#1 timer_routine
(ticks=<optimized out>, set=<optimized out>)
at timer.c:1066</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">#2
0x000000000049d03a in handle_timer_job () at timer.c:597</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">#3
start_timer_extra_processes
(chd_rank=chd_rank@entry=0x84c570 <chd_rank.10940>)
at timer.c:557</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">#4
0x0000000000419b9a in main_loop () at main.c:748</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">#5 main
(argc=<optimized out>, argv=<optimized out>)
at main.c:1282</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Regards,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Agalya</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><o:p> </o:p></span></p>
</div>
</blockquote>
<br>
</body>
</html>