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

Bug#519774: libc6: causes many programs not to be able to resolve dns addresses



Hello,
  it seems that DNS resolver is grossly confused, and sends
two DNS requests on same socket back to back (strace below is
from 'lynx http://www.jeep.com').  In first one DNS server
responded only to second packet sent by resolver, and resolve
failed (after that mdns was tried, and eventually lynx reported
error that www.jeep.com does not exist).  In second one DNS
server responded only to first packet (in my tests I've never
seen DNS server responding to both requests), and although DNS
resolver still uselessly waited for 5 seconds, slowing web browsing
to being almost unusable, after that 5 seconds DNS resolver
declared success, and moved on.

My /etc/resolv.conf is:

gwy:~# cat /etc/resolv.conf
domain hsd1.ca.comcast.net.
search hsd1.ca.comcast.net.
nameserver 68.87.76.178
nameserver 68.87.78.130
nameserver 68.87.69.146
gwy:~#

It seems to be caused by __libc_res_nquery always sending both
T_A and T_AAAA request when T_UNSPEC query is being sent, and
getting confused when only T_AAAA reply arrives.

2008-05-10  Ulrich Drepper  <drepper@redhat.com>
...
        * resolv/res_query.c (__libc_res_nquery): Take two additional
          parameters for second answer buffer.  Handle
          type=T_UNSPEC to mean look up IPv4 and IPv6.
          Change all callers.

Sending only one reply seems to be property of Comcast's servers.
When I use DNS server 147.32.1.20 (which runs bind), I'm getting two
responses.  I'll try talking to Comcast support, but I doubt they'll
have any idea what I'm talking about.
							Petr


16469 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
16469 connect(3, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("68.87.76.178")}, 28) = 0
16469 fcntl64(3, F_GETFL)               = 0x2 (flags O_RDWR)
16469 fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
16469 gettimeofday({1237095720, 803573}, NULL) = 0
16469 poll([{fd=3, events=POLLOUT}], 1, 0) = 1 ([{fd=3,
revents=POLLOUT}])
16469 send(3, "\30\223\1\0\0\1\0\0\0\0\0\0\3www\4jeep\3com\0\0\1\0\1",
30, MSG_NOSIGNAL) = 30
16469 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 5000) = 1 ([{fd=3,
revents=POLLOUT}])
16469 send(3, "\3503\1\0\0\1\0\0\0\0\0\0\3www\4jeep\3com\0\0\34\0\1",
30, MSG_NOSIGNAL) = 30
16469 gettimeofday({1237095720, 803994}, NULL) = 0
16469 poll([{fd=3, events=POLLIN}], 1, 4999) = 1 ([{fd=3,
revents=POLLIN}])
16469 ioctl(3, FIONREAD, [159])         = 0
16469 recvfrom(3,
"\3503\201\200\0\1\0\2\0\1\0\0\3www\4jeep\3com\0\0\34\0\1\300\f"...,
2048, 0, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("68.87.76.178")}, [16]) = 159
16469 gettimeofday({1237095720, 831053}, NULL) = 0
16469 poll([{fd=3, events=POLLIN}], 1, 4972) = 0 (Timeout)
16469 close(3)                          = 0

17497 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
17497 connect(3, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("68.87.76.178")}, 28) = 0
17497 fcntl64(3, F_GETFL)               = 0x2 (flags O_RDWR)
17497 fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
17497 gettimeofday({1237096105, 330041}, NULL) = 0
17497 poll([{fd=3, events=POLLOUT}], 1, 0) = 1 ([{fd=3,
revents=POLLOUT}])
17497 send(3, "1\311\1\0\0\1\0\0\0\0\0\0\3www\4jeep\3com\0\0\1\0\1", 30,
MSG_NOSIGNAL) = 30
17497 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 5000) = 1 ([{fd=3,
revents=POLLOUT}])
17497 send(3, "\367\241\1\0\0\1\0\0\0\0\0\0\3www\4jeep\3com\0\0\34\0\1",
30, MSG_NOSIGNAL) = 30
17497 gettimeofday({1237096105, 330529}, NULL) = 0
17497 poll([{fd=3, events=POLLIN}], 1, 4999) = 1 ([{fd=3,
revents=POLLIN}])
17497 ioctl(3, FIONREAD, [117])         = 0
17497 recvfrom(3,
"1\311\201\200\0\1\0\3\0\0\0\0\3www\4jeep\3com\0\0\1\0\1\300\f"...,
2048, 0, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("68.87.76.178")}, [16]) = 117
17497 gettimeofday({1237096105, 350551}, NULL) = 0
17497 poll([{fd=3, events=POLLIN}], 1, 4979) = 0 (Timeout)
17497 close(3)                          = 0




Reply to: