Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1192621

Summary: gethostbyname_r hangs forever
Product: Red Hat Enterprise Linux 6 Reporter: Eric Newton <eric.newton>
Component: glibcAssignee: Florian Weimer <fweimer>
Status: CLOSED ERRATA QA Contact: Arjun Shankar <ashankar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8CC: ashankar, codonell, ctubbsii, fweimer, mnewsome, pfrankli
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: glibc-2.12-1.177.el6 Doc Type: Bug Fix
Doc Text:
The DNS stub resolver, when reordering of resource records has been enabled, could hang indefinitely while processing the first few DNS responses. The faulty lock management has been corrected and the hang no longer occurs.
Story Points: ---
Clone Of:
: 1288613 (view as bug list) Environment:
Last Closed: 2016-05-10 21:25:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1172231, 1271375    

Description Eric Newton 2015-02-13 21:00:48 UTC
Please see https://sourceware.org/bugzilla/show_bug.cgi?id=17977

Comment 3 Christopher Tubbs 2015-06-25 18:23:54 UTC
This was fixed in upstream master branch. Not sure what their release schedule is, but might be worth pulling in the patch asap, so it doesn't bite any more users.

Comment 5 Carlos O'Donell 2015-08-25 16:27:52 UTC
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b57525f1a376149840f740a31535681c07152ba4

commit b57525f1a376149840f740a31535681c07152ba4
Author: Dmitry V. Levin <ldv>
Date:   Thu Jun 18 21:40:46 2015 +0000

    Fix potential hanging of gethostbyaddr_r/gethostbyname_r
    
    When "reorder" resolver option is enabled, threads of a multi-threaded process
    could hang in gethostbyaddr_r, gethostbyname_r, or gethostbyname2_r.
    
    Due to a trivial bug in _res_hconf_reorder_addrs, simultaneous
    invocations of this function in a multi-threaded process could result to
    _res_hconf_reorder_addrs returning without releasing the lock it holds,
    causing other threads to block indefinitely while waiting for the lock
    that is not going to be released.
    
    [BZ #17977]
    * resolv/res_hconf.c (_res_hconf_reorder_addrs): Fix unlocking
    when initializing interface list, based on the bug analysis
    and the patch proposed by Eric Newton.
    * resolv/tst-res_hconf_reorder.c: New test.
    * resolv/Makefile [$(have-thread-library) = yes] (tests): Add
    tst-res_hconf_reorder.
    ($(objpfx)tst-res_hconf_reorder): Depend on $(libdl)
    and $(shared-thread-library).
    (tst-res_hconf_reorder-ENV): New variable.

Comment 14 errata-xmlrpc 2016-05-10 21:25:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0834.html