Your message dated Fri, 05 Jul 2019 23:07:09 +0000
with message-id <[email protected]>
and subject line Bug#907327: fixed in iputils 3:20190515-1
has caused the Debian Bug report #907327,
regarding iputils-ping: ping miscomputes standard deviation for small, 
consistent ping times
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
907327: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907327
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: iputils-ping
Version: 3:20180629-2
Severity: normal
Tags: patch

Dear Maintainer,

As documented, ping fails to properly compute deviation where ping times
are small. A patch follows. A simple example, using variables used there:

Suppose we do 10 pings, and 5 take 10us, 5 take 11us. tsum2 is 1105,
tsum is 105. We divide them, getting 110 and 10 respectively. tmdev is
then llsqrt(110 - 10 * 10) = llsqrt(10) = 3us. But max-min is only 1us!

The exact solution is sqrt(110.5-110.25) which is sqrt(0.25)=0.5. The
new code will (more) correctly compute llsqrt(0) = 0 as the answer. It
takes care not to do any horrendous integer overflows if there's a lot
of long pings (a few thousand >1s pings would overflow without this).
Patch is against 3:20101006-1.

-- 
David Buckley
--- old/ping_common.c   2018-08-26 15:43:03.891105137 +0100
+++ new/ping_common.c   2018-08-26 16:01:39.046836333 +0100
@@ -855,13 +855,21 @@
 
        if (nreceived && timing) {
+               long total = nreceived + nrepeats;
+               long tmavg = tsum / total;
+               long long tmvar;
                long tmdev;
 
-               tsum /= nreceived + nrepeats;
-               tsum2 /= nreceived + nrepeats;
-               tmdev = llsqrt(tsum2 - tsum * tsum);
+               if (nrepeats < INT_MAX) {
+                       // This slightly clumsy computation order is important 
to avoid
+                       // integer rounding errors for small ping times.
+                       tmvar = (tsum2 - tsum * tsum / total) / total;
+               } else {
+                       tmvar = tsum2 / total - tmavg * tmavg;
+               }
+               tmdev = llsqrt(tmvar);
 
                printf("rtt min/avg/max/mdev = 
%ld.%03ld/%lu.%03ld/%ld.%03ld/%ld.%03ld ms",
                       (long)tmin/1000, (long)tmin%1000,
-                      (unsigned long)(tsum/1000), (long)(tsum%1000),
+                      (unsigned long)(tmavg/1000), (long)(tmavg%1000),
                       (long)tmax/1000, (long)tmax%1000,
                       (long)tmdev/1000, (long)tmdev%1000

--- End Message ---
--- Begin Message ---
Source: iputils
Source-Version: 3:20190515-1

We believe that the bug you reported is fixed in the latest version of
iputils, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Noah Meyerhans <[email protected]> (supplier of updated iputils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 05 Jul 2019 15:49:21 -0700
Source: iputils
Binary: iputils-arping iputils-arping-dbgsym iputils-clockdiff 
iputils-clockdiff-dbgsym iputils-ping iputils-ping-dbgsym iputils-tracepath 
iputils-tracepath-dbgsym
Architecture: source amd64
Version: 3:20190515-1
Distribution: sid
Urgency: medium
Maintainer: Noah Meyerhans <[email protected]>
Changed-By: Noah Meyerhans <[email protected]>
Description:
 iputils-arping - Tool to send ICMP echo requests to an ARP address
 iputils-clockdiff - Measure the time difference between networked computers
 iputils-ping - Tools to test the reachability of network hosts
 iputils-tracepath - Tools to trace the network path to a remote host
Closes: 648033 780721 869202 878100 907327 928334
Changes:
 iputils (3:20190515-1) sid; urgency=medium
 .
   * New upstream snapshot (Closes: #907327, #869202, #869202)
   * Refresh and modernize debian/rules using dh (Closes: #648033, #928334)
   * Set Multi-Arch: foreign on all binary packages (Closes: #878100)
   * Raise libcap2-bin from Recommends to Depends (Closes: #780721)
   * Update to standards version 4.3.0
Checksums-Sha1:
 3a4915758ffbc8be71c8d2a68217e4b56bd44d74 2106 iputils_20190515-1.dsc
 5bbedb626e04148e0e026e80f5e2e4302831eb56 386699 iputils_20190515.orig.tar.bz2
 519a26a64bd3244187c9604c1b69b821b838a823 9728 iputils_20190515-1.debian.tar.xz
 6547bd251f595238bbcabb64fa72911248f4c260 28000 
iputils-arping-dbgsym_20190515-1_amd64.deb
 048b1363b58ca23b8eddebda70ac73466dc42a87 20196 
iputils-arping_20190515-1_amd64.deb
 143735859e537d60dc9c43a264c6b80f85f65765 16224 
iputils-clockdiff-dbgsym_20190515-1_amd64.deb
 75acf273fb3a736f017b77056fa74d8a7b6a03fe 16756 
iputils-clockdiff_20190515-1_amd64.deb
 59dca285bdc4979b3362dd78fe48bb56b50f6a1c 90924 
iputils-ping-dbgsym_20190515-1_amd64.deb
 674f788e25f2c007e148570bb0259a8241408e32 44292 
iputils-ping_20190515-1_amd64.deb
 4f55934c30f92bd36200c7f97b673c2185fbd6b4 37144 
iputils-tracepath-dbgsym_20190515-1_amd64.deb
 4b32011be89cde2d867212596cbb15cb51139bfa 24304 
iputils-tracepath_20190515-1_amd64.deb
 dc094fb0b0881759a2da000a5cc7d641131250f8 8115 
iputils_20190515-1_amd64.buildinfo
Checksums-Sha256:
 3adc2e6d092ecddbcde32d3c2811bd8eb4df9c7b3cb2684e027c625b80ee5293 2106 
iputils_20190515-1.dsc
 79d26fa301f1dc899d7876f4cc791bea04bb650d09e79b4efcf114d52de15f10 386699 
iputils_20190515.orig.tar.bz2
 c6329faa342b7b78a6963cf130031f2e6e2fdc1b685a3724a51fd37134498b6a 9728 
iputils_20190515-1.debian.tar.xz
 78ef862f6bfd0004a22410d9ace306a4ee9d871390403fc3b25649d18b8f8524 28000 
iputils-arping-dbgsym_20190515-1_amd64.deb
 54f24893acbade96f5f74f6c198845ed22f30bd9ffb54c6544f7aeca6d6e87ba 20196 
iputils-arping_20190515-1_amd64.deb
 aab67907e92fd91bc8ddc2ddc8bd2a6d59882aa13a5e1423ab1532d426f6883c 16224 
iputils-clockdiff-dbgsym_20190515-1_amd64.deb
 7053ed971a8aa6ed8e5f3dde401c1c40173a318be0426600b2a515f3d2f83c76 16756 
iputils-clockdiff_20190515-1_amd64.deb
 48d9921f13c48fbe91212f816b5f5c1130894160a7169d11d26358ff4e9d678f 90924 
iputils-ping-dbgsym_20190515-1_amd64.deb
 e25e09d0f4afab84260cc68166f6dcd0e7312d5435187d13dd3df1cad3be2cd4 44292 
iputils-ping_20190515-1_amd64.deb
 e5ec35c747f8cd87201c807a072bef84646e0c9c96f2d42101ed2c169b729d23 37144 
iputils-tracepath-dbgsym_20190515-1_amd64.deb
 cafb54b9a2bd7f85194cce6674347912389608dfe45059fcc2e8c1d563d2c3b4 24304 
iputils-tracepath_20190515-1_amd64.deb
 0892e13f149b20a9471e7337b7888f41bded233f586fc70a0b8465ebd3a6fa6d 8115 
iputils_20190515-1_amd64.buildinfo
Files:
 f8e5499e60150a2106dccb7ea0640dd1 2106 net optional iputils_20190515-1.dsc
 e90c8f1ce6380d4ad8b3949381a0650f 386699 net optional 
iputils_20190515.orig.tar.bz2
 7e59f7b4ac5449e87e5e5cb3d86f2d20 9728 net optional 
iputils_20190515-1.debian.tar.xz
 aeb3f568a2f23cb35780eafdf50ba618 28000 debug optional 
iputils-arping-dbgsym_20190515-1_amd64.deb
 7a052af81b2bf6c3a3f8670491882fba 20196 net optional 
iputils-arping_20190515-1_amd64.deb
 5de925580e15a1e736f3009aebffeb32 16224 debug optional 
iputils-clockdiff-dbgsym_20190515-1_amd64.deb
 439cbdb765ffe5c198201dba76cdea42 16756 net optional 
iputils-clockdiff_20190515-1_amd64.deb
 5f494542f7d9282f21acfa4d766e127d 90924 debug optional 
iputils-ping-dbgsym_20190515-1_amd64.deb
 c53de24ac3a68fe9b120fd9c65db4e2c 44292 net important 
iputils-ping_20190515-1_amd64.deb
 3bde1d6fd10d68498a9f8e8c06a9a57f 37144 debug optional 
iputils-tracepath-dbgsym_20190515-1_amd64.deb
 99537bb7a3a0152737c7cead6dcba11c 24304 net optional 
iputils-tracepath_20190515-1_amd64.deb
 fe8b41f0a89d9cf74132aee1f6ad66ee 8115 net optional 
iputils_20190515-1_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJFBAEBCAAvFiEE65xaF5r2LDCTz+zyV68+Bn2yWDMFAl0f1MoRHG5vYWhtQGRl
Ymlhbi5vcmcACgkQV68+Bn2yWDO90RAAkCEOD/QUmjJi4pa3HM+xX08sBCAJywCK
lFeOXtC1m99B2HKYRvFS6ZMKenOBP/7ki6pKADfUjt9JCUQhXuodheaNSGNUtr+O
tyccw/VMnc3P/oE7snLeVojQyAaha7pyyJ04qG2ftYxQOw+bfVjm/3RmCvOD6pqC
ua9/2kvlN2qSyPFD6Y8+QFKpUHIZ3m7yM0bro6DTKzuoxkBdI2nO5TYxYuRa+96D
E9A7oroWQ2lOkfeI0YLMMNroNAlYjW9GDOLXWuWklzo26L6t8BmyzeyNiSrUAQOL
jGaUhMimdbut+/e8l4zpxgGCY9k2ZQ+CMvjuq+FEVlt6D5MUFGHOVZcvDwB/DdTb
DoD+RDwZX4H2xWAAj6aWogbuMIouDS7Sfoyjh4MO23MGsN2tG4VkF28sNSTuieCa
U2gY9FDpkfbjIh28XFSz3T5uCikM7VAcR4KI0EDlyFsSZ8cJbYbMc60oSOXSqRzw
QQdLMCj1rT2hT9XuvIrWJE3v4uFPqzMP6cCJD1EDkG//3zzQtlUlsxgKW2tYMEBm
4jFb+0KZIMD5f9+wtY74rfN8CfJ8Rtn0W+DNqZrryAHUtBZqkiEYMfg3KmWrfddg
kf+xFgc6vZokEaWWRRJY50ziLoCJILo9TNCvrbKvyyzikUipFUc9A1fE6ihw8bBl
e9iLG8ZuoSk=
=wIBs
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to