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

Bug#839627: linux-image-4.7.0-1-amd64: kvm-clock provides unadjusted time



Package: src:linux
Version: 4.7.5-1
Severity: normal

Dear Maintainer,

When booting the host with linux 3.16, it looks like kvm-clock provides guests with time as adjusted by ntpd.
This looks like this (note the 'frequency' variable [0]):

host ----:

# ntpq -crv
associd=0 status=0415 leap_none, sync_uhf_radio, 1 event, clock_sync,
version="ntpd 4.2.8p8@1.3265-o Tue Jun  7 20:34:16 UTC 2016 (1)",
processor="x86_64", system="Linux/3.16.0-4-amd64", leap=00, stratum=1,
precision=-23, rootdelay=0.000, rootdisp=1.195, refid=GPS,
reftime=db9b8865.6537d5fd  Sun, Oct  2 2016  9:21:41.395,
clock=db9b8873.2c57b9e4  Sun, Oct  2 2016  9:21:55.173, peer=13173, tc=4,
mintc=3, offset=-0.003014, frequency=-8.983, sys_jitter=0.007532,
clk_jitter=0.010, clk_wander=0.002

guest ----:

# ntpq -crv
associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
version="ntpd 4.2.6p5@1.2349-o Fri Jul 22 17:30:51 UTC 2016 (1)",
processor="x86_64", system="Linux/3.16.0-4-amd64", leap=00, stratum=2,
precision=-22, rootdelay=0.415, rootdisp=18.143, refid=192.168.9.10,
reftime=db9b8686.bccb12d6  Sun, Oct  2 2016  9:13:42.737,
clock=db9b88a1.6495514c  Sun, Oct  2 2016  9:22:41.392, peer=11095,
tc=10, mintc=3, offset=0.280, frequency=-0.094, sys_jitter=0.386,
clk_jitter=1.265, clk_wander=0.251

Note the drift measured on the host as ~-9, and on the guest ~0.

When booting with linux 4.6/4.7,

host ----:

# ntpq -crv
associd=0 status=0415 leap_none, sync_uhf_radio, 1 event, clock_sync,
version="ntpd 4.2.8p8@1.3265-o Tue Jun  7 20:34:16 UTC 2016 (1)",
processor="x86_64", system="Linux/4.7.0-1-amd64", leap=00, stratum=1,
precision=-23, rootdelay=0.000, rootdisp=1.210, refid=GPS,
reftime=db9c93cd.12585193  Mon, Oct  3 2016  4:22:37.071,
clock=db9c93db.66370833  Mon, Oct  3 2016  4:22:51.399, peer=34903, tc=4,
mintc=3, offset=0.003722, frequency=-9.350, sys_jitter=0.010023,
clk_jitter=0.013, clk_wander=0.003

guest ----:

# ntpq -crv
associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
version="ntpd 4.2.6p5@1.2349-o Fri Jul 22 17:30:51 UTC 2016 (1)",
processor="x86_64", system="Linux/3.16.0-4-amd64", leap=00, stratum=2,
precision=-23, rootdelay=0.310, rootdisp=21.999, refid=192.168.9.30,
reftime=db9c92a7.85b541f5  Mon, Oct  3 2016  4:17:43.522,
clock=db9c93fd.0f4d900a  Mon, Oct  3 2016  4:23:25.059, peer=30713,
tc=10, mintc=3, offset=0.023, frequency=-9.399, sys_jitter=0.285,
clk_jitter=0.997, clk_wander=0.192

ntpd measures on the guest the same drift as on the host.
This gives me the impression that on the later kernels, kvm-clock provides a raw, unadjusted time.


On this particular setup I have the host running a stratum-1 NTP server, hooked up to a GPS device.
The guests sync against it and other servers.
However I observe the same behavior on several other servers running in various locations.
On those running linux 3.16, the guests' measured drift hovers around zero, and on those running 4.6 or 4.7, the drift is around the same as on the host.
On all those other hosts and guests, ntpd runs with the unmodified default config file, picking up internet ntp servers from the pool.


[0] http://doc.ntp.org/current-stable/ntpq.html#system


-- Package-specific info:
** Version:
Linux version 4.7.0-1-amd64 (debian-kernel@lists.debian.org) (gcc version 5.4.1 20160904 (Debian 5.4.1-2) ) #1 SMP Debian 4.7.5-1 (2016-09-26)

** Command line:
BOOT_IMAGE=/boot/vmlinuz-4.7.0-1-amd64 root=/dev/mapper/rvg0-vmhost0_rootfs ro quiet

** Not tainted


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages linux-image-4.7.0-1-amd64 depends on:
ii  initramfs-tools [linux-initramfs-tool]  0.125
ii  kmod                                    22-1.1
ii  linux-base                              4.5

Versions of packages linux-image-4.7.0-1-amd64 recommends:
ii  firmware-linux-free  3.4
ii  irqbalance           1.1.0-2

Versions of packages linux-image-4.7.0-1-amd64 suggests:
pn  debian-kernel-handbook  <none>
ii  grub-pc                 2.02~beta2-36
pn  linux-doc-4.7           <none>

Versions of packages linux-image-4.7.0-1-amd64 is related to:
ii  firmware-amd-graphics     20160824-1
pn  firmware-atheros          <none>
pn  firmware-bnx2             <none>
pn  firmware-bnx2x            <none>
pn  firmware-brcm80211        <none>
pn  firmware-cavium           <none>
pn  firmware-intel-sound      <none>
pn  firmware-intelwimax       <none>
pn  firmware-ipw2x00          <none>
pn  firmware-ivtv             <none>
pn  firmware-iwlwifi          <none>
pn  firmware-libertas         <none>
ii  firmware-linux-nonfree    20160824-1
ii  firmware-misc-nonfree     20160824-1
pn  firmware-myricom          <none>
pn  firmware-netxen           <none>
pn  firmware-qlogic           <none>
ii  firmware-realtek          20160824-1
pn  firmware-samsung          <none>
pn  firmware-siano            <none>
pn  firmware-ti-connectivity  <none>
pn  xen-hypervisor            <none>

-- no debconf information


Reply to: