Subject: kern/31007: Timekeeping completely broken in NetBSD-current
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Matthias Scheler <tron@colwyn.zhadum.de>
List: netbsd-bugs
Date: 08/17/2005 17:45:00
>Number:         31007
>Category:       kern
>Synopsis:       Timekeeping completely broken in NetBSD-current
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 17 17:45:00 +0000 2005
>Originator:     Matthias Scheler
>Release:        NetBSD 3.99.7 2005-08-17 sources
>Organization:
Matthias Scheler                                  http://scheler.de/~matthias/
>Environment:
System: NetBSD lyssa.zhadum.de 3.99.7 NetBSD 3.99.7 (LYSSA) #0: Tue Aug 16 09:00:39 BST 2005 tron@lyssa.zhadum.de:/src/sys/compile/LYSSA i386
Architecture: i386
Machine: i386
>Description:
A kernel build from today's NetBSD-current sources has turned my machine
into a time traveling device:

tron@lyssa:~>date
Wed Aug 17 18:24:50 BST 2005
tron@lyssa:~>date
Wed Aug 17 18:24:52 BST 2005
tron@lyssa:~>date
Wed Aug 17 18:24:54 BST 2005
tron@lyssa:~>date
Wed Aug 17 18:24:51 BST 2005

Two answer the usual question:
1.) I'm *not* running an SMP kernel.
2.) Disabling "ntpd" did not fix the problem.
3.) I'm using a P4 which supports TSC:

cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel Pentium 4 (686-class), 2394.13 MHz, id 0xf29
cpu0: features bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features bfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
cpu0: features bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
cpu0: features2 4400<CID,xTPR>
cpu0: "Intel(R) Pentium(R) 4 CPU 2.40GHz"
cpu0: I-cache 12K uOp cache 8-way, D-cache 8 KB 64B/line 4-way
cpu0: L2 cache 512 KB 64B/line 8-way
cpu0: ITLB 4K/4M: 64 entries
cpu0: DTLB 4K/4M: 64 entries
cpu0: using thermal monitor 1
cpu0: calibrating local timer
cpu0: apic clock running at 199 MHz
cpu0: 16 page colors

The same machine works fine with a kernel built from yesterday's sources.

>How-To-Repeat:
date
<wait a second>
date
<wait a second>
date
<wait a second>
date

>Fix:
None provided.