Bug 1568571 - Slow warm or cold start of ~15-20s; opening a link from an external app is slow as well
Summary: Slow warm or cold start of ~15-20s; opening a link from an external app is sl...
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 28
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Gecko Maintainer
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2018-04-17 19:15 UTC by sonnhy
Modified: 2019-05-03 13:51 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-05-03 13:51:32 UTC
Type: Bug

Attachments (Terms of Use)
Wireshark relevant rows about the queried domain on firefox start (607 bytes, text/plain)
2018-04-17 19:15 UTC, sonnhy
no flags Details
tcpdump_fast_firefox_start (192.45 KB, text/plain)
2018-06-03 09:31 UTC, Sebastian
no flags Details
tcpdump_slow_firefox_start (179.89 KB, text/plain)
2018-06-03 09:31 UTC, Sebastian
no flags Details

Description sonnhy 2018-04-17 19:15:34 UTC
Created attachment 1423229 [details]
Wireshark relevant rows about the queried domain on firefox start

Description of problem:
Whenever I start up Firefox, warm or cold start, from the dash or terminal, it takes about 15 seconds to show up.
Also, if a open a link from any other application, say the About page from any app, before the new tab with the link starts to load it takes the same amount of time.

I've described the problem on fedoraforum.org as well https://forums.fedoraforum.org/showthread.php?317835-Firefox-is-slow-to-start-up-(15-20s)-or-open-links-from-other-applications

Version-Release number of selected component (if applicable):
I'm on Fedora 28 workstation, Gnome-shell, wayland, 64 bit, kept updated daily.

How reproducible:
Not sure because it seems a very specific problem.

Steps to Reproduce:
1. Open Firefox from the dash, the shell or terminal
2. Alternatively or after, open any link from an external application (with Firefox set as default web browser)

Actual results:
- It takes 15-20s before the app window shows up
- If opened a link, it takes approximatively the same amount of time before the tab is created and the link is loaded.

Expected results:
- Firefox window shows up almost immediately instead of delaying so much.
- The same expectations apply for opening a link from an external app.

Additional info:
My hostname is "e7470".
I've noticed, as by suggested from an user at the fedoraforum, to check with wireshark if there was any request that could delay so much the start.
What I've noticed is that whenever I open Firefox or a link from an external app, something starts to query the domain "e7470.lan", wasting almost 10s waiting for a response, it then repeats the query. After that it tries to query "e7470" (without the .lan) and gets answered and only then the Firefox window shows up.

Here's a copy of the wireshark relevant rows:

Comment 1 Martin Wolf 2018-04-24 20:35:51 UTC
I have the same issue on fedora 27.

Comment 2 sonnhy 2018-04-24 21:02:56 UTC
If you need a workaround, as I've said on fedoraforum.org, you can add a line into your /etc/hosts like this: <your-hostname> <your-hostname>.lan

This fixed my problem for now. Changing my hostname would need me to edit manually the /etc/hosts file, which I think it's less than ideal.
You may need to use a DNS resolver, like dnsmasq, otherwise the /etc/hosts file seems to be ignored (for me at least).

Comment 3 Sebastian 2018-05-03 11:15:25 UTC
I can reproduce the issue when:
-changing the device name (with the standard name "localhost.localdomain" it works fine)
-the wifi signal strength is poor

Slow starting also affects Thunderbird.

Comment 4 sonnhy 2018-05-03 11:46:22 UTC
(In reply to Sebastian from comment #3)
> I can reproduce the issue when:
> -the wifi signal strength is poor

Mmm, I cannot. I'm literally 1 meter apart from my wi-fi router (I'm not connected to eth because the ports are full) and I still have the issue.

> -changing the device name (with the standard name "localhost.localdomain" it
> works fine)

I can confirm on this.

> Slow starting also affects Thunderbird.

I have the same problem with Thunderbird as well.
I've forgot to mention in the bug reporting, I shall add it.

Comment 5 Sebastian 2018-06-03 09:29:43 UTC
Hosts and resolv.conf don't change when the problem appears:

[user@localhost-localdomain ~]$ cat /etc/resolv.conf 
# Generated by NetworkManager
search home
[user@localhost-localdomain ~]$

[user@localhost-localdomain ~]$ cat /etc/hosts   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
[user@localhost-localdomain ~]$

But there seems to be a change in the dnsdomainname:

Firefox starting fast:
[user@localhost-localdomain ~]$ dnsdomainname
[user@localhost-localdomain ~]$

Firefox starting slow:
[user@localhost-localdomain ~]$ dnsdomainname
[user@localhost-localdomain ~]$

As soon i disable and reactivate my wifi adapter the problem is gone. I made some tcpdumps while starting firefox. 

Sometimes the problem appears and sometimes not. Doesn’t matter if I am using a different device or a different network.

Comment 6 Sebastian 2018-06-03 09:31:05 UTC
Created attachment 1447171 [details]

Comment 7 Sebastian 2018-06-03 09:31:37 UTC
Created attachment 1447172 [details]

Comment 8 Sebastian 2019-01-29 17:39:03 UTC
Problem is solved for me. Wasn't able to reproduce the issue for a while now (4.20.4-200.fc29.x86_64).

Comment 9 Ben Cotton 2019-05-02 19:57:32 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 sonnhy 2019-05-03 13:51:32 UTC
As of now, I'm on Fedora 30 and the latest Firefox. I'm reverted to using the default DNS system, systemd-resolved, and everything seems to work correctly and I don't have encountered this bug nor I can reproduce it anymore.

Note You need to log in before you can comment on or make changes to this bug.