[OpenSIPS-Users] opensips 2.4.6 crash dns_cache module with CNAME record

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Dec 5 14:17:45 EST 2019


Hi William,

Do you get a core file during the crash ? If yes, please open BUG ticket 
with https://github.com/OpenSIPS/opensips/issues uploading the 
bracktrace information.

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Bootcamp Pre-Registration
   https://opensips.org/training/OpenSIPS_Bootcamp/

On 12/4/19 2:30 AM, William Jin wrote:
>
> Hi,
>
> We are using Opensips 2.4.6(apt repo) on Debian stretch
>
> opensips -V
>
> version: opensips 2.4.6 (x86_64/linux)
>
> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, 
> F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
>
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
> MAX_URI_SIZE 1024, BUF_SIZE 65535
>
> poll method support: poll, epoll, sigio_rt, select.
>
> main.c compiled on  with gcc 6.3.0
>
> We started to use dns_cache module recently.
>
> However, after we add the module, opensips crashes when it stores a 
> particular dns_cache and we noticed below error
>
> Dec  4 03:53:17 /usr/sbin/opensips[10788]: 
> INFO:dns_cache:put_dnscache_value: putting key [dnscache_xxxx_naptr] 
> with value [|] ttl = 7200
>
> 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
>
> Dec  4 03:53:17 /usr/sbin/opensips[10788]: 
> INFO:dns_cache:put_dnscache_value: putting key [dnscache_xxxx_aaaa] 
> with value [|] ttl = 7200
>
> 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
>
> Dec  4 03:53:17 /usr/sbin/opensips[10788]: 
> INFO:dns_cache:put_dnscache_value: putting key [dnscache_yyyy_naptr] 
> with value [|] ttl = 7200
>
> 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
>
> Dec  4 03:53:17 /usr/sbin/opensips[10788]: 
> INFO:dns_cache:put_dnscache_value: putting key [dnscache_yyyy_aaaa] 
> with value [|] ttl = 7200
>
> 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
>
> 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
> Dec  4 03:53:24 /usr/sbin/opensips[10789]: CRITICAL:core:sig_usr: 
> segfault in process pid: 10789, id: 6
> Dec  4 03:53:24 /usr/sbin/opensips[10854]: 
> CRITICAL:core:handle_worker: dead child 6 (EOF received), pid 10789
> Dec  4 03:53:24 /usr/sbin/opensips[10773]: INFO:core:handle_sigs: 
> child process 10789 exited by a signal 11
>
> To replicate:
>
> ======================
>
> dns_try_ipv6=yes
>
>>
> loadmodule "cachedb_local.so"
>
> loadmodule "dns_cache.so"
>
>>
> modparam("dns_cache", "cachedb_url","local://")
>
> modparam("dns_cache", "blacklist_timeout",7200)
>
> Create a hostname with AAAA record points to a CNAME without any 
> records (E.g www.example.com <http://www.example.com> 60     IN 
>     CNAME www.example.net <http://www.example.net>., but do not give 
> any AAAA record to www.example.net <http://www.example.net>)
>
> modparam("proto_hep", "hep_id", "[hep_dst] 
> www.example.com;transport=udp;version=3 
> <http://www.example.com;transport=udp;version=3>")    #we are using 
> the hostname here in proto_hep, I think it can be triggered anywhere.
>
> ======================
>
> From the log, I believe if the dns query fail, it will store it for 
> {blacklist_timeout} seconds.
>
> 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.
>
> 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.
>
> *--*
>
> *Regards,*
>
> *William Jin*
>
> cid:image001.png at 01CF28AB.CA19A270
>
> Exetel System Adminitrator | Exetel PTY LTD
>
> *Web : *www.exetel.com.au <http://www.exetel.com.au/>
>
> *Main :*0280301000
>
> *Direct**:* 0280301038
> *Fax      :* 0280302100
>
> **
>
> Disclaimer: 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.**
>
> ============================
> Exetel Pty Ltd - PRIVACY POLICY
> ============================
>
> 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).
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20191205/fd6025a6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 10465 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20191205/fd6025a6/attachment-0001.png>


More information about the Users mailing list