<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>are you sure that kamcmd was compiled with the 5.0.4 version? In
      branch 5.0, at kamcmd.c line 591 is a line with just a curly
      brace, then one starting the send_binrpc_cmd function, so that's
      not a line that can cause a segfault.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 21.11.17 17:48, José Lopes wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAK5rbQvoVmWUJ8YB8ZbYN6-=f-2f53CAzQ2zqfc4Rew02ooMEQ@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div>
            <div>Hello,<br>
            </div>
            <div><br>
            </div>
            <div>I invoke kamcmd inside Freeswitch Lua Scripts and right
              now i am getting segmentation fault any time.</div>
            <div>This started to happen after I upgraded kamailio from
              4.4 to 5.0.4 .</div>
            <br>
          </div>
          I tried to analyse the core dump and it give me the next
          information.<br>
        </div>
        When I execute on the console, the command works.<br>
        <br>
        <div>Am I doing something wrong?</div>
        <div>There is any alternative or better way to communicate with
          kamailio?</div>
        <div><br>
        </div>
        <div>Thanks in advance</div>
        <div><br>
        </div>
        <div>Best regards,</div>
        <div>Jose Lopes<br>
        </div>
        <div>
          <div>
            <div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>Core was generated by `/usr/sbin/kamcmd -s udp:<a
                  href="http://127.0.0.1:2050" moz-do-not-send="true">127.0.0.1:2050</a>
                uac.reg_refresh s:29010017'.<br>
                Program terminated with signal SIGSEGV, Segmentation
                fault.<br>
                #0  0x000000000040340d in send_binrpc_cmd (s=<error
                reading variable: Cannot access memory at address
                0x7ffec894a60c>, cmd=<error reading variable:
                Cannot access memory at address 0x7ffec894a600>, <br>
                    cookie=<error reading variable: Cannot access
                memory at address 0x7ffec894a608>) at kamcmd.c:591<br>
                591    kamcmd.c: No such file or directory.<br>
                (gdb) bt<br>
                #0  0x000000000040340d in send_binrpc_cmd (s=<error
                reading variable: Cannot access memory at address
                0x7ffec894a60c>, cmd=<error reading variable:
                Cannot access memory at address 0x7ffec894a600>, <br>
                    cookie=<error reading variable: Cannot access
                memory at address 0x7ffec894a608>) at kamcmd.c:591<br>
                #1  0x0000000000403eee in run_binrpc_cmd (s=3,
                cmd=0x7ffec898a8d0, fmt=0x0) at kamcmd.c:924<br>
                #2  0x0000000000404499 in run_cmd (s=3,
                cmd=0x7ffec898a8d0, format=0x0) at kamcmd.c:1068<br>
                #3  0x00000000004073aa in main (argc=5,
                argv=0x7ffec898d1e8) at kamcmd.c:2114<br>
                <br>
              </div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>
                <div>
                  <div class="gmail_signature">
                    <div dir="ltr">
                      <div>
                        <div dir="ltr">
                          <div dir="ltr">
                            <div dir="ltr">
                              <div dir="ltr">
                                <div style="font-size:12.8px">
                                  <div dir="ltr"
                                    style="font-size:12.8px">
                                    <table
style="color:rgb(80,0,80);font-size:12.8px;font-family:Arial,Helvetica,sans-serif;width:600px;border-collapse:collapse">
                                      <tbody>
                                        <tr>
                                          <td
                                            style="font-size:13px;color:black">
                                            <table
style="color:rgb(34,34,34);font-size:12.7273px;font-family:Arial,Helvetica,sans-serif;width:600px;border-collapse:collapse">
                                              <tbody>
                                                <tr>
                                                  <td
                                                    style="line-height:15px"><br>
                                                  </td>
                                                </tr>
                                                <tr>
                                                  <td
                                                    style="line-height:15px"><br>
                                                  </td>
                                                </tr>
                                                <tr
                                                  style="display:block;width:600px;margin-top:10px">
                                                  <td
                                                    style="width:600px;padding:0px"><br>
                                                  </td>
                                                </tr>
                                              </tbody>
                                            </table>
                                          </td>
                                        </tr>
                                      </tbody>
                                    </table>
                                  </div>
                                </div>
                                <div style="font-size:12.8px"><br>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 14-16, 2018 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>