Bug 665844

Summary: Invalid HOSTS File creates crashes
Product: [Fedora] Fedora Reporter: Marc-Andre Laverdiere <marcandre.laverdiere>
Component: glibcAssignee: Andreas Schwab <schwab>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 14CC: fweimer, jakub, schwab
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-11 16:27:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marc-Andre Laverdiere 2010-12-27 12:07:13 UTC
Description of problem:

When a HOSTS file is mis-configured (see below), Eclipse and XFCE will crash with the following error message:
java: ../sysdeps/posix/getaddrinfo.c:1470: rfc3484_sort: Assertion `src->results[i].native == -1 || src->results[i].native == a2_native' failed.

Version-Release number of selected component (if applicable):
glibc 2.12.90-21
Sun Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Kernel Linux 2.6.35.10-72.fc14.x86_64
xfdesktop 4.6.2-2.fc14.1

We should never have an application crash over such an issue. If it does, then it should at least have a useful error message to assist troubleshooting.

How reproducible:
Always

Steps to Reproduce:
1.Set up a static IP address (AA.XX.YY.ZZ) in NetworkManager
2.Set up the a HOSTS file like this one: 
127.0.0.1	COMPUTER_NAME	localhost.localdomain	localhost
::1	COMPUTER_NAME	localhost6.localdomain6	localhost6
127.0.1.1	COMPUTER_NAME.india.tcs.com	COMPUTER_NAME
AA.XX.YY.ZZ	COMPUTER_NAME.india.tcs.com	COMPUTER_NAME
... etc etc etc.
3. Try to log into XFCE
  
Actual results:
Returns to the login screen

Expected results:
XFCE desktop session

Additional info:
Error message is:
../sysdeps/posix/getaddrinfo.c:1470: rfc3484_sort: Assertion `src->results[i].native == -1 || src->results[i].native == a2_native' failed.

Please note that commenting out the 3rd line of the HOSTS file described above resolves the issues.

Comment 1 Andreas Schwab 2011-01-11 16:27:45 UTC

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