Bug#650478: iputils-ping: ping very slow on some non-numeric destinations due to timeout on avahi-daemon socket
November 29th, 2011 - 10:00 pm ET by Vincent Lefevre | Report spam
Package: iputils-ping
Version: 3:20101006-1+b1
Severity: normal
ping is very slow on some destinations (not of the form of an IP address)
due to a timeout on the avahi-daemon socket. I can reproduce the same
problem on another Debian/unstable machine. This seems to be a regression
as I have no such problem on a Debian/stable machine.
For instance, I started the following two commands at the same time and
stopped them at the same time:
xvii:~> ping 78.255.240.192
PING 78.255.240.192 (78.255.240.192) 56(84) bytes of data.
64 bytes from 78.255.240.192: icmp_req=1 ttl#8 time.4 ms
64 bytes from 78.255.240.192: icmp_req=2 ttl#8 time.7 ms
64 bytes from 78.255.240.192: icmp_req=3 ttl#8 time.5 ms
64 bytes from 78.255.240.192: icmp_req=4 ttl#8 time.2 ms
64 bytes from 78.255.240.192: icmp_req=5 ttl#8 time.3 ms
64 bytes from 78.255.240.192: icmp_req=6 ttl#8 time.6 ms
64 bytes from 78.255.240.192: icmp_req=7 ttl#8 time.1 ms
64 bytes from 78.255.240.192: icmp_req=8 ttl#8 time.1 ms
64 bytes from 78.255.240.192: icmp_req=9 ttl#8 time.1 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.6 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.5 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time .9 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.7 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.0 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.5 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.1 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.3 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.9 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.5 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.2 ms
64 bytes from 78.255.240.192: icmp_req! ttl#8 time.1 ms
64 bytes from 78.255.240.192: icmp_req" ttl#8 time.5 ms
64 bytes from 78.255.240.192: icmp_req# ttl#8 time9 ms
^C
78.255.240.192 ping statistics
23 packets transmitted, 23 received, 0% packet loss, time 22015ms
rtt min/avg/max/mdev = 85.909/90.259/129.360/8.487 ms
xvii:~> ping bel69-4k-1-lo10.nro.proxad.net
PING bel69-4k-1-lo10.nro.proxad.net (78.255.240.192) 56(84) bytes of data.
64 bytes from 78.255.240.192: icmp_req=1 ttl#8 time .7 ms
64 bytes from 78.255.240.192: icmp_req=2 ttl#8 time.1 ms
64 bytes from 78.255.240.192: icmp_req=3 ttl#8 time.0 ms
64 bytes from 78.255.240.192: icmp_req=4 ttl#8 time.0 ms
^C64 bytes from 78.255.240.192: icmp_req=5 ttl#8 time.3 ms
bel69-4k-1-lo10.nro.proxad.net ping statistics
5 packets transmitted, 5 received, 0% packet loss, time 20373ms
rtt min/avg/max/mdev = 85.791/91.087/96.160/4.074 ms
As you can see, the second command could send much fewer packets,
though the destination is the same machine. A "strace -r" (run as
root) shows the problem:
[...]
0.000129 socket(PF_FILE, SOCK_STREAM, 0) = 5
0.000118 fcntl(5, F_GETFD) = 0
0.000108 fcntl(5, F_SETFD, FD_CLOEXEC) = 0
0.000109 connect(5, {sa_family¯_FILE, path="/var/run/avahi-daemon/socket"}, 110) = 0
0.000254 fcntl(5, F_GETFL) = 0x2 (flags O_RDWR)
0.000112 fstat(5, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
0.000152 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0cf908f000
0.000117 lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
0.000135 write(5, "RESOLVE-ADDRESS 78.255.240.192", 31) = 31
0.000286 read(5, "-15 Timeout reached", 4096) = 20
5.004915 close(5) = 0
[...]
Note: the -n option avoids the problem. But "host 78.255.240.192"
immediately outputs:
Host 192.240.255.78.in-addr.arpa. not found: 3(NXDOMAIN)
So, I don't see why reverse DNS resolving yields a timeout with ping.
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.1.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages iputils-ping depends on:
ii libc6 2.13-21
ii libssl1.0.0 1.0.0e-2.1
iputils-ping recommends no packages.
iputils-ping suggests no packages.
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Version: 3:20101006-1+b1
Severity: normal
ping is very slow on some destinations (not of the form of an IP address)
due to a timeout on the avahi-daemon socket. I can reproduce the same
problem on another Debian/unstable machine. This seems to be a regression
as I have no such problem on a Debian/stable machine.
For instance, I started the following two commands at the same time and
stopped them at the same time:
xvii:~> ping 78.255.240.192
PING 78.255.240.192 (78.255.240.192) 56(84) bytes of data.
64 bytes from 78.255.240.192: icmp_req=1 ttl#8 time.4 ms
64 bytes from 78.255.240.192: icmp_req=2 ttl#8 time.7 ms
64 bytes from 78.255.240.192: icmp_req=3 ttl#8 time.5 ms
64 bytes from 78.255.240.192: icmp_req=4 ttl#8 time.2 ms
64 bytes from 78.255.240.192: icmp_req=5 ttl#8 time.3 ms
64 bytes from 78.255.240.192: icmp_req=6 ttl#8 time.6 ms
64 bytes from 78.255.240.192: icmp_req=7 ttl#8 time.1 ms
64 bytes from 78.255.240.192: icmp_req=8 ttl#8 time.1 ms
64 bytes from 78.255.240.192: icmp_req=9 ttl#8 time.1 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.6 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.5 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time .9 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.7 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.0 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.5 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.1 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.3 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.9 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.5 ms
64 bytes from 78.255.240.192: icmp_req ttl#8 time.2 ms
64 bytes from 78.255.240.192: icmp_req! ttl#8 time.1 ms
64 bytes from 78.255.240.192: icmp_req" ttl#8 time.5 ms
64 bytes from 78.255.240.192: icmp_req# ttl#8 time9 ms
^C
78.255.240.192 ping statistics
23 packets transmitted, 23 received, 0% packet loss, time 22015ms
rtt min/avg/max/mdev = 85.909/90.259/129.360/8.487 ms
xvii:~> ping bel69-4k-1-lo10.nro.proxad.net
PING bel69-4k-1-lo10.nro.proxad.net (78.255.240.192) 56(84) bytes of data.
64 bytes from 78.255.240.192: icmp_req=1 ttl#8 time .7 ms
64 bytes from 78.255.240.192: icmp_req=2 ttl#8 time.1 ms
64 bytes from 78.255.240.192: icmp_req=3 ttl#8 time.0 ms
64 bytes from 78.255.240.192: icmp_req=4 ttl#8 time.0 ms
^C64 bytes from 78.255.240.192: icmp_req=5 ttl#8 time.3 ms
bel69-4k-1-lo10.nro.proxad.net ping statistics
5 packets transmitted, 5 received, 0% packet loss, time 20373ms
rtt min/avg/max/mdev = 85.791/91.087/96.160/4.074 ms
As you can see, the second command could send much fewer packets,
though the destination is the same machine. A "strace -r" (run as
root) shows the problem:
[...]
0.000129 socket(PF_FILE, SOCK_STREAM, 0) = 5
0.000118 fcntl(5, F_GETFD) = 0
0.000108 fcntl(5, F_SETFD, FD_CLOEXEC) = 0
0.000109 connect(5, {sa_family¯_FILE, path="/var/run/avahi-daemon/socket"}, 110) = 0
0.000254 fcntl(5, F_GETFL) = 0x2 (flags O_RDWR)
0.000112 fstat(5, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
0.000152 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0cf908f000
0.000117 lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
0.000135 write(5, "RESOLVE-ADDRESS 78.255.240.192", 31) = 31
0.000286 read(5, "-15 Timeout reached", 4096) = 20
5.004915 close(5) = 0
[...]
Note: the -n option avoids the problem. But "host 78.255.240.192"
immediately outputs:
Host 192.240.255.78.in-addr.arpa. not found: 3(NXDOMAIN)
So, I don't see why reverse DNS resolving yields a timeout with ping.
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.1.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages iputils-ping depends on:
ii libc6 2.13-21
ii libssl1.0.0 1.0.0e-2.1
iputils-ping recommends no packages.
iputils-ping suggests no packages.
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Similar topics
- Bug#699828: gnome-nettool: Ping not compatible with iputils-ping
- Bug#683324: iputils-ping: typo in ping6.c
Make your own search :
Tags
Create a new topic
Follow the discussion
1 reply
Make a reply
May 25th, 2013 - 4:17 AM ET
Join now


Replies