Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jun 2013 15:45:14 -0700
From:      Waitman Gobble <gobble.wa@gmail.com>
To:        Doug Hardie <bc979@lafn.org>
Cc:        freebsd-questions@freebsd.org, staticsafe <me@staticsafe.ca>
Subject:   Re: System Calls that do DNS
Message-ID:  <CAFuo_fz4WwwVQgxSdjeVOXvn88B+xhm_AJz01-uAqfbY-tLw0Q@mail.gmail.com>
In-Reply-To: <CC1F81CF-1107-4031-A72F-164D6E23E5B7@lafn.org>
References:  <F5EBDC53-CBA3-415D-B7CD-1EC873692348@lafn.org> <20130604033930.GA10393@uriel.asininetech.com> <CC1F81CF-1107-4031-A72F-164D6E23E5B7@lafn.org>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Jun 3, 2013 10:22 PM, "Doug Hardie" <bc979@lafn.org> wrote:
>
>
> On 3 June 2013, at 20:39, staticsafe <me@staticsafe.ca> wrote:
>
> > On Mon, Jun 03, 2013 at 07:57:07PM -0700, Doug Hardie wrote:
> >> I have an unusual situation.  A program is doing a DNS lookup and
often the IP address has no reverse DNS entries.  As a result the program
hangs for several timeouts.  The call is not being made directly in its
code, but is occurring in a system call.  There are no specific calls to
DNS, its something else doing it.  I have been trying to track down which
system call is doing it, but without success so far.  I have tried syslog
calls around each of the system calls I thought might be the culprit, but
my guessing is not very good.  How can I identify the system call that is
calling DNS?  If I can find it, I hopefully can find another way to do
whatever it does that does not involve a reverse DNS lookup.
> >>
> >>
> >
> > Use truss:
> > http://www.freebsd.org/cgi/man.cgi?query=truss
> >
> > The truss utility traces the system calls called by the specified
> > process or program.
> > --
> > staticsafe
> > O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
> > Please don't top post - http://goo.gl/YrmAb
> > Don't CC me! I'm subscribed to whatever list I just posted on.
> >
>
> Unfortunately truss does not show anything more than ktrace.  I know what
is going out on the internet connection.  Its a plain old reverse DNS
request.  The question is what library module (probably not a system call
now that I think about it) is making that request.  Interestingly enough,
adding the IP address with a dummy name in /etc/hosts causes the reverse
request to succeed and there are no time delays.  So whatever module it is,
is not using bind.  Bind doesn't check the hosts files as far as I can tell.
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
freebsd-questions-unsubscribe@freebsd.org"

maybe try ldd and see if it is linked to a library like c-ares? or try
running it in gdb to see whats going on? some ideas.

Waitman Gobble
San Jose California USA



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?CAFuo_fz4WwwVQgxSdjeVOXvn88B+xhm_AJz01-uAqfbY-tLw0Q>