Bug 389805 - Firefox uses gethostbyname to resolve host name
Summary: Firefox uses gethostbyname to resolve host name
Status: RESOLVED DUPLICATE of bug 389255
Alias: None
Product: openSUSE 11.0
Classification: openSUSE
Component: Firefox (show other bugs)
Version: Beta 1
Hardware: Other Other
: P5 - None : Major (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-13 13:32 UTC by Ludwig Nussel
Modified: 2008-05-14 06:47 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ludwig Nussel 2008-05-13 13:32:40 UTC
In profile/dirserviceprovider/src/nsProfileLock.cpp,
nsProfileLock::LockWithSymlink() firefox tries to resolve the
hostname (PR_GetHostByName) and uses the resulting IP address for a
symlink used for locking. That causes DNS timeouts on systems where
the hostname is not resolvable such as laptops.

Looks like the code is more or less obsolete so it could probably
removed completely. It could not have worked properly in the past
either since openSUSE typically mapped the hostname to 127.0.0.2. So
IsSymlinkStaleLock() would true on all systems that share the home
directory.

If you don't want to remove the code you could use getifaddrs()
instead to find the systems' IP addresses. getifaddrs() doesn't use
DNS therefore doesn't cause timeouts.

See also bug 383336 for a lengthy discussion about unecessary dns timeouts.
Comment 1 JP Rosevear 2008-05-13 18:00:34 UTC

*** This bug has been marked as a duplicate of bug 389285 ***
Comment 2 Ludwig Nussel 2008-05-14 06:45:28 UTC
must be a typo in the bug number. 389285 certainly is not a duplicate.
Comment 3 Magnus Boman 2008-05-14 06:47:46 UTC

*** This bug has been marked as a duplicate of bug 389255 ***