This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Ping[2]: [PATCH][BZ #14719] Return EAI_SYSTEM from getaddrinfo ifwe run out of fds
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 19 Nov 2012 02:27:00 -0500
- Subject: Re: Ping[2]: [PATCH][BZ #14719] Return EAI_SYSTEM from getaddrinfo ifwe run out of fds
- References: <20121023171835.09f1b085@spoyarek><20121105163933.6d58174f@spoyarek><20121115140402.12a98ad8@spoyarek>
On Thu, Nov 15, 2012 at 3:34 AM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
> Ping!
>
> On Mon, 5 Nov 2012 16:39:33 +0530, Siddhesh wrote:
>> Ping!
>>
>> http://sourceware.org/ml/libc-alpha/2012-10/msg00613.html
>>
>> On Tue, 23 Oct 2012 17:18:35 +0530, Siddhesh wrote:
>>
>> > Hi,
>> >
>> > As described in the bug report, the current behaviour for
>> > getaddrinfo when it runs out of file descriptors is to return
>> > EAI_NOTFOUND, which is incorrect. Since a system error has
>> > occurred, it should be returning EAI_SYSTEM so that the real cause
>> > of the failure could be seen from errno. Attached patch does
>> > that. Tested on x86_64 Fedora 16 for AF_INET, AF_UNSPEC and
>> > AF_INET6. OK to commit?
>> >
>> > Regards,
>> > Siddhesh
>> >
>> > ChangeLog:
>> >
>> > [BZ #14719]
>> > * nss/getXXbyYY_r.c (INTERNAL (REENTRANT_NAME)): Set h_errno
>> > to NETDB_INTERNAL when NSS_STATUS_UNAVAIL.
>> > * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname3_r): Set
>> > h_errno to NETDB_INTERNAL when errno is EMFILE or ENFILE.
>> > (_nss_dns_gethostbyname4_r): Likewise.
>> > * sysdeps/posix/getaddrinfo.c (gaih_inet): Set result to
>> > EAI_SYSTEM if NSS_STATUS_UNAVAIL.
>>
>
Reviewed-by: Carlos O'Donell <carlos@systemhalted.org>
This looks good to me and is positive progress on handling
more errno values that indicate a system problem.
Please check this in immediately as we are perilously
close to the 2.17 freeze.
Cheers,
Carlos.