<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p>it looks like you can reproduce it, if yes, try to get it write
      the core dump file. For that you may have to do:</p>
    <p>ulimit -c unlimited</p>
    <p>then run kamailio as user "root" (or a user with root privileges)
      with -w parameter pointing to a folder where you want the core
      file to be saved. Reproduce the issue and it should generate a
      core file. Grab the output of "bt full" with gdb from the core
      file and send it here.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 12.02.20 18:25, Sergiu Pojoga wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAJZsGC=b-Hc3h1a0t+XdjmQOujEYxywFVnrVWYZnOnuwF6_vLA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi there,<br>
        <div><br>
        </div>
        <div>After below even route is triggered, Kamailio crashes with
          the following in logs:</div>
        <div><br>
        </div>
        <div>Feb 12 08:03:59 kamailio[24671]: INFO: <script>:
          Received HTTP/RPC request from IP=127.0.0.1<br>
          Feb 12 08:03:59 kamailio[24671]: WARNING: <script>:
          Contact <a href="mailto:myusername@sip.mydomain.net"
            moz-do-not-send="true">myusername@sip.mydomain.net</a> has
          expired<br>
          Feb 12 08:03:59 kamailio[24671]: INFO: drouting
          [drouting.c:483]: rpc_reload(): RPC command received!<br>
          Feb 12 08:03:59 kamailio[24675]: CRITICAL: <core>
          [core/pass_fd.c:277]: receive_fd(): EOF on 59<br>
          Feb 12 08:03:59 kamailio[24614]: ALERT: <core>
          [main.c:745]: handle_sigs(): child process 24671 exited by a
          signal 11<br>
          Feb 12 08:03:59 kamailio[24614]: ALERT: <core>
          [main.c:748]: handle_sigs(): core was not generated<br>
          Feb 12 08:03:59 kamailio[24614]: INFO: <core>
          [main.c:770]: handle_sigs(): terminating due to SIGCHLD<br>
          Feb 12 08:03:59 kamailio[24675]: INFO: <core>
          [main.c:825]: sig_usr(): signal 15 received<br>
        </div>
        <div><br>
        </div>
        <div>event_route[usrloc:contact-expired] {<br>
             xlog("L_WARN", "Contact $ulc(exp=>aor) has expired\n");<br>
          <br>
             # Remove the sip: from the front of the Received URI<br>
             $var(exp_received) =
          $(ulc(exp=>received){s.substr,4,0});<br>
          <br>
            sql_query("db", "UPDATE `dr_gateways` SET address =
          '127.0.0.1' WHERE address = '$var(exp_received)'", "rz");<br>
            sql_result_free("rz");<br>
          <br>
            jsonrpc_exec('{"jsonrpc": "2.0", "method":
          "drouting.reload", "id": 1}');<br>
          }<br>
        </div>
        <div><br>
        </div>
        <div>If I comment out the sql and jsonrpc_exec lines above -
          crash does not happen.</div>
        <div><br>
        </div>
        <div>Let me know if core dump is needed.</div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div>--Sergiu</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-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>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<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 - March 9-11, 2020, Berlin - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - April 27-29, 2020, in Berlin -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>