<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=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Engrez;}
/* 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:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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="EN-AU" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We are using Opensips 2.4.6(apt repo) on Debian stretch<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">opensips -V<o:p></o:p></p>
<p class="MsoNormal">version: opensips 2.4.6 (x86_64/linux)<o:p></o:p></p>
<p class="MsoNormal">flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT<o:p></o:p></p>
<p class="MsoNormal">ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535<o:p></o:p></p>
<p class="MsoNormal">poll method support: poll, epoll, sigio_rt, select.<o:p></o:p></p>
<p class="MsoNormal">main.c compiled on  with gcc 6.3.0<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We started to use dns_cache module recently.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">However, after we add the module, opensips crashes when it stores a particular dns_cache and we noticed below error<o:p></o:p></p>
<p class="MsoNormal">Dec  4 03:53:17 /usr/sbin/opensips[10788]: INFO:dns_cache:put_dnscache_value: putting key [dnscache_xxxx_naptr] with value [|] ttl = 7200<o:p></o:p></p>
<p class="MsoNormal">Dec  4 03:53:17 /usr/sbin/opensips[10788]: INFO:dns_cache:put_dnscache_value: putting key [dnscache__sip._udp.xxxx_srv] with value [|] ttl = 7200<o:p></o:p></p>
<p class="MsoNormal">Dec  4 03:53:17 /usr/sbin/opensips[10788]: INFO:dns_cache:put_dnscache_value: putting key [dnscache_xxxx_aaaa] with value [|] ttl = 7200<o:p></o:p></p>
<p class="MsoNormal">Dec  4 03:53:17 /usr/sbin/opensips[10788]: INFO:dns_cache:put_dnscache_value: putting key [dnscache_xxxx_a] with value [#002] ttl = 1769<o:p></o:p></p>
<p class="MsoNormal">Dec  4 03:53:17 /usr/sbin/opensips[10788]: INFO:dns_cache:put_dnscache_value: putting key [dnscache_yyyy_naptr] with value [|] ttl = 7200<o:p></o:p></p>
<p class="MsoNormal">Dec  4 03:53:17 /usr/sbin/opensips[10788]: INFO:dns_cache:put_dnscache_value: putting key [dnscache__sip._udp.yyyy_srv] with value [|] ttl = 7200<o:p></o:p></p>
<p class="MsoNormal">Dec  4 03:53:17 /usr/sbin/opensips[10788]: INFO:dns_cache:put_dnscache_value: putting key [dnscache_yyyy_aaaa] with value [|] ttl = 7200<o:p></o:p></p>
<p class="MsoNormal">Dec  4 03:53:17 /usr/sbin/opensips[10788]: INFO:dns_cache:put_dnscache_value: putting key [dnscache_yyyy_a] with value [#002] ttl = 60<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif">Dec  4 03:53:24 /usr/sbin/opensips[10789]: INFO:dns_cache:put_dnscache_value: putting key [dnscache_[CNAME_hostname]_aaaa] with value [#012] ttl = 20062<br>
Dec  4 03:53:24 /usr/sbin/opensips[10789]: CRITICAL:core:sig_usr: segfault in process pid: 10789, id: 6<br>
Dec  4 03:53:24 /usr/sbin/opensips[10854]: CRITICAL:core:handle_worker: dead child 6 (EOF received), pid 10789<br>
Dec  4 03:53:24 /usr/sbin/opensips[10773]: INFO:core:handle_sigs: child process 10789 exited by a signal 11</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">To replicate:<o:p></o:p></p>
<p class="MsoNormal">======================<o:p></o:p></p>
<p class="MsoNormal">dns_try_ipv6=yes<o:p></o:p></p>
<p class="MsoNormal">…<o:p></o:p></p>
<p class="MsoNormal">loadmodule "cachedb_local.so"<o:p></o:p></p>
<p class="MsoNormal">loadmodule "dns_cache.so"<o:p></o:p></p>
<p class="MsoNormal">…<o:p></o:p></p>
<p class="MsoNormal">modparam("dns_cache", "cachedb_url","local://")<o:p></o:p></p>
<p class="MsoNormal">modparam("dns_cache", "blacklist_timeout",7200)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Create a hostname with AAAA record points to a CNAME without any records (E.g
<a href="http://www.example.com">www.example.com</a>     60     IN     CNAME    <a href="http://www.example.net">
www.example.net</a>., but do not give any AAAA record to <a href="http://www.example.net">
www.example.net</a>)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">modparam("proto_hep", "hep_id", "[hep_dst] <a href="http://www.example.com;transport=udp;version=3">
www.example.com;transport=udp;version=3</a>")    #we are using the hostname here in proto_hep, I think it can be triggered anywhere.<o:p></o:p></p>
<p class="MsoNormal">======================<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">From the log, I believe if the dns query fail, it will store it for {blacklist_timeout} seconds.<o:p></o:p></p>
<p class="MsoNormal">However, in my case, it can get a CNAME answer, but there is no actual IPv6 IP associate with it, and it is where opensips crash happens.  The ttl = 20062 also looks weird in the log, because I set it up for 60 only.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We also tried to use the cachedb_memcached by setting up a memcache server, same crash. However, when we tried to use the same settings on a server without this particular CNAME record, then the issue is gone.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="font-family:Engrez">--<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family:Engrez">Regards,<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family:Engrez">William Jin</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Engrez;color:#7F7F7F"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><img border="0" width="91" height="74" style="width:.9479in;height:.7708in" id="Picture_x0020_1" src="cid:image001.png@01D5AA91.B929EC90" alt="cid:image001.png@01CF28AB.CA19A270"><span lang="EN-US" style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:Engrez;color:#7F7F7F">Exetel System Adminitrator | Exetel PTY LTD<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:8.0pt;font-family:Engrez;color:#7F7F7F">Web    :
</span></b><a href="http://www.exetel.com.au/"><span style="font-size:8.0pt;font-family:Engrez;color:#7F7F7F">www.exetel.com.au</span></a><span style="font-size:8.0pt;font-family:Engrez;color:#7F7F7F">
</span><span lang="EN-US" style="font-size:8.0pt;font-family:Engrez;color:#7F7F7F"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:8.0pt;font-family:Engrez;color:#7F7F7F">Main   :</span></b><span style="font-size:8.0pt;font-family:Engrez;color:#7F7F7F"> 0280301000<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:8.0pt;font-family:Engrez;color:#7F7F7F">Direct</span></b><span style="font-size:8.0pt;font-family:Engrez;color:#7F7F7F">
<b>:</b> 0280301038<br>
<b>Fax      :</b> 0280302100<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;color:#084B8A"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:Engrez;color:#7F7F7F">Disclaimer:
</span><span style="font-size:8.0pt;font-family:Engrez;color:#7F7F7F">Hey, we like to ‘Get Things Done’ but sometimes little things can go astray. Like emails. This email may contain confidential information. If you received it accidentally please let the sender
 know and delete it. No contractual obligations for pricing or any services will arise until we sign a formal written contract or formal variation to your existing contract.</span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Engrez;color:#7F7F7F"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US" style="font-size:8.0pt;font-family:Engrez;color:#7F7F7F">============================
<br>
Exetel Pty Ltd - PRIVACY POLICY <br>
============================<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:8.0pt;font-family:Engrez;color:#7F7F7F">Exetel respects your privacy, and we will only reveal, discuss, or transact with the owner of the service(s) via e-mail
 or telephone once we are satisfied we have identified the person who is seeking information. If for any reason any other person(s) wishes to enquire on a service that they are not the owner of, we will not discuss any matters with them.  Exetel's Privacy policy
 is not negotiable under any circumstances, except for urgent or vital situations as described in the relevant Federal legislation (Privacy Act).</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>