Re: busybox nslookup slow on x86_64
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 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 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 > 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 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
Re: busybox nslookup slow on x86_64
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 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 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 requests is arrogant. ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: busybox nslookup slow on x86_64
On Thu, May 29, 2014 at 11:30:58PM +0200, Harald Becker wrote: > Hi Rich ! > > >> bbox nslookup uses libc to perform the lookup. > > >However, it may be nice to have an option for bb nslookup to > >turn off v6 lookups if such an option doesn't already exist. > > The problem has been solved by placing "single-request" option > in /etc/resolv.conf. So it was a glibc related problem. This option is a workaround for buggy nameserver software on some routers that hangs when you perform multiple requests at the same time. It's far from being a complete workaround since multiple processes/threads (or even different machines behind the router) might make simultaneous requests in a way that hangs the router. The correct fix is not to use the built-in nameserver on such routers but to instead either configure a local nameserver on 127.0.0.1 or use a third-party one (e.g. 8.8.8.8). Or replace the router's firmware with OpenWRT if possible. Rich ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: busybox nslookup slow on x86_64
Hi Rich ! >> bbox nslookup uses libc to perform the lookup. >However, it may be nice to have an option for bb nslookup to >turn off v6 lookups if such an option doesn't already exist. The problem has been solved by placing "single-request" option in /etc/resolv.conf. So it was a glibc related problem. -- Harald ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: busybox nslookup slow on x86_64
On Wed, May 28, 2014 at 04:34:23PM +0200, Denys Vlasenko wrote: > On Tue, May 27, 2014 at 9:34 AM, muddyboot 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 requests rather than properly looking them up and returning a result. However, it may be nice to have an option for bb nslookup to turn off v6 lookups if such an option doesn't already exist. Rich ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: busybox nslookup slow on x86_64
On Tue, May 27, 2014 at 9:34 AM, muddyboot 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. ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: busybox nslookup slow on x86_64
hello muddy, I can not replicate that. test: x86_64 busybox: 1.22.1 did you try an allnoconfig verson with only nslookup enabled ? (and things you may need). re, wh Am 27.05.2014 09:34, schrieb muddyboot: > 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. > ___ > busybox mailing list > busybox@busybox.net > http://lists.busybox.net/mailman/listinfo/busybox ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
busybox nslookup slow on x86_64
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. ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox