dns-terror (fastresolve-2.10_5) doesn't work on FreeBSD 10.x

Miroslav Lachman 000.fbsd at quip.cz
Sun Oct 18 13:45:54 UTC 2015


Hi,

I am using dns-terror to resolve IP addresses in Apache logs for many 
years on FreeBSD but it doesn't work on newly upgraded machines. It 
works fine on 8.4 but core dump on 10.1 and 10.2 amd64.
Tested on 5 machines. Port is compiled on 10.1 or 10.2.

+pid 62102 (dns-terror), uid 0: exited on signal 10 (core dumped)
+pid 62105 (dns-terror), uid 0: exited on signal 10 (core dumped)
+pid 62111 (dns-terror), uid 0: exited on signal 10 (core dumped)
+pid 62114 (dns-terror), uid 0: exited on signal 10 (core dumped)
+pid 62117 (dns-terror), uid 0: exited on signal 10 (core dumped)
+pid 62123 (dns-terror), uid 0: exited on signal 10 (core dumped)

Tested command is simple

dns-terror -p 1000 -d /var/tmp/ip2host.db -o < /var/log/httpd/access.log

I tried to change 1000 tu another number and also tried empty ip2host.db 
without any difference.

I get this with verbose output

# dns-terror -vvv -p 100 -d /var/tmp/ip2host.db -o < 
/var/log/httpd/access.log
adns debug: environment variable RES_OPTIONS not set
adns debug: environment variable ADNS_RES_OPTIONS not set
adns debug: using nameserver 208.67.222.222
adns debug: using nameserver 37.235.1.174
adns debug: environment variable RES_CONF not set
adns debug: environment variable ADNS_RES_CONF not set
adns debug: environment variable RES_CONF_TEXT not set
adns debug: environment variable ADNS_RES_CONF_TEXT not set
adns debug: environment variable LOCALDOMAIN not set
adns debug: environment variable ADNS_LOCALDOMAIN not set
read 0 addresses from DB file
110621 submitted
Bus error (core dumped)

If tried truss, the end of output is

access("/usr/local/lib/mysql/nss_dns.so.1",0)    ERR#2 'No such file or 
directory'
access("/lib/nss_dns.so.1",0)                    ERR#2 'No such file or 
directory'
access("/usr/lib/nss_dns.so.1",0)                ERR#2 'No such file or 
directory'
ioctl(3,TIOCGETA,0xffffe040)                     ERR#25 'Inappropriate 
ioctl for device'
close(3)                                         = 0 (0x0)
open("/etc/protocols",O_CLOEXEC,0666)            = 3 (0x3)
fstat(3,{ mode=-rw-r--r-- ,inode=47197,size=6456,blksize=16384 }) = 0 (0x0)
read(3,"#\n# Internet protocols\n#\n# $F"...,16384) = 6456 (0x1938)
close(3)                                         = 0 (0x0)
socket(PF_INET,SOCK_DGRAM,17)                    = 3 (0x3)
fcntl(3,F_GETFL,)                                = 2 (0x2)
fcntl(3,F_SETFL,O_NONBLOCK|0x2)                  = 0 (0x0)
getpid()                                         = 29542 (0x7366)
open("DB_CONFIG",O_RDONLY,0666)                  ERR#2 'No such file or 
directory'
stat("/var/tmp",{ mode=drwxrwxrwt ,inode=2684928,size=1024,blksize=16384 
}) = 0 (0x0)
clock_gettime(13,{1445175729.000000000 })        = 0 (0x0)
clock_gettime(4,{341660.053887029 })             = 0 (0x0)
clock_gettime(0,{1445175729.657872855 })         = 0 (0x0)
stat("/var/tmp/ip2host.db",{ mode=-rw-r--r-- 
,inode=2684940,size=140394496,blksize=16384 }) = 0 (0x0)
openat(0xffffff9c,0x8024580a0,0x2,0x0,0x20,0x802458010) = 4 (0x4)
fcntl(4,F_GETFD,)                                = 0 (0x0)
fcntl(4,F_SETFD,FD_CLOEXEC)                      = 0 (0x0)
read(4,"\0\0\0\0\^A\0\0\0\0\0\0\0b1\^E\0"...,512) = 512 (0x200)
close(4)                                         = 0 (0x0)
openat(0xffffff9c,0x8024580a0,0x202,0x0,0x20,0x802458010) = 4 (0x4)
fcntl(4,F_GETFD,)                                = 0 (0x0)
fcntl(4,F_SETFD,FD_CLOEXEC)                      = 0 (0x0)
fstat(4,{ mode=-rw-r--r-- ,inode=2684940,size=140394496,blksize=16384 }) 
= 0 (0x0)
pread(0x4,0x8024ab060,0x4000,0x0,0x4000,0x0)     = 16384 (0x4000)
sigprocmask(SIG_SETMASK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) 
= 0 (0x0)
sigaction(SIGHUP,{ 0x801cdd080 SA_SIGINFO ss_t },{ SIG_DFL 0x0 ss_t }) = 
0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)                 = 0 (0x0)
sigprocmask(SIG_SETMASK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) 
= 0 (0x0)
sigaction(SIGTERM,{ 0x801cdd080 SA_SIGINFO ss_t },{ SIG_DFL 0x0 ss_t }) 
= 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)                 = 0 (0x0)
sigprocmask(SIG_SETMASK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) 
= 0 (0x0)
sigaction(SIGINT,{ 0x801cdd080 SA_SIGINFO ss_t },{ SIG_DFL SA_RESTART 
ss_t }) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)                 = 0 (0x0)
pread(0x4,0x8024b0060,0x4000,0x4000,0x4000,0x0)  = 16384 (0x4000)
pread(0x4,0x8024b5060,0x4000,0x9d0000,0x4000,0x0) = 16384 (0x4000)
pread(0x4,0x8024ba060,0x4000,0x8000,0x4000,0x0)  = 16384 (0x4000)
fstat(0,{ mode=-rw-r--r-- ,inode=1366935,size=4351,blksize=16384 }) = 0 
(0x0)
read(0,"188.165.15.222 - - [18/Oct/2015:"...,16384) = 4351 (0x10ff)
gettimeofday({1445175729.663793 },0x0)           = 0 (0x0)
sendto(3,"1\^_\^A\0\0\^A\0\0\0\0\0\0\^C222"...,45,0x0,{ AF_INET 
208.67.222.222:53 },0x10) = 45 (0x2d)
gettimeofday({1445175729.664378 },0x0)           = 0 (0x0)
recvfrom(3,0x7fffffffe060,512,0x0,0x7fffffffe000,0x7fffffffe01c) ERR#35 
'Resource temporarily unavailable'
stat("/usr/share/nls/C/libc.cat",0x7fffffffded0) ERR#2 'No such file or 
directory'
stat("/usr/share/nls/libc/C",0x7fffffffded0)     ERR#2 'No such file or 
directory'
stat("/usr/local/share/nls/C/libc.cat",0x7fffffffded0) ERR#2 'No such 
file or directory'
stat("/usr/local/share/nls/libc/C",0x7fffffffded0) ERR#2 'No such file 
or directory'
SIGNAL 10 (SIGBUS)
process exit, rval = 0


It fails even on simple file like this:

# cat /tmp/test.log
1.2.3.4

Are somebody using dns-terror on FreeBSD 10.x? What can I do to debug 
and solve this problem?

Miroslav Lachman



More information about the freebsd-ports mailing list