From owner-freebsd-bugs Mon Aug 27 10:40:10 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E49B737B408 for ; Mon, 27 Aug 2001 10:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f7RHe1527530; Mon, 27 Aug 2001 10:40:01 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8899037B407 for ; Mon, 27 Aug 2001 10:36:47 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f7RHal426984; Mon, 27 Aug 2001 10:36:47 -0700 (PDT) (envelope-from nobody) Message-Id: <200108271736.f7RHal426984@freefall.freebsd.org> Date: Mon, 27 Aug 2001 10:36:47 -0700 (PDT) From: Blapp Martin To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/30135: Time drifting on STABLE SMP when calling gettimeofday(). Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 30135 >Category: kern >Synopsis: Time drifting on STABLE SMP when calling gettimeofday(). >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Aug 27 10:40:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Blapp Martin >Release: 4.4-PRERELEASE >Organization: Improware AG >Environment: FreeBSD xx.xx.xx 4.4-PRERELEASE FreeBSD 4.4-PRERELEASE #1: Thu Aug 16 15:17:53 CEST 2001 root@xx:/usr/obj/usr/src/sys/DOCSIS i386 >Description: Serverworks Chipset Timecounter "i8254" frequency 1193182 Hz CPU: Pentium III/Pentium III Xeon/Celeron (933.37-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x686 Stepping = 6 Features=0x383fbff Changing APIC ID for IO APIC #1 from 3 to 1 in MP table Changing APIC ID for IO APIC #1 from 3 to 1 on chip Programming 16 pins in IOAPIC #0 IOAPIC #0 intpin 2 -> irq 0 Programming 16 pins in IOAPIC #1 FreeBSD/SMP: Multiprocessor motherboard cpu0 (BSP): apic id: 3, version: 0x00040011, at 0xfee00000 cpu1 (AP): apic id: 0, version: 0x00040011, at 0xfee00000 io0 (APIC): apic id: 2, version: 0x000f0011, at 0xfec00000 io1 (APIC): apic id: 1, version: 0x000f0011, at 0xfec01000 >How-To-Repeat: If you produce 100% load with this program on one CPU, the time drifting happens. The drift is about 10% !!! It seems that gettimeofday() produces the effect. Other load does not make anything and seems to be harmless. #include #include #include int main(void) { for(;;) { struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz); } return (0); } >Fix: Not known. This is really a severe Problem on bigger servers ! Ntpd gives up after some minutes cause the jitter is to big, and calling ntpdate all 10 seconds is not really a solution. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message