[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#633793: Acknowledgement (libc6: [sparc] getaddrinfo() times out, succeeds on retry)



I should add a few things.

This system (and our network) is running IPv4 and IPv6.  The DNS server
is IPv4, but can resolve IPv6 AAAA records.  Disabling IPv6 on this
system ( |net.ipv6.conf.all.disable_ipv6=1 |in sysctl.conf) does not
effect the timeout behavior of getaddrinfo().

The strace output I gave shows two timeouts after 5 seconds and then a
failure.  This corresponds with the default settings for the "timeout"
and "attempts" options in /etc/resolv.conf.  However, it does not always
timeout on both attempts.  Sometimes it does not timeout at all and
sometimes it works after one timeout, and it seems to be random chance
that it will timeout on each attempt.  For example here is a strace
where it took just one timeout before succeeding:

     0.000307 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3
     0.000217 connect(3, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("130.127.255.250")}, 16) = 0
     0.000260 gettimeofday({1310654831, 778819}, NULL) = 0
     0.000182 poll([{fd=3, events=POLLOUT}], 1, 0) = 1 ([{fd=3,
revents=POLLOUT}])
     0.000239 send(3,
":\271\1\0\0\1\0\0\0\0\0\0\3www\6google\3com\0\0\1\0\1", 32,
MSG_NOSIGNAL) = 32
     0.000282 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 5000) = 1
([{fd=3, revents=POLLOUT}])
     0.000226 send(3,
"\230\342\1\0\0\1\0\0\0\0\0\0\3www\6google\3com\0\0\34\0\1", 32,
MSG_NOSIGNAL) = 32
     0.000272 gettimeofday({1310654831, 780018}, NULL) = 0
     0.000182 poll([{fd=3, events=POLLIN}], 1, 4998) = 1 ([{fd=3,
revents=POLLIN}])
     0.000952 ioctl(3, 0x4004667f, 0xffeb1c80) = 0
     0.000348 recvfrom(3,
":\271\201\200\0\1\0\7\0\4\0\4\3www\6google\3com\0\0\1\0\1"..., 2048, 0,
{sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("130.127.255.250")}, [16]) = 284
     0.000533 gettimeofday({1310654831, 782037}, NULL) = 0
     0.000203 poll([{fd=3, events=POLLIN}], 1, 4996) = 0 (Timeout)
     5.001591 gettimeofday({1310654836, 783898}, NULL) = 0
     0.000320 poll([{fd=3, events=POLLOUT}], 1, 0) = 1 ([{fd=3,
revents=POLLOUT}])
     0.000329 send(3,
":\271\1\0\0\1\0\0\0\0\0\0\3www\6google\3com\0\0\1\0\1", 32,
MSG_NOSIGNAL) = 32
     0.000297 poll([{fd=3, events=POLLIN}], 1, 5000) = 1 ([{fd=3,
revents=POLLIN}])
     0.000725 ioctl(3, 0x4004667f, 0xffeb1c80) = 0
     0.000196 recvfrom(3,
":\271\201\200\0\1\0\4\0\4\0\4\3www\6google\3com\0\0\1\0\1"..., 2048, 0,
{sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("130.127.255.250")}, [16]) = 236
     0.000433 gettimeofday({1310654836, 786127}, NULL) = 0
     0.000168 poll([{fd=3, events=POLLOUT}], 1, 4997) = 1 ([{fd=3,
revents=POLLOUT}])
     0.000222 send(3,
"\230\342\1\0\0\1\0\0\0\0\0\0\3www\6google\3com\0\0\34\0\1", 32,
MSG_NOSIGNAL) = 32
     0.000265 gettimeofday({1310654836, 786783}, NULL) = 0
     0.000169 poll([{fd=3, events=POLLIN}], 1, 4997) = 1 ([{fd=3,
revents=POLLIN}])
     0.000856 ioctl(3, 0x4004667f, 0xffeb30d8) = 0
     0.000236 recvfrom(3,
"\230\342\201\200\0\1\0\1\0\1\0\0\3www\6google\3com\0\0\34\0\1"...,
1812, 0, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("130.127.255.250")}, [16]) = 102
     0.000515 close(3)                  = 0

Additionally, the mere fact that I invoke the command through strace
seems to increase the probability that it will not timeout.  When
running the command without strace, there is almost a 100% chance that
it will timeout (at least it seems like it based on the amount of time
it takes to complete).  When running the command through strace, it's
more like a 50% chance that it will timeout at least once.




Reply to: