NetBSD-Bugs archive

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

port-amd64/53648: Serious clock drift when running inside KVM

>Number:         53648
>Category:       port-amd64
>Synopsis:       Serious clock drift when running inside KVM
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 03 17:55:01 +0000 2018
>Originator:     nia
>Release:        NetBSD 8.99.25
System: NetBSD 8.99.25 (GENERIC) #0: Sat Sep 22 05:24:22 UTC 2018 amd64
Architecture: x86_64
Machine: amd64

With ntpd running:

$ ntpdate -q
server, stratum 2, offset 891.005872, delay 0.03432
server, stratum 2, offset 891.000869, delay 0.03198
server, stratum 3, offset 891.001166, delay 0.03790
server, stratum 1, offset 891.001526, delay 0.04477
 3 Oct 15:11:20 ntpdate[18592]: step time server offset 891.001526 sec

This seems to happen with any timecounter source. Currently, I've got it
set to ACPI-Safe, as advised in this thread:

$ sysctl kern.timecounter.
kern.timecounter.choice = TSC(q=-100, f=2394744680 Hz) clockinterrupt(q=0, f=100 Hz) piixpm0(q=1000, f=3579545 Hz) hpet0(q=2000, f=100000000 Hz) ACPI-Safe(q=900, f=3579545 Hz) lapic(q=-100, f=1001659389 Hz) i8254(q=100, f=1193182 Hz) dummy(q=-1000000, f=1000000 Hz)
kern.timecounter.hardware = ACPI-Safe
kern.timecounter.timestepwarnings = 0

The default was hpet0, which clearly didn't work. Lots of
"WARNING: negative runtime; monotonic clock has gone backwards".

Similar issue: - I don't have noatime on
/var, only log.

Set up a Vultr VM. Install NetBSD-current. Use an encrypted /home and start NTP on boot.

Wait for clock drift after a day or so.

Home | Main Index | Thread Index | Old Index