<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", "sip:MY_IP_ADDRESS:MY_PORT_ADDRESS")<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>