<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<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;
        mso-fareast-language:EN-US;}
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;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;
        mso-fareast-language:EN-US;}
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;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;
        mso-fareast-language:EN-US;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.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;}
--></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]-->
</head>
<body bgcolor="white" lang="NL" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hello Daniel,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Yes, I can reproduce it every time I run those commands from within the script.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I’ve only included the trace(see attachment) from the point kamailio crashed, since it only happens when a certain condition inside the script is met. (if statement)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">But when the condition is met, it crashes every time.  <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">If you need more information, please let me know.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Grant<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" 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 lang="EN-US" style="color:windowtext;mso-fareast-language:NL">From:</span></b><span lang="EN-US" style="color:windowtext;mso-fareast-language:NL"> Daniel-Constantin Mierla [mailto:miconda@gmail.com]
<br>
<b>Sent:</b> Wednesday, April 1, 2015 10:44 AM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List; Grant Bagdasarian<br>
<b>Subject:</b> Re: [SR-Users] jsonrpc_exec crashes kamailio<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hello,<br>
<br>
can you reproduce it every time you run those commands? Or is it happening from time to time?<br>
<br>
If you can reproduce, set debug=3 and send all the logs to me. Also, it would be good to set 'ulimit -c unlimited' before starting kamailio to get a coredump which would be easier to troubleshoot.<br>
<br>
Cheers,<br>
Daniel<span style="font-size:12.0pt;mso-fareast-language:NL"><o:p></o:p></span></p>
<div>
<p class="MsoNormal">On 01/04/15 08:39, Grant Bagdasarian wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoPlainText"><span lang="EN-US">Hello,</span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US">Kamailio crashes when I try to execute the following jsonrpc_exec functions:</span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US">jsonrpc_exec('{"jsonrpc": "2.0", "method": "domain.reload", "id": 0}'); #domain module</span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US">jsonrpc_exec('{"jsonrpc": "2.0", "method": "addressReload", "id": 0}'); #permissions module</span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US">This one works fine:</span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US">jsonrpc_exec('{"jsonrpc": "2.0", "method": "htable.reload", "params": ["tablename"], "id": 0}');</span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US">Any ideas?</span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US">Running on Debian 7.8 and Kamailio 4.2.3.</span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US">Backtrace:</span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US">*** glibc detected *** /usr/local/sbin/kamailio: double free or corruption (fasttop): 0x0000000001f1ff00 ***</span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US">======= Backtrace: =========</span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US">/lib/x86_64-linux-gnu/libc.so.6(+0x75be6)[0x7f7009d50be6]</span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US">/lib/x86_64-linux-gnu/libc.so.6(cfree+0x6c)[0x7f7009d5598c]</span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US">/usr/local/lib64/kamailio/modules/jsonrpc-s.so(+0x2834)[0x7f7003e12834]</span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US">/usr/local/lib64/kamailio/modules/jsonrpc-s.so(+0xb59a)[0x7f7003e1b59a]</span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-US">/usr/local/sbin/kamailio(do_action+0x749a)[0x41fc24]</span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:NL"><br>
<br>
<o:p></o:p></span></p>
<pre>-- <o:p></o:p></pre>
<pre>Daniel-Constantin Mierla<o:p></o:p></pre>
<pre><a href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a><o:p></o:p></pre>
<pre>Kamailio World Conference, May 27-29, 2015<o:p></o:p></pre>
<pre>Berlin, Germany - <a href="http://www.kamailioworld.com">http://www.kamailioworld.com</a><o:p></o:p></pre>
</div>
</body>
</html>