Ubuntu Firefox handles DNS failure poorly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
firefox (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: firefox
When the primary DNS server is set to the wrong address, Ubuntu Firefox takes 10 to 15 seconds to look up URLs. The problem does not occur with Firefox on Windows XP, and appears to be much less severe with Firefox on Fedora 13 or with Google Chrome. It does not appear to be an ipv6 problem.
Steps to reproduce:
1. Set 192.68.0.1 (incorrect value) as the primary DNS and 208.67.220.220 (OpenDNS) as the secondary. In my case this I am using a WRT54GL router with DHCP, so the DNS was determined by the router, and these settings were in the router.
2. Reboot to make sure you are using OpenDNS. Verify the server used by typing
nslookup www.google.com .
3. With Ubuntu Firefox 3.6.8, go to http://
Results
1. The status line displays "Looking up [URL address] ..." for 10 to 15 seconds. This is reproducible.
2. If the primary DNS is set correctly and the computer is rebooted, the problem is solved and the lookup is almost instantaneous. (Primary DNS set to 192.168.0.1 (the modem) instead of 192.68.0.1 in the router; primary DNS in the modem was left at 68.94.156.1 [Southwestern Bell].)
Other diagnostic information (all tests run with primary server set incorrectly)
1. Nslookup returns the IP address in 0 to 2 seconds. Thus, the system appears to be handling the lookup much faster than Firefox.
2. Even if nslookup is used immediately before Firefox, Firefox is still slow. Thus, IP address caching (if it occurred) did not speed up Firefox. Dnsmasq is not installed.
3. I never observed the problem with Windows XP (I tested on the same machine). Name resolution is almost instantaneous.
4. I have not tested much with other browsers or other OS's, but Google Chrome (Ubuntu) and Fedora 13 (Firefox, live CD) are much faster. Typically 4 to 5 seconds, as opposed to 10-15 seconds with Ubuntu Firefox. Thus, the bug appears to be specific to Ubuntu Firefox, or to a specifically Ubuntu component.
Ubuntu Firefox appears to be using different timeout or retry options than the other browser/OS combinations. I can post logs if anyone wants, but a summary should suffice.
If the primary server is 192.68.0.1 (wrong) but the secondary server is correct,
nslookup -d2 www.google.com
shows that it queries both servers, and it returns results immediately.
nslookup -d2 www.google.com 192.68.0.1 [or any nonexistent server]
shows three attempts with 5 second timeouts, followed by failure.
Firefox shows retries and timeouts total 15 seconds, followed by success. I speculate that it's using default timeout of 5 seconds, with two retries, before using another server.
Google Chrome or Fx on Fedora live CD shows (retries?) and timeouts, totaling 5 seconds, followed by success.
OK, inasmuch as this depends on an incorrect setup, it's a minor problem.