From owner-freebsd-stable@FreeBSD.ORG Sat Nov 29 15:28:11 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A675716A4CE; Sat, 29 Nov 2003 15:28:11 -0800 (PST) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id B699543F85; Sat, 29 Nov 2003 15:28:03 -0800 (PST) (envelope-from don@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2657.72) id ; Sat, 29 Nov 2003 18:28:02 -0500 Message-ID: From: Don Bowman To: 'Kris Kennaway' , stable@FreeBSD.org Date: Sat, 29 Nov 2003 18:28:00 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C3B6D0.6DD9F800" cc: current@FreeBSD.org cc: phk@freeBSD.org Subject: RE: Corrected gettimeofday() test code X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2003 23:28:11 -0000 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C3B6D0.6DD9F800 Content-Type: text/plain; charset="iso-8859-1" From: Kris Kennaway [mailto:kris@obsecurity.org] > > I forwarded the reports of timecounter problems to phk, and he asked > that people who are seeing timecounter problems provide FULL details > of their system configuration, including: > > * dmesg > > * kernel configuration > > * compiler options > > * time-related system configuration (whether ntpd/timed/ntpdate is > running, and if so whether it's correcting for a seriously drifting > clock) > > * The kernel timecounter configuration, e.g. the > kern.timecounter.method and kern.timecounter.hardware sysctls, and > whether changing them has any effect. > > * The exact output of the corrected test program below (the original > would give spurious errors if it didn't run at least once a second, > which may have been confusing some people if their systems were > sufficiently loaded). > > * The system status when the problem is observed (i.e. does it only > occur under load; what else is running at the time) > For this config (below), kern.timecounter.method=0 reproduces the problem, kern.timecounter.method=1 does not. Output in 'error' case: 1070147643.248866 1070147651.028646 1070147643.248866 1070147651.028646 1070147656.287818 1070147664.067692 1070147656.287818 1070147664.067692 1070147659.326429 1070147667.106238 1070147659.326429 1070147667.106238 1070147668.370071 1070147676.149884 1070147668.370071 1070147676.149884 1070147681.433111 1070147689.212926 1070147681.433111 1070147689.212926 1070147683.418743 1070147691.198632 1070147683.418743 1070147691.198632 problem shows up within ~30s of starting the test program, and the messages will come out about once per 1-5s period after that, not regularly. kern.timecounter.hardware: TSC on this machine, i have others which are i8254 which do it too. hw.ncpu=1 compiler flags: COPTFLAGS= -O2 -pipe -malign-loops=4 -malign-jumps=4 -malign-functions=4 -mcpu=i686 -march=i686 -fno-gcse -g machine is running 4.7-RELEASE-p2. dmesg, kernel config attached. Intel-specific functions: Version 00000673: Type 0 - Original OEM Family 6 - Pentium Pro Model 7 - Pentium III/Pentium III Xeon - external L2 cache Stepping 3 Reserved 0 from cpuid. ntpd -p /var/run/ntpd.pid -b -g -A runs. Clock does not drift much, less than 2s/day. Clock is stepped when system boots. There is a chimer on our router which broadcasts ntp time every minute. ntpd is not observed to step clock. On the 8254 machine [a dual 0f27 xeon, 533 FSB with HTT enabled] 1070147645.119531 1070148340.497729 1070148339.-693880469 1070148340.497729 both systems were unloaded. This was with the corrected program you included. --don ------_=_NextPart_000_01C3B6D0.6DD9F800 Content-Type: application/octet-stream; name="dmesg.boot" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="dmesg.boot" Copyright (c) 1992-2002 The FreeBSD Project.=0A= Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, = 1994=0A= The Regents of the University of California. All rights reserved.=0A= FreeBSD 4.7-RELEASE-p2 #1: 20021212_13:58:28=0A= =0A= Timecounter "i8254" frequency 1193182 Hz=0A= Timecounter "TSC" frequency 551252183 Hz=0A= CPU: Pentium III/Pentium III Xeon/Celeron (551.25-MHz 686-class CPU)=0A= Origin =3D "GenuineIntel" Id =3D 0x673 Stepping =3D 3=0A= = Features=3D0x383f9ff=0A= real memory =3D 536854528 (524272K bytes)=0A= avail memory =3D 518111232 (505968K bytes)=0A= Preloaded elf kernel "kernel" at 0xc042a000.=0A= Preloaded elf module "if_xl.ko" at 0xc042a09c.=0A= Preloaded elf module "miibus.ko" at 0xc042a13c.=0A= netsmb_dev: loaded=0A= Pentium Pro MTRR support enabled=0A= md0: Malloc disk=0A= Using $PIR table, 8 entries at 0xc00f0e70=0A= npx0: on motherboard=0A= npx0: INT 16 interface=0A= pcib0: on motherboard=0A= pci0: on pcib0=0A= pcib1: at device 1.0 on = pci0=0A= pci1: on pcib1=0A= pci1: at 0.0 irq 11=0A= isab0: at device 4.0 on pci0=0A= isa0: on isab0=0A= atapci0: port 0xb800-0xb80f at device = 4.1 on pci0=0A= ata0: at 0x1f0 irq 14 on atapci0=0A= ata1: at 0x170 irq 15 on atapci0=0A= uhci0: port 0xb400-0xb41f at = device 4.2 on pci0=0A= pci_cfgintr_virgin: using routable interrupt 3=0A= pci_cfgintr: 0:4 INTD routed to irq 3=0A= usb0: on uhci0=0A= usb0: USB revision 1.0=0A= uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1=0A= uhub0: 2 ports with 2 removable, self powered=0A= intpm0: port 0xe800-0xe80f = irq 9 at device 4.3 on pci0=0A= intpm0: I/O mapped e800=0A= intpm0: intr IRQ 9 enabled revision 0=0A= smbus0: on intsmb0=0A= smb0: on smbus0=0A= intpm0: PM I/O mapped e400 =0A= xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xb000-0xb07f mem = 0xde800000-0xde80007f irq 10 at device 11.0 on pci0=0A= xl0: Ethernet address: 00:01:02:ed:38:00=0A= miibus0: on xl0=0A= xlphy0: <3Com internal media interface> on miibus0=0A= xlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto=0A= xl1: <3Com 3c905B-TX Fast Etherlink XL> port 0xa800-0xa87f mem = 0xde000000-0xde00007f irq 11 at device 12.0 on pci0=0A= xl1: Ethernet address: 00:50:04:01:2f:8e=0A= miibus1: on xl1=0A= xlphy1: <3Com internal media interface> on miibus1=0A= xlphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto=0A= orm0: