This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/17977] gethostbyname_r hangs forever
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 23 Jun 2015 09:51:51 +0000
- Subject: [Bug libc/17977] gethostbyname_r hangs forever
- Auto-submitted: auto-generated
- References: <bug-17977-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17977
--- Comment #7 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via b57525f1a376149840f740a31535681c07152ba4 (commit)
via 47852c972d1ad80d8b38d9e94507b27df0ede421 (commit)
from 554edb23ffc7a953ca86309cc5f02dbd1a63abe0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b57525f1a376149840f740a31535681c07152ba4
commit b57525f1a376149840f740a31535681c07152ba4
Author: Dmitry V. Levin <ldv@altlinux.org>
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.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=47852c972d1ad80d8b38d9e94507b27df0ede421
commit 47852c972d1ad80d8b38d9e94507b27df0ede421
Author: Dmitry V. Levin <ldv@altlinux.org>
Date: Mon Jun 22 09:57:14 2015 +0000
_res_hconf_reorder_addrs: fix typo in comment
* resolv/res_hconf.c (_res_hconf_reorder_addrs): Fix typo in comment.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 16 ++++++
NEWS | 20 ++++----
resolv/Makefile | 4 ++
resolv/res_hconf.c | 6 +-
resolv/tst-res_hconf_reorder.c | 112 ++++++++++++++++++++++++++++++++++++++++
5 files changed, 145 insertions(+), 13 deletions(-)
create mode 100644 resolv/tst-res_hconf_reorder.c
--
You are receiving this mail because:
You are on the CC list for the bug.