<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><tt>Hi Ben,</tt></p>
<p><tt>Excellent report! I managed to reproduce the crash on first
try:</tt></p>
<p><tt>Core was generated by `./opensips -m64 -M16 -f
cfg/opensips-2.4-sipp-siptrace.cfg -w .'.<br>
Program terminated with signal SIGSEGV, Segmentation fault.<br>
#0 0x00007f7987cd7f2a in sip_trace (msg=0x7f799817fd20,
info=0x7f799468d5e0) at siptrace.c:1646<br>
1646 db_vals[1].val.str_val.s =
msg->callid->body.s;<br>
(gdb) bt<br>
#0 0x00007f7987cd7f2a in sip_trace (msg=0x7f799817fd20,
info=0x7f799468d5e0) at siptrace.c:1646<br>
#1 0x00007f7987cd7c8d in sip_trace_w (msg=0x7f799817fd20,
param1=0x7f7998169110 "\001", param2=0x2 <error: Cannot
access memory at address 0x2>, param3=0x7f79981691f8 "\001",
param4=0x0) at siptrace.c:1590<br>
#2 0x0000000000445082 in do_action (a=0x7f79981589a0,
msg=0x7f799817fd20) at action.c:1864<br>
#3 0x000000000043ccf7 in run_action_list (a=0x7f79981589a0,
msg=0x7f799817fd20) at action.c:172<br>
</tt></p>
<tt>Quick question for you: you are sending a malformed INVITE,
correct? Here is how mine looked like:<br>
<br>
INVITE <a class="moz-txt-link-freetext" href="sip:sipp@127.0.0.1:5060">sip:sipp@127.0.0.1:5060</a> SIP/2.0.<br>
Via: SIP/2.0/UDP 127.0.0.1:7000;branch=z9hG4bK-1988-1-0.<br>
From: sipp <a class="moz-txt-link-rfc2396E" href="sip:sipp@127.0.0.1:7000"><sip:sipp@127.0.0.1:7000></a>;tag=123456789.<br>
To: sut <a class="moz-txt-link-rfc2396E" href="sip:sipp@127.0.0.1:5060"><sip:sipp@127.0.0.1:5060></a>.<br>
CSeq: 1 INVITE.<br>
Contact: <a class="moz-txt-link-rfc2396E" href="sip:sipp@127.0.0.1:7000"><sip:sipp@127.0.0.1:7000></a> Call-ID:
<a class="moz-txt-link-abbreviated" href="mailto:1-1988@127.0.0.1">1-1988@127.0.0.1</a>.<br>
Max-Forwards: 70.<br>
Subject: Performance Test.<br>
Content-Type: application/sdp.<br>
Content-Length: 129.<br>
.<br>
v=0.<br>
o=user1 53655765 2353687637 IN IP4 127.0.0.1.<br>
s=-.<br>
c=IN IP4 127.0.0.1.<br>
t=0 0.<br>
m=audio 6001 RTP/AVP 0.<br>
a=rtpmap:0 PCMU/8000.<br>
<br>
Notice how OpenSIPS will be unable to parse the Call-ID header
field, hence the immediate crash in sip_trace(), as it's unable to
handle a NULL Call-ID.<br>
</tt>
<p><tt>Best regards,<br>
</tt></p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS 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 07.06.2018 22:24, Ben Newlin wrote:<br>
</div>
<blockquote type="cite"
cite="mid:39D3FF11-787C-4A93-B1C2-5527825BD391@genesys.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
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;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></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="font-size:11.0pt">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">While
running a new test scenario I encountered an OpenSIPS crash.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">version:
opensips 2.3.3 (x86_64/linux)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">flags:
STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC,
F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">ADAPTIVE_WAIT_LOOPS=1024,
MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE
1024, BUF_SIZE 65535<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">poll method
support: poll, epoll_lt, epoll_et, sigio_rt, select.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">git
revision: a0bed9d<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">main.c
compiled on 21:08:28 May 16 2018 with gcc 4.8.5<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Logs: <a
href="https://pastebin.com/3vL3rbG4"
moz-do-not-send="true">
https://pastebin.com/3vL3rbG4</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">BT: <a
href="https://pastebin.com/tTp32ASC"
moz-do-not-send="true">
https://pastebin.com/tTp32ASC</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Let me know
if anything else is needed.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black">Ben
Newlin</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<!--'"--><br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>