New issue
Advanced search Search tips

Issue 734063 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 735637
Owner: ----
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Google chrome and Chromium are very slow when using Proxy with PAC

Reported by th.schel...@gmail.com, Jun 16 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0

Example URL:
any

Steps to reproduce the problem:
1. Do a fresh install and reset all settings of Google Chrome or Chromium newest version
2. Use a proxy with pac script
3. Open any website (even google chrome bugtracker or support pages)

What is the expected behavior?
expected behavior would be a quick loading of the page with similar speed as any other browser.

What went wrong?
1. Chrome hangs for 5 seconds
2. Chrome asks for proxy password
3. Chrome hangs for 5 seconds
4. Part of the page appears
5. Chrome hangs for 5 seconds
6. Part of the page appears
7. Chrome hangs for 5 seconds
....

On the bottom left the message "Waiting for proxy tunnel..." is shown. In german version the message is "Host in Proxy-Skript wird aufgelöst", which has a complete different meaning.

Did this work before? N/A 

Chrome version: Version 59.0.3071.104 (Official Build) (64-Bit)  Channel: stable
OS Version: OS X 10.12
Flash Version: 

Tested with Google Chrome and Chromium and Mac OS.
Others reported same issue with Windows.

Hints from others to disable proxy auto configuration in Windows Network settings are not solving the issue.

There are also complaints in Blue Coat forum:
https://forums.bluecoat.com/forum/security-policy-enforcement-center/proxysg/9391-google-chrome-browser-very-slow-while-ie-without-any-issue
 
Please find attached a net-export created with Chromium Version 61.0.3133.0 (Entwickler-Build) (64-Bit)
chrome-net-export-log.json
226 KB View Download
Cc: pbomm...@chromium.org eroman@chromium.org mmenke@chromium.org
Components: -Internals>Network Internals>Network>Proxy
Labels: M-59
cc'ing eroman@ and mmenke@ for further triage.

Comment 3 by mmenke@chromium.org, Jun 16 2017

That log doesn't contain enough information, unfortunately.  You need to start logging before you start loading a page that is slow.  It looks like logging started while a page was hung, so we can't see what the last interesting event that didn't hang was.

Comment 4 by mmenke@chromium.org, Jun 16 2017

Oops, sorry, I missed the important request - so it looks like the issue is DNS lookups for "Thomass-MacBook-Pro.local" are taking five seconds.  It looks to me like this is a request issued by the PAC script, as opposed to a DNS request used for fetching the PAC script.  So you're running a PAC script that always wants to look up this domain, and the domain lookup always fails, but your DNS server takes us 5 seconds to tell us it failed.

This happens on every single request.  Which makes things basically unusable.  I'd suggest either fixing your PAC script not to do that lookup, or figure out why your DNS resolver is always timing out.  Not sure there's much we can do on our side (We could cache negative DNS results, but then if you have a flaky network, we could break a site, which also seems bad).
"Thomass-MacBook-Pro.local" is the name of my Mac Book. Of cause it does not exist in the DNS. Every Apple Computer using Mac OS get's such a name during setup.
This name is not part of the PAC.
Why should the PAC lookup names? Maybe that's the issue? The PAC should just compare domains but it should not lookup domains.
Also it can not lookup for example google.com as the internel DNS server will not provide information about external domains. Only the proxy needs to do DNS lookups.
The same proxy pac works fine in Firefox, Safari and IE.
I have reduced the PAC, see below, and the issue is with myIpAddress(). In my point of view it does not make sense to resolve the local name, as this is usualy set to something useless and no DNS server will resolve it.

If I try to resolve I get the following result immediately:
$ host Thomass-MacBook-Pro.local
Host Thomass-MacBook-Pro.local not found: 3(NXDOMAIN)

If you use the following PAC and try to open something from localhost, you will see the same issue, without any proxy or external server involved.

function FindProxyForURL(url, host) {

  var myIP = myIpAddress();

  return "DIRECT";
  
}

Comment 7 by mmenke@chromium.org, Jun 21 2017

[th.scheller@gmail.com]:  Sorry for the slow response.  Could you provide a new log from about:net-internals showing the issue?  (about:net-export is replacing about:net-internals, but it doesn't have quite as much hooked up yet).

Comment 8 by mmenke@chromium.org, Jun 21 2017

Oops, sorry, missed comment 6, new log not needed.  myIpAddress just gets the local hostname and does a DNS lookup using it.  Seems very weird that a mthod to get the local hostname does not return something that can be resolved.

Comment 9 by eroman@chromium.org, Jun 21 2017

Sounds like the issue is identified in comment #6.

We probably need to do re-write myIpAddress() (and myIpAddressEx()) for all platforms (except ChromeOS), as resolving the hostname as a means of obtaining it is unreliable.
I guess we'd have to enumerate all network interfaces, and try to pick the "best" one?  Or is there another way to get the local IP address?
There are a variety of hacky approaches, each with their own problems.

I will open a bug with some extra info and merge the related bugs in.
Mergedinto: 735637
Status: Duplicate (was: Unconfirmed)

Sign in to add a comment