Closed Bug 298310 Opened 20 years ago Closed 20 years ago

When using WPAD proxy autodetection each new nslookup takes 5-10 seconds (browser hangs)

Categories

(Firefox :: General, defect)

x86
FreeBSD
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 208287

People

(Reporter: jakob.grimstveit, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050513 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050513 Firefox/1.0.4

Browser hangs on each new page involving new namelookups, it seems. When typing
cnn.com in the address bar, it takes seven seconds until browser responds at
all. It hangs a couple of times more as well during the load process, before
showing the page without any specific problems in rendering.

Browser is unresponsive during hang. Even "pizza whirl" loading icon stops -
menus impossible to click on.

Tested on both FreeBSD and Windows XP with clean profiles - same problem occurs.

Using WPAD like this:

From dhcpd.conf:

option wpad code 252 = text;
option wpad "http://wpad.hostname.com/wpad.dat\n";

(Had to include the \n at the end of the string to circumvent a bug in IE6+,
documented here: http://www.squid-cache.org/Doc/FAQ/FAQ-5.html#ss5.11


$ curl wpad.hostname.com/wpad.dat
function FindProxyForURL(url,host) {
        if(
                        isPlainHostName(host) ||
                        url.substring(0, 7) != "http://" ||
                        isInNet(host,"188.190.195.0","255.255.255.0") ||
                        isInNet(host,"10.0.0.0","255.255.255.0")
        ) {
                return "DIRECT";
        }
        else {
                return "PROXY 188.190.195.17:8118; DIRECT";
        }
}

Note: Ip's and hostnames obfuscated.

Reproducible: Always

Steps to Reproduce:
1. Set up WPAD as described
2. Visit website with uncached hostname
3. Observe hangs

Actual Results:  
Browser hangs several times for 5-8 seconds before displaying website as normal

Expected Results:  
Quick browser display.

My proxy is a Privoxy more or less default config based on Suse 9.2 Professional
Severity: critical → major
Related to/duplicate of Core bug 208287?
I found out why the browser hanged: It's related to the time for the browser to
get a lookup of the specific hostname to be browsed. Our setup at work was
b0rked, which made it ask directly to the root dns servers, which in effect
would make a lookup take a long time.

I realized this, fixed our internal dns config to ask upstream isp's dns
servers, and then the resolving was much faster. Now the long hang is gone in
Firefox when typing in addresses. So suggest you look into it there.

Dig used before change in internal DNS:

$ dig @192.190.193.11 www.ikke.no

; <<>> DiG 9.3.1 <<>> @192.190.193.11 www.ikke.no
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22346
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 1

;; QUESTION SECTION:
;www.ikke.no.                   IN      A

;; ANSWER SECTION:
www.ikke.no.            86400   IN      CNAME   vet.ikke.no.
vet.ikke.no.            86400   IN      CNAME   wiberg.skiinfo.com.
wiberg.skiinfo.com.     86400   IN      A       62.70.76.15

;; AUTHORITY SECTION:
skiinfo.com.            86400   IN      NS      dns1.skiinfo.com.
skiinfo.com.            86400   IN      NS      dns1.powertech.no.
skiinfo.com.            86400   IN      NS      dns2.skiinfo.com.
skiinfo.com.            86400   IN      NS      dns2.powertech.no.

;; ADDITIONAL SECTION:
dns2.skiinfo.com.       172800  IN      A       62.70.76.7

;; Query time: 3184 msec
;; SERVER: 192.190.193.11#53(192.190.193.11)
;; WHEN: Wed Jun 22 13:20:33 2005
;; MSG SIZE  rcvd: 197

[jakobbg@nusse ~]$ dig +trace www.linux.no

; <<>> DiG 9.3.1 <<>> +trace www.linux.no
;; global options:  printcmd
.                       427036  IN      NS      G.ROOT-SERVERS.NET.
.                       427036  IN      NS      H.ROOT-SERVERS.NET.
.                       427036  IN      NS      I.ROOT-SERVERS.NET.
.                       427036  IN      NS      J.ROOT-SERVERS.NET.
.                       427036  IN      NS      K.ROOT-SERVERS.NET.
.                       427036  IN      NS      L.ROOT-SERVERS.NET.
.                       427036  IN      NS      M.ROOT-SERVERS.NET.
.                       427036  IN      NS      A.ROOT-SERVERS.NET.
.                       427036  IN      NS      B.ROOT-SERVERS.NET.
.                       427036  IN      NS      C.ROOT-SERVERS.NET.
.                       427036  IN      NS      D.ROOT-SERVERS.NET.
.                       427036  IN      NS      E.ROOT-SERVERS.NET.
.                       427036  IN      NS      F.ROOT-SERVERS.NET.
;; Received 228 bytes from 192.190.193.11#53(192.190.193.11) in 2 ms

no.                     172800  IN      NS      SLAVE1.STH.NETNOD.SE.
no.                     172800  IN      NS      NJET.NORID.no.
no.                     172800  IN      NS      NOT.NORID.no.
no.                     172800  IN      NS      X.NIC.no.
no.                     172800  IN      NS      Y.NIC.no.
no.                     172800  IN      NS      Z.NIC.no.
;; Received 255 bytes from 192.112.36.4#53(G.ROOT-SERVERS.NET) in 338 ms

linux.no.               86400   IN      NS      bra.gulbrandsen.priv.no.
linux.no.               86400   IN      NS      ns1.miranda.org.
linux.no.               86400   IN      NS      ns-0.trolltech.net.
;; Received 126 bytes from 192.36.144.116#53(SLAVE1.STH.NETNOD.SE) in 20 ms

www.linux.no.           604800  IN      CNAME   web-bar.linpro.no.
no.                     166894  IN      NS      SLAVE1.STH.NETNOD.SE.
no.                     166894  IN      NS      NJET.NORID.no.
no.                     166894  IN      NS      NOT.NORID.no.
no.                     166894  IN      NS      X.NIC.no.
no.                     166894  IN      NS      Y.NIC.no.
no.                     166894  IN      NS      Z.NIC.no.
;; Received 284 bytes from 212.125.101.197#53(bra.gulbrandsen.priv.no) in 62 ms


Dig used after change in internal DNS:

$ dig +trace www.linux.no

; <<>> DiG 9.3.1 <<>> +trace www.linux.no
;; global options:  printcmd
.                       222985  IN      NS      h.root-servers.net.
.                       222985  IN      NS      i.root-servers.net.
.                       222985  IN      NS      j.root-servers.net.
.                       222985  IN      NS      k.root-servers.net.
.                       222985  IN      NS      l.root-servers.net.
.                       222985  IN      NS      m.root-servers.net.
.                       222985  IN      NS      a.root-servers.net.
.                       222985  IN      NS      b.root-servers.net.
.                       222985  IN      NS      c.root-servers.net.
.                       222985  IN      NS      d.root-servers.net.
.                       222985  IN      NS      e.root-servers.net.
.                       222985  IN      NS      f.root-servers.net.
.                       222985  IN      NS      g.root-servers.net.
;; Received 228 bytes from 192.190.193.11#53(192.190.193.11) in 1 ms

no.                     172800  IN      NS      slave1.sth.netnod.se.
no.                     172800  IN      NS      njet.norid.no.
no.                     172800  IN      NS      not.norid.no.
no.                     172800  IN      NS      x.nic.no.
no.                     172800  IN      NS      y.nic.no.
no.                     172800  IN      NS      z.nic.no.
;; Received 255 bytes from 128.63.2.53#53(h.root-servers.net) in 140 ms

linux.no.               86400   IN      NS      ns1.miranda.org.
linux.no.               86400   IN      NS      ns-0.trolltech.net.
linux.no.               86400   IN      NS      bra.gulbrandsen.priv.no.
;; Received 126 bytes from 192.36.144.116#53(slave1.sth.netnod.se) in 30 ms

www.linux.no.           604800  IN      CNAME   web-bar.linpro.no.
no.                     3900    IN      NS      Z.NIC.no.
no.                     3900    IN      NS      not.norid.no.
no.                     3900    IN      NS      NJET.norid.no.
no.                     3900    IN      NS      SLAVE1.STH.NETNOD.SE.
no.                     3900    IN      NS      X.NIC.no.
no.                     3900    IN      NS      Y.NIC.no.
;; Received 284 bytes from 65.124.18.202#53(ns1.miranda.org) in 138 ms

*** This bug has been marked as a duplicate of 208287 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.