From owner-freebsd-questions@FreeBSD.ORG Tue Jun 4 22:45:15 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D91BC7D3 for ; Tue, 4 Jun 2013 22:45:15 +0000 (UTC) (envelope-from gobble.wa@gmail.com) Received: from mail-bk0-x233.google.com (mail-bk0-x233.google.com [IPv6:2a00:1450:4008:c01::233]) by mx1.freebsd.org (Postfix) with ESMTP id 6C9FC1072 for ; Tue, 4 Jun 2013 22:45:15 +0000 (UTC) Received: by mail-bk0-f51.google.com with SMTP id ji2so482077bkc.38 for ; Tue, 04 Jun 2013 15:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=eOEqQ1UCxWqj0XL3EYzMR82XmZWOVzKThFKUgrqQrUc=; b=OX/fY24eZfs2SNxDC1pp+uyy+SbZfyvtbdKGYyVL4VoHDR8E6B4IjYYUOl8K1aTAmx V8sUyS9WxvHEfU1UCELktRK6fjiDEqYklf4gGQ3mYqU0vXsCnrPih4QI+NZQHP8bS+Od rI1ZTOj9Rvy58ywRwuQznRVfcSdWSoMDthcoNyLVhdT4db3410Wv+kIFEaALSS5jdRgx nzAHctF2sJy2HUdG35eP81V/YrKIytxb8WmGrcfIDlC+VGCtFtSS1mZderO4uXZT9ZP5 nEGgW04/9LkdAQ1RcP4Ifqo/NkLSRXk9zzT0Dx+o+oYgjhb2pCxUgvKwCoggmBYxb5LO v1Fw== MIME-Version: 1.0 X-Received: by 10.205.26.70 with SMTP id rl6mr8770594bkb.54.1370385914527; Tue, 04 Jun 2013 15:45:14 -0700 (PDT) Received: by 10.204.184.8 with HTTP; Tue, 4 Jun 2013 15:45:14 -0700 (PDT) Received: by 10.204.184.8 with HTTP; Tue, 4 Jun 2013 15:45:14 -0700 (PDT) In-Reply-To: References: <20130604033930.GA10393@uriel.asininetech.com> Date: Tue, 4 Jun 2013 15:45:14 -0700 Message-ID: Subject: Re: System Calls that do DNS From: Waitman Gobble To: Doug Hardie Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-questions@freebsd.org, staticsafe X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jun 2013 22:45:15 -0000 On Jun 3, 2013 10:22 PM, "Doug Hardie" wrote: > > > On 3 June 2013, at 20:39, staticsafe 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