This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #14719] Return EAI_SYSTEM from getaddrinfo if we run out of fds
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 8 Apr 2013 10:57:13 +0530
- Subject: Re: [PATCH][BZ #14719] Return EAI_SYSTEM from getaddrinfo if we run out of fds
- References: <20121023171835 dot 09f1b085 at spoyarek> <20130325125824 dot GA11387 at altlinux dot org> <CAAHN_R1OWczQtSFVHK3DVdqBg4+qKivxMoN_6gjfxxGiyzYO8A at mail dot gmail dot com> <20130401171156 dot GB9522 at altlinux dot org> <CAAHN_R1yThAuKHrr4cePcmrVo_=vHLf9257OGFsE6v3Oc36s4Q at mail dot gmail dot com> <20130402134937 dot GB3211 at altlinux dot org> <20130408033614 dot GA20503 at altlinux dot org>
On Mon, Apr 08, 2013 at 07:36:14AM +0400, Dmitry V. Levin wrote:
> There is a slightly different case when it also shouldn't be EAI_SYSTEM:
>
> $ strace -econnect,sendto ./t
> ...
> connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.0.43.10")}, 16) = 0
> sendto(3, "\317I\1\0\0\1\0\0\0\0\0\0\7example\3net\0\0\1\0\1", 29, MSG_NOSIGNAL, NULL, 0) = -1 EPERM (Operation not permitted)
> ...
> System error: Resource temporarily unavailable
> +++ exited with 1 +++
>
> Such an environment could be constructed, e.g. by filtering outgoing
> packets using iptables (-j REJECT --reject-with icmp-net-unreachable).
>
Have you tried this with the patch I posted[1] last week? I get
EAI_NONAME with my patch.
Siddhesh
[1] http://sourceware.org/ml/libc-alpha/2013-04/msg00088.html