Closed Bug 1189705 Opened 10 years ago Closed 10 years ago

Start up slow caused by network problems (when resolving own hostname ends with DNS timeout)

Categories

(Firefox :: Untriaged, defect)

39 Branch
Unspecified
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 433665

People

(Reporter: i, Unassigned)

Details

(Whiteboard: [bugday-20150803])

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0 Build ID: 2015063000 Steps to reproduce: You need a really bad internet connection to reproduce it. I have a low quality wireless router and web pages often miss pictures or css. Actual results: Firefox start up time becomes very slow -- 17 seconds -- it used to be 2 seconds. I visited Firefox Health Report page, and Firefox knowledge base, but find no description about network quality problems. Expected results: I think firefox should start the application window without wait for internet response, no matter how bad the internet connection is. And after that it can checking network and loading web pages. Or if Firefox is slow down by internet problem when starting, Health Report should give some information about the time spent on waiting network response.
Could you please try and obtain a profile of this as described at https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler ?
Flags: needinfo?(guoyunhebrave)
Whiteboard: [bugday-20150803]
Hi, here is the performance report: http://people.mozilla.org/~bgirard/cleopatra/#report=9df61017ff2f363f6b4d0afa3e6dca80386079a1 In this test, I am using my wireless router. It recorded a restart process, which takes 19 seconds. When I am using wired connection, without this router, it takes 3 seconds to restart Firefox. I am not sure if it is done correct. Some of my hardware information: CPU: Intel Core i7 4710HQ RAM: 2*4GB DDR3 1600 Disc: SAMSUNG 840 EVO SSD 120GB + SAMSUNG 850 EVO SSD 240GB
Flags: needinfo?(guoyunhebrave)
The profiler output is not useful, unfortunately, since Firefox is waiting on something. Can you start up with no internet connection at all? Can you reproduce using safe mode / new profile? https://support.mozilla.org/en-US/kb/troubleshoot-and-diagnose-firefox-problems `strace -fT command-to-start-firefox` might also help. Or whatever utility that displays per-process active network connections.
Flags: needinfo?(guoyunhebrave)
Without network connection, Firefox starts in 3 seconds, perfect speed. Neither safe mode nor new profile helps, still need about 17 seconds to start up. I know another user who has similar problem. After changed network connection, Firefox was speed up. Now I am out of home. Next week, when I arrive home, I will submit strace information. Thanks for your help!
Flags: needinfo?(guoyunhebrave)
OK, waiting on more information. strace will be hard to read, so if you can figure out what request Firefox is waiting on (if it's indeed a request), that might be easier.
Flags: needinfo?(guoyunhebrave)
Hi, here is the screenshot of strace output when it is waiting for several seconds. http://i.imgur.com/7wuDE0k.png As shown at the bottom, Firefox tried `sendto()` and `poll()` and wait for about 5 seconds. Then it seems that Firefox try this for several times and wait more time.
Flags: needinfo?(guoyunhebrave)
I do not speak English, it is translated by Google translation. I hope you can understand. I encountered the same problem. I used strace and script recording start Firefox. script -t 2> strace-fx.time -a strace-fx.txt strace firefox Terminal output "fd = 7" and "timeout" standstill 18 seconds. Like this: poll([{fd=7, events=POLLIN poll([{fd=7, events=POLLIN}], 1, 5000) = 0 (Timeout) Terminal Output "stat64" standstill 8 seconds, Firefox fully started with a total of 30 seconds. Complete records: https://www.dropbox.com/s/jckwl8p83zuz6x6/strace-fx-script-2015-0804.zip?dl=0
So in both cases, it seems like Firefox is waiting on a DNS response for the name of the host it's running on. Do you have the '127.0.0.1 your-host' mapping in /etc/hosts? Does adding it fixes the problem? This is probably a duplicate of bug 433665. -- Comment 6: > connect(7, ... sun_path="/var/run/nscd/socket") > sendto(7, ...) // 'linux-axlj' - this seems to be the name of the host Firefox is running on? > poll([{fd=7... Comment 7 ("openSUSE132.site" seems like it's also the name of the local host): >connect(7, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, 16) = 0 > poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}]) > send(7, "\326\316\1\0\0\1\0\0\0\0\0\0\vopenSUSE132\4site\0\0\1"..., 34, MSG_NOSIGNAL) = 34
Flags: needinfo?(guoyunhebrave)
This problem has gone in Firefox 40.0! But I am not sure if the bug has been solved. In my /etc/hosts file, I do not have '127.0.0.1 linux-axlj'. Since Firefox and some Mozilla library have been updated, I cannot test the old version.
Flags: needinfo?(guoyunhebrave)
'openSUSE132.site' is the host name. openSUSE 13.2 OS force the host name is set to "***. **". I'm in '/etc/hosts' file to add '127.0.0.1 openSUSE132.site', useless. I think 'openSUSE132.site' like a URL. Maybe set to "openSUSE132" Firefox start to normal. I want to use '/sbin/yast2 lan' Set the host name "openSUSE132", but the system not allowed to modify.I directly modify the '/etc/hostname' file, "openSUSE132.site" changed to "openSUSE132". In the '/etc/hosts' file add '127.0.0.1 openSUSE132', restart the computer. Firefox started normal. Firefox 40 + new profile, 2 seconds start is completed. Firefox 39 + Common profile, 3-4 seconds start is complete. Firefox 31 + Common profile, 3-4 seconds start is complete. 1. The host name can not be like a URL. 2. Must be in '/etc/hosts' add '127.0.0.1 host-name', If you do not add the host problem remains. Hope to fix this problem, rather than the user to modify the host name. Thank you!
Wolfgang, I guess this is an instance of bug 433665, but don't know how to verify that hypothesis. Any ideas? cangling: I can't imagine why 'openSUSE132.site' as a hostname wouldn't work. Do you have a strace for that case? Does the system read the correct info from /etc/hosts then still queries the DNS server?
Flags: needinfo?(mozilla)
OS: Unspecified → Linux
Summary: Start up slow caused by network problems → Start up slow caused by network problems (when resolving own hostname ends with DNS timeout)
(In reply to Nickolay_Ponomarev from comment #11) > Wolfgang, I guess this is an instance of bug 433665, but don't know how to > verify that hypothesis. Any ideas? I agree basically but also could only tell with an attached debugger or similar. I set up all my systems with the hostname in /etc/hosts. There is a checkbox to be ticked at installation time to do that but obviously can be added later. I haven't looked into this issue for ages honestly since I do not get regular reports about it.
(In reply to Nickolay_Ponomarev from comment #11) > cangling: I can't imagine why 'openSUSE132.site' as a hostname > wouldn't work. Do you have a strace for that case? Does the system read the > correct info from /etc/hosts then still queries the DNS server? I tested. firefox: 40 I set the system name 'openSUSE132.site', And in the '/etc/hosts' add '127.0.0.1 openSUSE132.site', Firefox is very slow start. strace1: https://www.dropbox.com/s/ovd6v4q2jdwda0u/strace-fx-script-2015-08-25_1.zip?dl=0 When I put the /etc/hosts the 'openSUSE132.site' modify 'openSUSE132', Firefox start normal again. strace2: https://www.dropbox.com/s/ynfppffzutao5tg/strace-fx-script-2015-08-25_2.zip?dl=0 Therefore, the system name can be 'openSUSE132.site', In the '/etc/hosts' must be '127.0.0.1 openSUSE132', It can not be '127.0.0.1 openSUSE132.site'. I do not know why. Nickolay_Ponomarev, please do not publish my email address. You can use the "cangling". You can modify it? Thank you!
cangling, I sent you a personal message, re posting your e-mail address. I think I'll resolve this as a duplicate of 433665, since that's a known issue you'd be hitting in this configuration, and we have no easy way to check if there are any other issues that lead to this behavior until we fix that bug.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Flags: needinfo?(mozilla)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.