Closed Bug 1707095 Opened 5 years ago Closed 4 years ago

Firefox hangs on startup if system DNS is set to automatic

Categories

(Core :: Networking: DNS, defect, P2)

Firefox 87
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: noahtallen, Unassigned)

Details

(Whiteboard: [necko-triaged])

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0

Steps to reproduce:

I use Firefox 87 on PopOS 20.10. This is a fresh install as of a few days ago. I noticed quickly that Firefox takes approximately 25 seconds to open, despite being on a fast system with an NVME drive. This period is from clicking the icon (or running firefox on the CLI) to the point that a window displays. In other words, for 25 seconds, the mouse shows a spinner icon before Firefox displays any UI.

I tried the following to troubleshoot:

  • Started using a new profile (-P on the CLI)
  • Started in safe mode (-safe-mode)
  • Turned off hardware acceleration
  • Turned off DNS over HTTPS
  • Disabled my proxy settings

None of these resolved the problem. After quitting, it still took 25 seconds to open Firefox again.

Finally, I looked into my system DNS settings and discovered the following: if I change my system DNS from automatic to manual (using the same IP address that automatic detects), then Firefox launches instantly.

It's important to note that in both cases, DNS works fine after the browser opens, both with DoH enabled and disabled.

Something about setting DNS to "automatic" in the system DNS settings on appears to be causing Firefox to hang for a long time on startup, even though the DNS connection is working for typical requests after launch.

More context about my DNS: the router gives out its own IP address to use, and then forwards requests to a DNS server (such as PiHole or Cloudflare). I tested these settings, but the only difference was when I changed "Automatic" to "Manual" on the system in question. The IP address in "manual" was still the router's IP address, so that aspect of the network seems to be working fine.

Actual results:

When system DNS settings are set to automatic:

  • It takes 25 seconds after clicking the Firefox icon for any UI to be displayed.
  • It takes up to 10 seconds from clicking a link in a separate application for Firefox to open a new tab even when the browser is already running.

Expected results:

Firefox should not hang for such a long period when DNS is set to "automatic." In fact, I would expect Firefox to launch instantly even if there was a problem with DNS. I would expect the UI to become responsive quickly even with a failing network connection. (And that's not even the case here.)

The Bugbug bot thinks this bug should belong to the 'Core::Networking: DNS' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Networking: DNS
Product: Firefox → Core
Severity: -- → S4
Priority: -- → P2
Whiteboard: [necko-triaged]

Hello,

Just want to check are you still able to reproduce this with the latest nightly?
If yes, could you try to provide us a profiler link?

Thanks.

Flags: needinfo?(noahtallen)

I can no longer replicate on Firefox nightly, or on Firefox 91 for that matter. I am on PopOS 21.04 now and using automatic proxy settings, so I guess something updated in the meantime to resolve the problem.

Flags: needinfo?(noahtallen)
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.