[Karmic] host -4 does IPv6 lookup -- times out

Bug #504963 reported by Marcerino
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bind9 (Ubuntu)
Expired
Low
Unassigned

Bug Description

Binary package hint: bind9

When using 'host' to do a dns lookup on Karmic, I get a fast initial response for the IPv4 lookup:

mvl@purple:~$ host www.google.com
www.google.com is an alias for www.l.google.com.
www.l.google.com has address 74.125.77.99
www.l.google.com has address 74.125.77.147
www.l.google.com has address 74.125.77.104

but then a long wait and a timeout on IPv6:

;; connection timed out; no servers could be reached
;; connection timed out; no servers could be reached

I guess this is because my home network router/DNS cache does not support IPv6. This timeout for host lookups with 'host' is not such a problem, but also seems to affect firefox (fixable with a setting) and ssh logins to remote machines. Why does the host command look for a IPv6 address after It gets a good IPv4 response?

I tried forcing only IPv4 lookup with 'host -4', but the result is the same:

mvl@purple:~$ host -4 www.google.com
www.google.com is an alias for www.l.google.com.
www.l.google.com has address 74.125.77.147
www.l.google.com has address 74.125.77.104
www.l.google.com has address 74.125.77.99
;; connection timed out; no servers could be reached
;; connection timed out; no servers could be reached

Is that behaviour intended? Is there really no way to gracefully ignore IPv6 when the local network does not support it? I am not the only one to run into this problem. See, for example:
http://wiki.kartbuilding.net/index.php/DNS_-_Bind9#Slow_DNS_lookup_issues_with_bind9
http://ubuntuforums.org/showthread.php?t=87798
https://help.ubuntu.com/community/WebBrowsingSlowIPv6IPv4
http://www.ubuntugeek.com/how-to-disable-ipv6-in-ubuntu.html

Revision history for this message
Marcerino (mastervanleeuwen) wrote :

I some posts, I found that ip -6 route may provide useful info. Here is the output:

mvl@purple:~$ ip -6 r
fe80::/64 dev wlan0 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 0

a friend of mine does not have the problem on the LTS version (8.04) of Ubuntu, and a different network. The output of the above on her machine is
fe80::/64 dev eth1 metric 256 expires 21330140sec mtu 1500 advmss 1440 hoplimit 4294967295
ff00::/8 dev eth1 metric 256 expires 21330140sec mtu 1500 advmss 1440 hoplimit 4294967295

Could it be that there is something wrong with the IPv6 kernel setup in Karmic/on my system?

Revision history for this message
Chuck Short (zulcss) wrote :

I am not able to reproduce this at all. I think you may have problems with your dns server.

chuck

Changed in bind9 (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Marcerino (mastervanleeuwen) wrote : Re: [Bug 504963] Re: [Karmic] host -4 does IPv6 lookup -- times out

Yes, the DNS server in my DSL modem does not support IPv6 (AAAAA requests
?). I am wondering why 'host' does a IPv6 (AAAAAA) lookup after receiving a
valid response on IPv4 (AAA request).

I try looking into the debug printouts, but did not learn much. I can post
the debug-output if it is helpful.

Marco.

On Mon, Jan 18, 2010 at 3:19 PM, Chuck Short <email address hidden>wrote:

> I am not able to reproduce this at all. I think you may have problems
> with your dns server.
>
> chuck
>
> ** Changed in: bind9 (Ubuntu)
> Importance: Undecided => Low
>
> ** Changed in: bind9 (Ubuntu)
> Status: New => Incomplete
>
> --
> [Karmic] host -4 does IPv6 lookup -- times out
> https://bugs.launchpad.net/bugs/504963
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Chuck Short (zulcss) wrote :

Please do

Revision history for this message
Marcerino (mastervanleeuwen) wrote :

Hi Chuck,

Attached the debug printout from host -D. The first two files host_before_wait.log and host_all.log are from just running 'host -D www.google.com, while the file host_minus4*.log are from running host -D -4 www.google.com. In each case, the 'before_wait' file is the log up to the moment that the program gets temporarily stuck; it waits about half a second and then later once or twice more. Each time just after printing:
unlock_lookup dighost.c:2145
the full log is in the *all.log files.

Hope this is useful. Let me know if you need more info.

Marco.

Revision history for this message
Marcerino (mastervanleeuwen) wrote :
Revision history for this message
Marcerino (mastervanleeuwen) wrote :
Revision history for this message
Marcerino (mastervanleeuwen) wrote :
Revision history for this message
Marcerino (mastervanleeuwen) wrote :

A similar issue is discussed here:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/417757

but I think that's about a different DNS resolver. E.g. in Firefox you can switch off ipv6 lookups and the delay is gone. Also note the comment in that thread:

The 5 second lag occurs with the Livebox (used by Orange, 12 million broadband internet customers in Europe).

Looks like I'm one of the lucky 12 million :)

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for bind9 (Ubuntu) because there has been no activity for 60 days.]

Changed in bind9 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.