<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p>does it happen only when doing restart of kamailio? Can you send
      the full backtrace from gdb?</p>
    <p>Also, 5.0.x is no longer a supported release for quite some time,
      try to upgrade to 5.2.x or even better to the latest one 5.3.x and
      see if you can reproduce it with one of the supported releases,
      maybe it is something that was already fixed.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 17.03.20 10:32, Virgílio Cunha
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CALhXjXwzKe-Sj63-fO58LGy1HNvL1+TwUzH+nRtnnqR=_iB1AA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hello,
        <div><br>
        </div>
        <div>I have in production environment with 4 proxies using DMQ
          to sync terminal registers and the DMQ configuration
          parameters is following:</div>
        <div>loadmodule "dmq.so"<br>
          #modparam("dmq", "server_address",
          <a class="moz-txt-link-rfc2396E" href="sip:MY_IP_ADDRESS:MY_PORT_ADDRESS">"sip:MY_IP_ADDRESS:MY_PORT_ADDRESS"</a>)<br>
          modparam("dmq", "notification_address", "DMQ_HOSTS")<br>
          modparam("dmq", "multi_notify", 1)<br>
          modparam("dmq", "num_workers", 4)<br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>In the lab environment with the same configuration that in
          prod, I can simulate this problem with 12000 terminal
          REGISTERS and, when doing several restarts on a proxy, one of
          them is generated a coredump. </div>
        <div>Analyzing the core, I can see that the problem is
          concurrency in the dmq synchronization. </div>
        <div><br>
        </div>
        <div>Job_queue_size (...) is called with a valid <i>queue </i>and,
          but inside this function, the <i>queue </i>is null.</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>(gdb) up<br>
          #1  0x00007fefe58ee246 in job_queue_size (queue=0x0) at
          worker.c:254<br>
          254             return atomic_get(&queue->count);<br>
          (gdb) print queue<br>
          $1 = (job_queue_t *) 0x0<br>
          (gdb) up<br>
          #2  0x00007fefe58ed920 in add_dmq_job (msg=0x7ff028b453f8,
          peer=0x7fefebcc4df8) at worker.c:184<br>
          184                     if(job_queue_size(workers[i].queue) ==
          0) {<br>
          (gdb) print i<br>
          $2 = 1<br>
          (gdb) print workers[i].queue<br>
          $3 = (job_queue_t *) 0x7fefebce49b0<br>
        </div>
        <div><br>
        </div>
        <div>If I configure DMQ with 
          num_workers=1 I can't reproduce this problem.</div>
        <div>I'm using the kamailio 5.0.8 release.</div>
        <div><br>
        </div>
        <div>Is this problem known to you? What is the right way to
          solve it?<br>
        </div>
        <div><br>
        </div>
        <div>Best Regards,<br>
          Virgílio Cunha</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></pre>
  </body>
</html>