Closed
Bug 282865
Opened 21 years ago
Closed 21 years ago
Invalid? /etc/hosts file cause NSPR to fail to resolve domains via DNS.
Categories
(NSPR :: NSPR, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: kiall, Assigned: darin.moz)
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Firefox 1.0 official release; Mozilla suite 1.7.2 mandrake rpm
A possibly invaid, or too long or something.. hosts file causes NSPR to fail to
resolve domain names in hosts or DNS.
Reproducible: Always
Steps to Reproduce:
1. replace your /etc/hosts with the attached hosts file.
2. try visit any website
3.
Actual Results:
"<hostname> could not be found. Please check the name and try again."
Expected Results:
shown me a webpage :)
| Reporter | ||
Comment 1•21 years ago
|
||
| Reporter | ||
Comment 2•21 years ago
|
||
Just took a look at the hosts file and copped why its causes NSPR to break. too
many names on 1 line. but, all other (everything i have tryed anyway) works fine
with this hosts file.. good luck :)
Comment 3•21 years ago
|
||
NSPR itself doesn't use the hosts file. NSPR
calls the gethostbyname and getaddrinfo functions
and it is those functions that use the hosts file.
So this bug is at the OS level (the system library
that contains gethostbyname and getaddrinfo).
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 4•21 years ago
|
||
Im not so sure, as while i had that hosts file all other programs, except
mozilla based software worked fine. konquerer, ping, ftp, irc, Evolution, wget
and many more.. and the software that broke:
Mozilla 1.7.3 (i think thats the version),Firefox 1.0, Ephifany (yea i know its
spelled wrong) and Thunderbird.
This would lead me to believe its a bug somewhere in NSPR and not in the systems
lookup functions.
It is possible that the hosts file causes a delay in the system functions and
causes NSPR to **** out, (just an example i have no idea if this can be the case
or not)
And a final note, im unsure if this will reach anyone unless i re-open so please
dont shoot me for re-opening :)
Kiall Mac Innes
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 5•21 years ago
|
||
Darin, could you take a look at this bug report?
Thanks.
Assignee: wtchang → darin
| Assignee | ||
Comment 6•21 years ago
|
||
Does the /etc/hosts file cause all DNS lookups to fail? Or, do you only see the
error dialog when you navigate to a page that has content from one of the
"blocked" hosts? We've had reports in the past of people trying to construct a
ad-blocking /etc/hosts file like this before, and I thought we made Moz smart
about only showing the error dialog for toplevel loads. So, I suspect you are
seeing this error when you try to load any page. In any case, can you please
generate a Mozilla HTTP log:
http://www.mozilla.org/projects/netlib/http/http-debugging.html
Create the log file, attach it to this bug report using the "Create a New
Attachement" link above, and then we'll have a better idea of what's going on.
Thanks!
| Reporter | ||
Comment 7•21 years ago
|
||
| Assignee | ||
Comment 8•21 years ago
|
||
Yeah, from the log file it certainly looks like the DNS query for www.yahoo.com
simply failed. That means that gethostbyname("www.yahoo.com") or
getaddrinfo("www.yahoo.com") is failing. I'm not sure why it would be failing,
but at this point I don't see how it can be due to anything in Mozilla's
control. I'm not sure why other applications appear to be immune to the problem.
I suggest that you try working around the problem by creating separate entries
for each hostname in /etc/hosts, e.g.:
0.0.0.0 foo.com
0.0.0.0 bar.com
...
etc.
| Assignee | ||
Comment 9•21 years ago
|
||
marking WONTFIX.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago → 21 years ago
Resolution: --- → WONTFIX
| Reporter | ||
Comment 10•21 years ago
|
||
No its every webpage, for example mip.ie (which definatly is not in the list in
any way) wont show up. same with google (definatly not there either) and yahoo
(ad.yahoo.com IS there, but www.yahoo.com isnt). So in short no it is not only
the listed sites, but is all sites.
Out of curesoity have you tryed it and had success in browsing?
Kiall
| Assignee | ||
Comment 11•21 years ago
|
||
No, I haven't tried it myself. I know that people have used the other format
that I suggested, and I've also heard of a bug in GLIBC with overly long lines
in /etc/hosts, so it seems to me that there is a easy workaround for you, and
not much of any solution for Mozilla, so while the problem may appear to be
Moz-specific, I'd rather not waste time trying to fix this in Mozilla.
You need to log in
before you can comment on or make changes to this bug.
Description
•