<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=utf-8">
<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.E-MailFormatvorlage18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
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 lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hello Denys,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">good to know that you found a way how to solve this. You can create an issue on our github tracker about it, it should not produce this error. Please add your cfg examples and also dispatcher.list
 examples as well to reproduce it.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">-- <o:p>
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning Westerholt –
</span><span style="mso-fareast-language:EN-US"><a href="https://skalatan.de/blog/"><span lang="EN-GB" style="color:#0563C1">https://skalatan.de/blog/</span></a></span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Kamailio services –
</span><span style="mso-fareast-language:EN-US"><a href="https://gilawa.com/"><span lang="EN-GB" style="color:#0563C1">https://gilawa.com</span></a></span><span style="mso-fareast-language:EN-US">
<span lang="EN-GB"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><b>From:</b> sr-users <sr-users-bounces@lists.kamailio.org>
<b>On Behalf Of </b>Denys Pozniak<br>
<b>Sent:</b> Tuesday, December 17, 2019 11:35 AM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org><br>
<b>Subject:</b> Re: [SR-Users] [dispatcher] freeing already freed pointer, called from core: core/xavp.c: xavp_free<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">I have fixed this issue moving AUTORUN from [htable:mod-init] to [core:worker-one-init].<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">  <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">event_route[core:worker-one-init] {<br>
        route(AUTORUN);<br>
}<o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">вт, 17 дек. 2019 г. в 11:56, Denys Pozniak <<a href="mailto:denys.pozniak@gmail.com">denys.pozniak@gmail.com</a>>:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hello!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">The configuration below leads to a CRITICAL message in the console.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Please let me know how to avoid this issue.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">event_route[htable:mod-init] {<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">  route(AUTORUN);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">}<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">route[AUTORUN]  {<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">  if ( ds_select("9", "4") ) {<br>
    xlog("L_WARN", "[$cfg(route)] *ds_select* $xavp(_dsdst_[0]=>uri) $xavp(_dsdst_[1]=>uri) $xavp(_dsdst_[2]=>uri)\n");<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">  }<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">}<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">dispatcher.list<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"># group 9<br>
9 sip:<a href="http://192.168.20.125:5070" target="_blank">192.168.20.125:5070</a><br>
9 sip:<a href="http://192.168.20.160:5070" target="_blank">192.168.20.160:5070</a><br>
9 sip:<a href="http://192.168.20.7:5070" target="_blank">192.168.20.7:5070</a><br>
9 sip:<a href="http://192.168.20.107:5070" target="_blank">192.168.20.107:5070</a><br>
9 sip:<a href="http://192.168.20.190:5070" target="_blank">192.168.20.190:5070</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"> 0(6088) DEBUG: dispatcher [dispatch.c:2054]: ds_manage_routes(): set [9]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"> 0(6088) DEBUG: dispatcher [dispatch.c:2158]: ds_manage_routes(): using alg [4] hash [0]<br>
 0(6088) DEBUG: dispatcher [dispatch.c:2199]: ds_manage_routes(): selected [4-9-2/0] <sip:<a href="http://192.168.20.190:5070" target="_blank">192.168.20.190:5070</a>><br>
 0(6088) DEBUG: dispatcher [dispatch.c:2218]: ds_manage_routes(): using first entry [9/0]<br>
 0(6088) DEBUG: dispatcher [dispatch.c:2238]: ds_manage_routes(): using entry [9/1]<br>
 0(6088) DEBUG: dispatcher [dispatch.c:2238]: ds_manage_routes(): using entry [9/2]<br>
 0(6088) DEBUG: dispatcher [dispatch.c:2238]: ds_manage_routes(): using entry [9/3]<br>
 0(6088) DEBUG: dispatcher [dispatch.c:2272]: ds_manage_routes(): using default entry [9/4]<br>
 0(6088) DEBUG: dispatcher [dispatch.c:2016]: ds_select_dst_limit(): selected target destinations: 5<br>
 0(6088) WARNING: <script>: [AUTORUN] *ds_select* sip:<a href="http://192.168.20.190:5070" target="_blank">192.168.20.190:5070</a> sip:<a href="http://192.168.20.107:5070" target="_blank">192.168.20.107:5070</a> sip:<a href="http://192.168.20.7:5070" target="_blank">192.168.20.7:5070</a><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"> 1(6089) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list 0x7fe5f7d4f420<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"> 1(6089) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)<br>
 1(6089) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)<br>
 1(6089) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)<br>
 1(6089) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)<br>
 1(6089) DEBUG: <core> [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)<br>
 1(6089) DEBUG: <core> [core/xavp.c:495]: xavp_destroy_list(): destroying xavp list 0x7fe5f7d4faf0<br>
 1(6089) DEBUG: <core> [core/xavp.c:495]: xavp_destroy_list(): destroying xavp list (nil)<br>
 1(6089) CRITICAL: <core> [core/mem/q_malloc.c:514]: qm_free(): BUG: freeing already freed pointer (0x7fe5f7d4faf0), called from core: core/xavp.c: xavp_free(65), first free core: core/xavp.c: xavp_free(65) - ignoring<br>
 1(6089) DEBUG: <core> [core/xavp.c:495]: xavp_destroy_list(): destroying xavp list (nil)<br>
 1(6089) CRITICAL: <core> [core/mem/q_malloc.c:514]: qm_free(): BUG: freeing already freed pointer (0x7fe5f7d4f168), called from core: core/xavp.c: xavp_free(65), first free core: core/xavp.c: xavp_free(65) - ignoring<br>
 1(6089) DEBUG: <core> [core/xavp.c:495]: xavp_destroy_list(): destroying xavp list (nil)<br>
 1(6089) CRITICAL: <core> [core/mem/q_malloc.c:514]: qm_free(): BUG: freeing already freed pointer (0x7fe5f7d4f378), called from core: core/xavp.c: xavp_free(65), first free core: core/xavp.c: xavp_free(65) - ignoring<br>
 1(6089) DEBUG: <core> [core/xavp.c:495]: xavp_destroy_list(): destroying xavp list (nil)<br>
 1(6089) CRITICAL: <core> [core/mem/q_malloc.c:514]: qm_free(): BUG: freeing already freed pointer (0x7fe5f7d4f580), called from core: core/xavp.c: xavp_free(65), first free core: core/xavp.c: xavp_free(65) - ignoring<br>
 1(6089) DEBUG: <core> [core/xavp.c:495]: xavp_destroy_list(): destroying xavp list (nil)<br>
 1(6089) CRITICAL: <core> [core/mem/q_malloc.c:514]: qm_free(): BUG: freeing already freed pointer (0x7fe5f7d4f790), called from core: core/xavp.c: xavp_free(65), first free core: core/xavp.c: xavp_free(65) - ignoring<br>
 1(6089) DEBUG: <core> [core/xavp.c:495]: xavp_destroy_list(): destroying xavp list (nil)<br>
 1(6089) CRITICAL: <core> [core/mem/q_malloc.c:514]: qm_free(): BUG: freeing already freed pointer (0x7fe5f7d4f9a0), called from core: core/xavp.c: xavp_free(65), first free core: core/xavp.c: xavp_free(65) - ignoring<br>
 1(6089) DEBUG: <core> [core/receive.c:457]: receive_msg(): cleaning up<br>
...<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">version: kamailio 5.2.2 (x86_64/linux)<br>
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER,
 USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES<br>
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB<br>
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.<br>
id: unknown<br>
compiled on 19:29:40 Jun 20 2019 with gcc 4.8.5<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">-- <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">BR,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Denys Pozniak<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">-- <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">BR,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Denys Pozniak<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>