This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #14719] Return EAI_SYSTEM from getaddrinfo if we run out of fds


Ugh, I accidentally sent this personally to Dmitry.  Sorry.

Siddhesh

On Mon, Apr 08, 2013 at 12:02:38PM +0530, Siddhesh Poyarekar wrote:
> On Mon, Apr 08, 2013 at 09:58:26AM +0400, Dmitry V. Levin wrote:
> > 
> > But if sendto fails with EPERM, getaddrinfo returns EAI_SYSTEM with errno
> > set to EAGAIN.
> > 
> 
> OK, again I cannot reproduce this - I don't have the nss_myhostname
> module anymore, so that couldn't be the problem this time.  I get an
> ECONNREFUSED and not EAGAIN, which is the difference.  The other (more
> relevant I'd think) difference is sendmmsg vs sendto - are you running
> an older kernel?  Is there some additional configuration you're doing?
> 
> Siddhesh
> 
> $ strace -econnect,sendmmsg ./t
> connect(4, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
> connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
> connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
> connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
> connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.1.1")}, 16) = 0
> sendmmsg(3, 0x7fff6cb08090, 2, MSG_NOSIGNAL) = -1 EPERM (Operation not permitted)
> connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.1.1")}, 16) = 0
> sendmmsg(3, 0x7fff6cb08090, 2, MSG_NOSIGNAL) = -1 EPERM (Operation not permitted)
> connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.1.1")}, 16) = 0
> sendmmsg(3, 0x7fff6cb08090, 2, MSG_NOSIGNAL) = -1 EPERM (Operation not permitted)
> connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.1.1")}, 16) = 0
> sendmmsg(3, 0x7fff6cb08090, 2, MSG_NOSIGNAL) = -1 EPERM (Operation not permitted)
> Name or service not known: Connection refused
> +++ exited with 0 +++
> 
> $ ldd ./t
>         linux-vdso.so.1 =>  (0x00007fffcefd8000)
>         libc.so.6 => /tools/src/upstream/glibc/build/libc.so.6 (0x00007ff166258000)
>         /tools/src/upstream/glibc/build/elf/ld.so => /lib64/ld-linux-x86-64.so.2 (0x0000003d71c00000)
> 
> $ iptables -L
> ....
> Chain OUTPUT (policy ACCEPT)
> target     prot opt source               destination
> REJECT     all  --  anywhere             anywhere             reject-with icmp-net-unreachable
> ....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]