Bug 1192621
| Summary: | gethostbyname_r hangs forever | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Eric Newton <eric.newton> | |
| Component: | glibc | Assignee: | Florian Weimer <fweimer> | |
| Status: | CLOSED ERRATA | QA Contact: | Arjun Shankar <ashankar> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 6.8 | CC: | ashankar, codonell, ctubbsii, fweimer, mnewsome, pfrankli | |
| Target Milestone: | rc | Keywords: | 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
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. 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. 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 |