From nobody@FreeBSD.org  Sun Apr  1 01:53:14 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id E4E2E106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  1 Apr 2012 01:53:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id D05578FC19
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  1 Apr 2012 01:53:14 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q311rEDR085555
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 1 Apr 2012 01:53:14 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q311rE1l085554;
	Sun, 1 Apr 2012 01:53:14 GMT
	(envelope-from nobody)
Message-Id: <201204010153.q311rE1l085554@red.freebsd.org>
Date: Sun, 1 Apr 2012 01:53:14 GMT
From: Joe Holden <lists@rewt.org.uk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Clock stops ticking in some cases with new timer framework in 9
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         166549
>Category:       kern
>Synopsis:       [eventtimers] Clock stops ticking in some cases with new timer framework in 9
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 01 02:00:24 UTC 2012
>Closed-Date:    
>Last-Modified:  Mon May 21 08:31:06 UTC 2012
>Originator:     Joe Holden
>Release:        9.0-RELEASE
>Organization:
>Environment:
FreeBSD grace 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Sun Feb 26 07:38:43 GMT 2012     root@grace:/usr/obj/usr/src/sys/GRACE  i386
>Description:
On a handful of machines I have had issues where the clock stops ticking, it's hard to judge when they stopped ticking as services don't seem to stop running, they just don't know the time has advanced which also obviously makes the output of 'date' static...

Setting kern.eventtimer.periodic=1 "fixes" the problem and resumes the ticking.

Seen on a variety of machines/virtual machines - ICH7/Celeron & VirtualBox, both 32 and 64bit
>How-To-Repeat:
Boot machine, wait for it to stop ticking :)
>Fix:
n/a

>Release-Note:
>Audit-Trail:

From: "Alexander Churanov" <freebsd@alexanderchuranov.com>
To: bug-followup@freebsd.org, lists@rewt.org.uk
Cc:  
Subject: Re: kern/166549: [eventttimers] Clock stops ticking in some cases
 with new timer framework in 9
Date: Fri, 27 Apr 2012 13:45:28 +0400

 I also observe the same problem and decided to submit more data.
 
 Output of 'uname -a':
 FreeBSD vps-1 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:15:25 UTC  
 2012     root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
 
 'svn up' and 'ssh somebody@localhost' hang. According to ktrace it's on  
 select() call.
 
 Output of 'sysctl kern.timecounter'
 
 kern.timecounter.tick: 1
 kern.timecounter.choice: TSC(-100) i8254(0) dummy(-1000000)
 kern.timecounter.hardware: i8254
 kern.timecounter.stepwarnings: 0
 kern.timecounter.tc.i8254.mask: 65535
 kern.timecounter.tc.i8254.counter: 15162
 kern.timecounter.tc.i8254.frequency: 1193182
 kern.timecounter.tc.i8254.quality: 0
 kern.timecounter.tc.TSC.mask: 4294967295
 kern.timecounter.tc.TSC.counter: 1850043174
 kern.timecounter.tc.TSC.frequency: 2261052965
 kern.timecounter.tc.TSC.quality: -100
 kern.timecounter.smp_tsc: 0
 kern.timecounter.invariant_tsc: 0
 
 Output of 'sysctl kern.eventtimer':
 
 kern.eventtimer.choice: LAPIC(400) i8254(100) RTC(0)
 kern.eventtimer.et.LAPIC.flags: 15
 kern.eventtimer.et.LAPIC.frequency: 50001127
 kern.eventtimer.et.LAPIC.quality: 400
 kern.eventtimer.et.RTC.flags: 17
 kern.eventtimer.et.RTC.frequency: 32768
 kern.eventtimer.et.RTC.quality: 0
 kern.eventtimer.et.i8254.flags: 1
 kern.eventtimer.et.i8254.frequency: 1193182
 kern.eventtimer.et.i8254.quality: 100
 kern.eventtimer.periodic: 0
 kern.eventtimer.timer: LAPIC
 kern.eventtimer.idletick: 0
 kern.eventtimer.singlemul: 4
 
 Output of 'vmstat -i':
 
 interrupt                          total       rate
 irq5: re0 uhci0                  3066560         66
 irq10: re1                            80          0
 irq14: ata0                       482243         10
 cpu0:timer                       5509435        119
 cpu1:timer                        862559         18
 Total                            9920877        215
 
 sysctl kern.eventtimer.periodic=1 starts the clock!
 
 A part of dmesg that seems relevant:
 
 ACPI Error: A valid RSDP was not found (20110527/tbxfroot-237)
 Copyright (c) 1992-2012 The FreeBSD Project.
 Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
          The Regents of the University of California. All rights reserved.
 FreeBSD is a registered trademark of The FreeBSD Foundation.
 FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:15:25 UTC 2012
      root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
 ACPI Error: A valid RSDP was not found (20110527/tbxfroot-237)
 CPU: Intel(R) Xeon(R) CPU           E5520  @ 2.27GHz (2261.05-MHz  
 686-class CPU)
    Origin = "GenuineIntel"  Id = 0x106a5  Family = 6  Model = 1a  Stepping  
 = 5
    Features=0x1781fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,MMX
 ,FXSR,SSE,SSE2,HTT>
    Features2=0x80982201<SSE3,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,HV>
    AMD Features=0x20100000<NX,LM>
    AMD Features2=0x1<LAHF>
 real memory  = 536870912 (512 MB)
 avail memory = 506146816 (482 MB)
 MPTable: <_HVMCPU_ XEN         >
 Event timer "LAPIC" quality 400
 FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 FreeBSD/SMP: 1 package(s) x 2 core(s)
   cpu0 (BSP): APIC ID:  0
   cpu1 (AP): APIC ID:  2
 ioapic0: Changing APIC ID to 1
 ioapic0: Assuming intbase of 0
 ioapic0 <Version 1.1> irqs 0-47 on motherboard
 kbd1 at kbdmux0
 ACPI Error: A valid RSDP was not found (20110527/tbxfroot-237)
 ACPI: Table initialisation failed: AE_NOT_FOUND
 ACPI: Try disabling either ACPI or apic support.
 
 I hope this will help to resolve the issue.
 
 -- 
 Using Opera's revolutionary email client: http://www.opera.com/mail/
>Unformatted:
