[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: busybox nslookup slow on x86_64
From:       Rich Felker <dalias () libc ! org>
Date:       2014-05-31 1:18:48
Message-ID: 20140531011848.GC507 () brightrain ! aerifal ! cx
[Download RAW message or body]

On Sat, May 31, 2014 at 02:02:35AM +0200, Denys Vlasenko wrote:
> On Thursday 29 May 2014 20:47, Rich Felker wrote:
> > On Wed, May 28, 2014 at 04:34:23PM +0200, Denys Vlasenko wrote:
> > > On Tue, May 27, 2014 at 9:34 AM, muddyboot <emufly@gmail.com> wrote:
> > > > Hi, I found nslookup resolve very slow on x86_64 system , it cost 5 seconds \
> > > > or longer almost everytime. 
> > > > Tested OS: Debian 7 x86_64 with kernel 3.2.5 &  LFS x86_64 with kernel 3.12
> > > > 
> > > > No IPv6 enabled in kernel config.
> > > > DNS server works fine
> > > > nslookup program from bind-9.7 works fine
> > > > nslookup from busybox test on i686 system OK
> > > > 
> > > > target busybox version: 1.17.4、1.20.2、1.21.1、1.22.1
> > > > 
> > > > Any response for this problem is great appreciated.
> > > 
> > > bbox nslookup uses libc to perform the lookup.
> > > 
> > > glibc maintainers known to be quite.. er.. stubborn
> > > about how DNS should work.
> > > 
> > > For example, they insist that IPv6 DNS requests must be sent
> > > even if the machine has no IPv6 support in kernel
> > > (let alone a more typical case where machine
> > > has no IPv6 connectivity).
> > > 
> > > Your DNS server does not respond to IPv6 requests,
> > > but glibc waits for them.
> > 
> > Unless the caller requested AI_ADDRCONFIG or requested AF_INET
> > explicitly as opposed to AF_INET6, it's required to do this. And I
> > don't think it's a bug. It may be useful to know all DNS results even
> > if some of them (v6) won't be used for your current client setup. The
> > bug is in whatever broken nameserver is ignoring AAAA requests rather
> > than properly looking them up and returning a result.
> 
> Well, in many cases users have no power over that nameserver.
> 
> Forcing them to suffer instead of giving them ways to disable
> AAAA requests is arrogant.

As I said an option in nslookup to do this would be nice. I believe
glibc also has an option in resolv.conf (mentioned earlier in this
thread, IIRC) to disable the AAAA requests globally. But I don't think
it makes sense to complain about glibc doing both lookups by default,
since that is the behavior specified/required by the standard. IMO
this is one of the few cases of glibc doing the right thing (properly
supporting modern usage rather than focusing on bug-compatibility for
broken legacy setups).

Rich
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic