<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>Hi Ben,<br>
<br>
First, if you use TH, makes no sense to do Record-Routing - there
are 2 SIP concepts that overlaps. You either act as an end-point
(by doing TH), either as a proxy (doing RR).<br>
<br>
If doing TH, makes no sense to use validate + fix as these
functions check and repair the routing information in the request
(like Route and Contact headers). if you do TH, this routing info
is actually hidden and added by OpenSIPS, so there is nothing to
fix and repair.<br>
<br>
Nevertheless, this should not crash or corrupt OpenSIPS. HAve you
managed to get a corefile ?<br>
<br>
Also if you suspect memory corruption, you can compile-in the
memory debugger - see
<a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/TroubleShooting-OutOfMem">http://www.opensips.org/Documentation/TroubleShooting-OutOfMem</a> .<br>
<br>
Regards,<br>
</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 26.07.2016 23:20, Newlin, Ben wrote:<br>
</div>
<blockquote cite="mid:885977D6-9A91-45A9-8BA6-EC6369CD45B8@inin.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Title" content="">
<meta name="Keywords" content="">
<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:Menlo;
        panose-1:2 11 6 9 3 8 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:Calibri;}
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;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:Calibri;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">I have had 3
OpenSIPS server crashes in the last week. All were due to
segmentation faults. I was not able to capture core dumps; I
am configuring that now to catch the next 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">My logs
leading up to the crash are full of errors from
fix_route_dialog() complaining about invalid URIs for
sequential requests:<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:8.5pt;font-family:Menlo;color:#2CA221;background:white">Jul
26 19:34:02 [220] ERROR:dialog:fix_route_dialog: Failed to
parse SIP uri</span><span style="font-family:"Times New
Roman""><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:8.5pt;font-family:Menlo;color:#2CA221;background:white">Jul
26 19:34:02 [220] ERROR:core:parse_uri: bad uri, state 0
parsed: <ip:1> (4) /
<ip:10.18.8.18:5060;ftag=gK0448f137;lr;r2=on>> (44)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New
Roman""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:8.5pt;font-family:Menlo;color:#2CA221;background:white">Jul
26 19:11:19 [218] ERROR:dialog:fix_route_dialog: Failed to
parse SIP uri</span><span style="font-family:"Times New
Roman""><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:8.5pt;font-family:Menlo;color:#2CA221;background:white">Jul
26 19:11:19 [218] ERROR:core:parse_uri: bad uri, state 0
parsed: <b0i2> (4) /
<b0i2yjor;transport=udp<sip:10.18.8.17:5060;ftag=7207ce89;lr;r2=on>
(65)</span><span style="font-family:"Times New
Roman""><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:8.5pt;font-family:Menlo;color:#2CA221;background:white">Jul
26 17:43:19 [220] ERROR:dialog:fix_route_dialog: Failed to
parse SIP uri</span><span style="font-family:"Times New
Roman""><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:8.5pt;font-family:Menlo;color:#2CA221;background:white">Jul
26 17:43:19 [220] ERROR:core:parse_uri: bad uri, state 0
parsed: <ervi> (4) /
<ervice_id6fdbc70f-2438-4726-807c-0d081df4d87> (44)</span><span
style="font-family:"Times New Roman""><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">Many times
the “URI” displayed in the error message is actually
internal OpenSIPS variables, as in the last error above.
When they are from the SIP message, I have verified that the
messages themselves are correctly formatted. This leads me
to believe there is memory corruption occurring.<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">This all
started when I updated my load-balancer servers to use
Record-Routing, specifically the “double_rr” mechanism for
when multiple interfaces exist. The Record-Routing is
occurring on different servers which have not crashed. Only
the servers receiving the Record-Routed messages are
experiencing the errors.<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">Here is a
piece of the code processing sequential requests. I am using
the topology_hiding() functionality of the Dialog module.
Are validate_dialog() and fix_route_dialog() still valid in
a topology_hiding scenario?<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">if
(t_check_trans())<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">
setflag(SEQ_REQUEST);<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"> if
(has_totag())<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">
loose_route();<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"> if
(match_dialog())<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"> if
(!validate_dialog())<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">
fix_route_dialog();<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"> if
(is_method("BYE"))<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">
setflag(ACC_FLAG);<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">
setflag(SEQ_REQUEST);<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"> else if
(!isflagset(SEQ_REQUEST))<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"> if
(!is_method("ACK")) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">
route(rlog, LV_ERROR, "check_sequential", "Sequential
request not matched");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">
route(reply_error, "481", "Call Does Not Exist");<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"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">
return(EXIT);<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"> }<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">I will
attempt to get core dumps of future crashes.<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">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Ben Newlin<o:p></o:p></span></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>