problem with DNS lookups on non-IPv4-only-mode?
Kendell Welch
kwelch at useractive.com
Wed Jun 9 15:27:44 EST 2004
Hi Darren,
Below are my results...see comments after that.
On Wed, 9 Jun 2004, Darren Tucker wrote:
> Kendell Welch wrote:
> > Below are some details about a few of the servers on which I encountered
> > the hanging DNS problem...I'm afraid that the BSD account I had trouble
> > with is no longer available...Windows OpenSSH servers have never had the
> > problem as best as I can tell.
> [..]
>
> Try this test program to see how long various get*info operations take,
> it approximates what sshd will do. Feed it a list of names equivalent
> to what your clients are looking up, eg:
>
> $ ./a.out www.openssh.com www.openbsd.org openbsd.org www.ibm.com
Here is a copy-and-paste of my runs of your program (had to make a
#include adjustment for time.h on my platform.) The second test is for
all domains that I believe http://www.whatismyipaddress.com/ refers to (I
have also changed the shell hostname for privacy reasons):
---BEGIN CLIP---
server:~> ./a.out www.openssh.com www.openbsd.org openbsd.org www.ibm.com
www.openssh.com:1383 getaddrinfo(0.004s) getnameinfo(0.000s)
www.openbsd.org:966 getaddrinfo(0.004s) getnameinfo(0.000s)
openbsd.org:2153 getaddrinfo(0.002s) getnameinfo(0.000s)
www.ibm.com:2163 getaddrinfo(0.107s) getnameinfo(0.000s)
getnameinfo(0.000s) getnameinfo(0.000s) getnameinfo(0.000s)
getnameinfo(0.000s) getnameinfo(0.000s)
server:~> ./a.out mirror.qkimg.net www.dsis.net
cserver.mii.instacontent.net www.qksrv.net toolbarqueries.google.com media27.fastclick.net
mirror.qkimg.net:1383 getaddrinfo(85.165s) getnameinfo(0.000s)
www.dsis.net:966 getaddrinfo(0.147s) getnameinfo(0.000s)
cserver.mii.instacontent.net:2153 getaddrinfo(85.161s) getnameinfo(0.000s)
www.qksrv.net:2163 getaddrinfo(0.130s) getnameinfo(0.000s)
toolbarqueries.google.com:3153 getaddrinfo(0.075s) getnameinfo(0.000s) getnameinfo(0.000s)
media27.fastclick.net:3327 getaddrinfo(0.068s) getnameinfo(0.000s)
server:~>
----END CLIP----
Noticing the slowness of getaddrinfo, specifically with mirror.qkimg.net,
www.dsis.net, and cserver.mii.instacontent.net, I decided to run that same
program only on those hosts:
---BEGIN CLIP---
server:~> ./a.out mirror.qkimg.net
mirror.qkimg.net:1383 getaddrinfo(85.207s) getnameinfo(0.000s)
server:~> ./a.out www.dsis.net
www.dsis.net:1383 getaddrinfo(0.003s) getnameinfo(0.000s)
server:~> ./a.out cserver.mii.instacontent.net
cserver.mii.instacontent.net:1383 getaddrinfo(85.238s) getnameinfo(0.000s)
server:~>
----END CLIP----
Clearly, there's a problem with at least two of these Domain Names. Is it
misconfigured DNS? Your program appears to call pure libraries...is this
a bug in glibc?
Thanks for any input!
Kendell
More information about the openssh-unix-dev
mailing list