Your message dated Sun, 23 Oct 2016 20:53:55 +0000
with message-id <[email protected]>
and subject line Bug#633082: fixed in adjtimex 1.29-8
has caused the Debian Bug report #633082,
regarding Bugs in adjtimex affect precision of calculated frequency error (PPM)
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.)
--
633082: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=633082
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: adjtimex
Version: 1.29-2.1
There are two (minor) problems that cause reduced precision when calculating
the frequency error of the system clock by comparing the system clock with an
external reference clock (NTP) and the CMOS clock (the first problem is more
important):
Problem 1) Integer arithmetics truncate the value of the frequency kernel
variable to full PPMs.
Source code fragments from adjtimex_1.29-2.1, file adjtimex.c:
92 int freq; /* "freq" system parameter */
...
1249 #define SHIFT (1<<16)
...
1980 hacks[i]->relative_rate =
1981 diff_ppm = 1.e6*(sys_time - cmos_time)/sys_time
1982 - 100*(hacks[i]->tick - tick_mid) - hacks[i]->freq/SHIFT;
...
2047 hacks[i]->sys_rate =
2048 diff_ppm = 1.e6*(sys_time - ref_time)/sys_time
2049 - 100*(hacks[i]->tick - tick_mid) - hacks[i]->freq/SHIFT;
SHIFT (=65536) and hacks[i]->freq are integer values; therefore,
hacks[i]->freq/SHIFT is computed using integer arithmetics, causing the
current frequency correction in the kernel to be truncated to full PPMs when
adding it to the frequency error calculated from clock comparisons.
Required correction: Convert SHIFT or hacks[i]->freq to double by casting,
e.g. replace hacks[i]->freq/SHIFT with ((double)hacks[i]->freq)/SHIFT.
Problem 2) In the code that compares the system clock with a timeserver, the
system clock is only used with a precision of seconds instead of (readily
available) microseconds.
Source code fragment from adjtimex_1.29-2.1, file adjtimex.c:
1459 ftime_sys = tv_sys.tv_sec;
However, in the branch with label /* no absolute time reference */ the full
precision is used:
1506 ftime_sys = tv_sys.tv_sec + tv_sys.tv_usec*.000001;
When comparing the NTP reference clock with the system clock in intervals of
15 minutes, the error might be as large as 1/900, or just below 0.1%, so this
effect is rather minor. As fetching the time offset from NTP by calling
ntpdate (or even polling the RTC!) also takes some time (which, if I am not
mistaken, is not taken into account currently), there are already other
sources that degrade precision. However, the fix is really trivial (copy line
1506 to line 1459), so I recommend to fix this, too.
--- End Message ---
--- Begin Message ---
Source: adjtimex
Source-Version: 1.29-8
We believe that the bug you reported is fixed in the latest version of
adjtimex, 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.
Roger Shimizu <[email protected]> (supplier of updated adjtimex 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: Sun, 23 Oct 2016 11:31:38 +0900
Source: adjtimex
Binary: adjtimex
Architecture: source
Version: 1.29-8
Distribution: unstable
Urgency: medium
Maintainer: Roger Shimizu <[email protected]>
Changed-By: Roger Shimizu <[email protected]>
Description:
adjtimex - kernel time variables configuration utility
Closes: 633082
Changes:
adjtimex (1.29-8) unstable; urgency=medium
.
* debian/patches:
- Improve precision. Thanks Christopher Alexander Tobias Schulze.
(Closes: #633082).
- Update patches to make compatible with "gbp pq" command.
* Upgrade to support debhelper 10
* debian/copyright:
- Update URL to make use of https instead of http, when possible
* debian/control:
- Add lsb-base as dependency to package shadowsocks-libev, since
the init script sources /lib/lsb/init-functions utility functions
- Bump policy version to 3.9.8 (no actual change required)
* debian/adjtimex.service:
- Add documentation line. Thanks to lintian.
* debian/rules:
- Add a few comments
- Remove hardening setting already enabled by default since compat=9
Checksums-Sha1:
1cb9efc64d7803d9fc009b110759824d8a2ad2db 1830 adjtimex_1.29-8.dsc
55ba812a5ea1c57b9bfc318c25a309e005fccc72 28400 adjtimex_1.29-8.debian.tar.xz
Checksums-Sha256:
4be64b6e6d50286b172b9d597c35ac06e0d8dd5a503839f9f8d3c0455ce8dd47 1830
adjtimex_1.29-8.dsc
a37b472155b98d211cda3c47a10692c01c02d22ccb92e1aa9e6eed33bbdad35b 28400
adjtimex_1.29-8.debian.tar.xz
Files:
1d8df32eaa1f71d2550acbf04f98d43a 1830 admin optional adjtimex_1.29-8.dsc
33c89477225b5c43a67161cd7f53698b 28400 admin optional
adjtimex_1.29-8.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJYDLVOAAoJEPNPCXROn13Z7zwP+wQ4s14oVtBZj0PqqLKesQ5T
duFfNGU1fOOVULoOaiiz8lIg7Lbv2AkMsNpmOaML+cdypp1FvbqHUVgv61ztxXOK
EWb/axp+OGWA9aZLEOUS646CthmP/ME1yT34vRklcqYR9NytMV5pAYJtyLppTN4z
L3Ezr0phdVTkmFLCG2BcVdnhf4FvTPA6yS0kGkvHPfguflO+05OFhX2DhRl95aXl
PZKb8b4ngm9eUOqq8u2jM5+W+gIF0laak/VJj8IY2hkAZFXImjXOlps9WFGAGuUk
jLINm8FnRS5n4aQC6v+rghKaVJwlqVH6ihi3/UAGFvx5A94KfIb2T5oig75+vKpE
jY5lHUHLxJI0wT/gUwSCPlrbDrDh6RN/3tA6vjBKRKhtD8xqZ1ltiHa3nqCVK6P2
Tl6k+nd8F3epIWgyreNlcG6VYYMz2urx5cdK0stX+qRzUznEMyTIWWtCB/nlBRoU
N0XXrFkNTpEb7Qpx9Qo3CK6qV2jQ0iN0063FFl+SJ56V/7kjr3vN2E+mtPYx99EC
7mpcK0/viQiYRs7lcvn0eFmWJUUrpK64gG/V5/VFOkv4MMplw8jSej32xq9rPJgh
ROLe2M3d19W53vALaWtpN1XTWTW/nhbPxhVX4cnKpzafgROOnI8zN5wxA/+88+GN
Bbaf64PwilVOd7dRgdRG
=T5TF
-----END PGP SIGNATURE-----
--- End Message ---