Open
Bug 1015001
Opened 11 years ago
Updated 1 year ago
high CPU usage and disk writes to places.sqlite when DNS for a host is set to 0.0.0.0 in hosts file under Windows
Categories
(Core :: Networking: DNS, defect, P5)
Tracking
()
UNCONFIRMED
People
(Reporter: emanueLczirai, Unassigned)
Details
(Whiteboard: [necko-would-take])
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release)
Build ID: 20140520115057
Steps to reproduce:
1. make sure firefox is not running (to be sure)
2. edit hosts file(C:\Windows\System32\drivers\etc\hosts.) and make sure only the following two lines exist (or maybe just one is enough):
127.0.0.1 localhost
0.0.0.0 instagram.com
3. the DNS Service (in windows 7 64bit that is) was disabled, for me - not sure if this matters much
4. regardless of what dns server(s) are set for your connection(LAN, for me) (tested 8.8.8.8 and then 127.0.0.1 unbound+dnscrypt; not at the same time)
start firefox
5. new tab (Ctrl+T) and type in the address bar(Alt+D):
instagram.com
press enter and observe
I'm on Windows 7 64bit... firefox 30, beta6? (on beta channel, latest at the time)
Actual results:
firefox starts using 25% cpu (on a quad core) and the tab "title" is "Connecting..."
this happens indefinitely (apparently)
and unless places.history.enabled (in about:config) is set to false, then there is huge amount of writes on disk(SSD in my case) to the file(s):
places.sqlite
places.sqlite-wal
(maybe others? can't remember, but I was using Resource Monitor from windows and it says 33,000,000 more or less, B/sec at the Writes section)
I also notice there's a status saying:
Waiting for instagram.com ...
maybe worth noting that nslookup instagram.com returns correct ip, but I guess, it makes sense because firefox actually uses hosts file first, and that's why it sees 0.0.0.0 instead, that's great.
I've notice that if I put another hostname like mooshworld.com the cpu usage and disk writes were less, like 11% cpu and 1.2mb for disk writes. Which is kinda odd? maybe it depends on my history in places? no idea
Expected results:
perhaps it should act as it does when the value 0.0.0.0 is 127.0.0.1
and in this case it just shows the Unable to connect page:
Firefox can't establish a connection to the server at instagram.com.
or at the very least, not write that crazily :)) on the disk and also not use that much cpu
apparently changing from 0.0.0.0 to 127.0.0.1 while firefox is running worked - that is, without restarting firefox.
Also note, when the `Unable to connect` page is displayed, pressing `Try again` button won't have the same effect as typing in `instagram.com` in a new tab, that is when changing back from 127.0.0.1 to 0.0.0.0 , it will still act as if 127.0.0.1 is happening and just keep showing the Unable to connect page and not trigger the bug. Well actually it shows the `Server not found` page when it is set to 0.0.0.0 and you press the `Try again` button, but it's still instantly and no bug.
New tab(Ctrl+T) and Alt+D(focus address) and type "instagram.com" triggers the bug again, without firefox restart - nice that it can see the change in hosts.
| Reporter | ||
Comment 1•11 years ago
|
||
oh wait, I will disable all addons (I had no plugins, neither enabled nor disabled, list is empty)
and see if it still happens - why didn't I think of this before?
| Reporter | ||
Comment 2•11 years ago
|
||
confirmed, it still happens without any addons(and any plugins)
the cpu usage is 28-34 % (on quad core) and I still had places.history.enabled=false the B/s write was maybe 60KB/sec for sessionstore.js or something like that
the status was: Looked up instagram.com... (and was still loading: icon was animating)
| Reporter | ||
Comment 3•11 years ago
|
||
made another test case to be sure it's not related to the `hosts` file explicitly, but rather in general whenever a site resolves to 0.0.0.0
I can confirm that by having Unbound(local dns server) reply with 0.0.0.0 for instagram.com the same thing happens as if it were in the `hosts` file.
in this case nslookup also returned 0.0.0.0
C:\Users\user>nslookup instagram.com
Server: localhost
Address: 127.0.0.1
Name: instagram.com
Address: 0.0.0.0
I'll include the used .conf file for unbound, just in case someone(or future me or wtw) wants to try that variant.
| Reporter | ||
Comment 4•11 years ago
|
||
Updated•9 years ago
|
Whiteboard: [necko-would-take]
Comment 5•8 years ago
|
||
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P5
Updated•3 years ago
|
Severity: normal → S3
Comment 6•1 year ago
|
||
This can be closed, it was either fixed long ago or something else had gone wrong on the original submitters computer.
You need to log in
before you can comment on or make changes to this bug.
Description
•