From owner-freebsd-stable@FreeBSD.ORG Thu Jun 10 23:03:02 2010 Return-Path: Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 861D61065674 for ; Thu, 10 Jun 2010 23:03:02 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 4B46B8FC08 for ; Thu, 10 Jun 2010 23:03:02 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 195D435A85C; Fri, 11 Jun 2010 01:03:01 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 04E4E172B6; Fri, 11 Jun 2010 01:03:01 +0200 (CEST) Date: Fri, 11 Jun 2010 01:03:00 +0200 From: Jilles Tjoelker To: Jansen Gotis Message-ID: <20100610230300.GA51804@stack.nl> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-stable@FreeBSD.org Subject: Re: "calcru: runtime went backwards" messages X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2010 23:03:02 -0000 On Fri, Jun 11, 2010 at 12:35:05AM +0800, Jansen Gotis wrote: > Hi, for the past couple of months since moving to RELENG_8 I've been > receiving "calcru: runtime went backwards" messages on the console. > My machine is a dual Pentium III 1.26GHz with an Intel SAI2 board. > Disabling EIST is not an option in my BIOS, and I've tried disabling > the ACPI timer as well as setting kern.timecounter.hardware=i8254. > I've also tried disabling cpufreq in my kernel configuration. > For what it's worth, I'm running base ntpd. I've also tried openntpd, > but no dice. > I did a binary search of the commit with which this started, and > apparently it's svn r204546, a summary of which can be seen here: > http://freshbsd.org/2010/03/02/01/56/55 > The calcru messages appear whether vesa is loaded as a module > or compiled into the kernel. > If anyone needs more information, I'll be happy to provide it. > ===== snippet of /var/log/messages relating to calcru messages ===== > Jun 10 22:41:42 hobbes kernel: calcru: runtime went backwards from > 3502 usec to 3297 usec for pid 1106 (mksh) > Jun 10 22:41:42 hobbes kernel: calcru: runtime went backwards from > 36785 usec to 35858 usec for pid 1114 (csh) > Jun 10 22:41:42 hobbes kernel: calcru: runtime went backwards from > 13438 usec to 12652 usec for pid 1113 (su) > Jun 10 22:41:42 hobbes kernel: calcru: runtime went backwards from > 14956 usec to 14081 usec for pid 1111 (mksh) > Jun 10 22:41:42 hobbes kernel: calcru: runtime went backwards from > 3323 usec to 3128 usec for pid 1111 (mksh) > Jun 10 22:41:42 hobbes kernel: calcru: runtime went backwards from 610 > usec to 574 usec for pid 549 (devd) > Jun 10 22:41:42 hobbes kernel: calcru: runtime went backwards from 517 > usec to 486 usec for pid 548 (dhclient) > Jun 10 22:41:42 hobbes kernel: calcru: runtime went backwards from > 1912 usec to 1800 usec for pid 532 (dhclient) > Jun 10 22:41:42 hobbes kernel: calcru: runtime went backwards from > 39738 usec to 37412 usec for pid 532 (dhclient) > Jun 10 22:41:42 hobbes kernel: calcru: runtime went backwards from > 3369010 usec to 3334846 usec for pid 1 (init) This may well be a manifestation of a brokenness (which should not be unknown) in how FreeBSD stores CPU time utilization. The time is maintained in "CPU ticks" (CPU clock cycles), so if the clock frequency changes, the values of existing processes will be wrong (a jump when converted to seconds). When calcru detects this, it generates messages like the above. If this analysis is right, the messages can be ignored, but indicate that CPU time statistics may be inaccurate. I suppose fairly arbitrary changes can cause the messages to appear or disappear. -- Jilles Tjoelker