From nobody@FreeBSD.org  Tue Jan  4 12:40:59 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E32AE1065673
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Jan 2011 12:40:59 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id D34638FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Jan 2011 12:40:59 +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 p04Cexf7047290
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 4 Jan 2011 12:40:59 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p04Cexbd047289;
	Tue, 4 Jan 2011 12:40:59 GMT
	(envelope-from nobody)
Message-Id: <201101041240.p04Cexbd047289@red.freebsd.org>
Date: Tue, 4 Jan 2011 12:40:59 GMT
From: Florian Smeets <flo@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: i386/XEN idle thread shows wrong percentages
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         153674
>Category:       kern
>Synopsis:       [xen] i386/XEN idle thread shows wrong percentages
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-xen
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 04 12:50:09 UTC 2011
>Closed-Date:    
>Last-Modified:  Tue Jan 04 19:39:54 UTC 2011
>Originator:     Florian Smeets
>Release:        FreeBSD 9.0-CURRENT
>Organization:
>Environment:
FreeBSD ec2 9.0-CURRENT FreeBSD 9.0-CURRENT #111: Sat Jan  1 09:45:23 UTC 2011     root@chch.daemonology.net:/usr/obj/i386.i386/usr/src/sys/XEN  i386

>Description:
From time to time the idle thread does not seem to get accounted correctly, it goes through the roof and then comes down slowly, but only in top's process list. The header seems correct.

CPU:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle

  PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND


   11 root        1 171 ki31     0K     8K RUN     19.1H 24566.89% idle
   12 root       11 -64    -     0K    88K WAIT     1:28  2.00% intr
>How-To-Repeat:
I've seen this on an EC2 instance running ami-5b82b72f. This seems to happen when the instance has been idle for a while and suddenly has do to some work.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-xen 
Responsible-Changed-By: cperciva 
Responsible-Changed-When: Tue Jan 4 15:28:29 UTC 2011 
Responsible-Changed-Why:  
Assign Xen bug to freebsd-xen list. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=153674 

From: Colin Percival <cperciva@freebsd.org>
To: bug-followup@FreeBSD.org, flo@freebsd.org
Cc:  
Subject: Re: kern/153674: i386/XEN idle thread shows wrong percentages
Date: Tue, 04 Jan 2011 07:31:16 -0800

 FWIW, this sounds to me like the kernel scheduler is getting confused in its
 accounting; possibly due to "stolen" time (when the hypervisor is off running
 other instances) and possibly related to the clock-interrupts-getting-lost
 bug (kern/153620).
 
 -- 
 Colin Percival
 Security Officer, FreeBSD | freebsd.org | The power to serve
 Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid
>Unformatted:
