From nobody@FreeBSD.org  Mon Jul 25 08:49:26 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 756C016A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 25 Jul 2005 08:49:26 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0440D43D4C
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 25 Jul 2005 08:49:26 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j6P8nNxP059089
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 25 Jul 2005 08:49:23 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j6P8nNow059088;
	Mon, 25 Jul 2005 08:49:23 GMT
	(envelope-from nobody)
Message-Id: <200507250849.j6P8nNow059088@www.freebsd.org>
Date: Mon, 25 Jul 2005 08:49:23 GMT
From: Attila Nagy <bra@fsn.hu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: strange numbers in gstat on 6.0
X-Send-Pr-Version: www-2.3

>Number:         84042
>Category:       bin
>Synopsis:       [geom] strange numbers in gstat(8) on 6.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    phk
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 25 08:50:14 GMT 2005
>Closed-Date:    Mon Jul 25 21:13:30 GMT 2005
>Last-Modified:  Fri Jul 29 21:50:19 GMT 2005
>Originator:     Attila Nagy
>Release:        FreeBSD 6.0-BETA1 #7: Sat Jul 23 20:51:46 CEST 2005
>Organization:
FSN
>Environment:
FreeBSD 6.0-BETA1 #7: Sat Jul 23 20:51:46 CEST 2005 i386
>Description:
sample gstat output:
dT: 0.501  flag_I 500000us  sizeof 240  i -1
 L(q)  ops/s    r/s   kBps   ms/r    w/s   kBps   ms/w   %busy Name
    0      0      0      0    0.0      0      0    0.0    0.0| fd0
    0      0      0      0    0.0      0      0    0.0    0.0| da0
    0     40      0      0    0.0     40    375    0.2    0.7| da1
    0      0      0      0    0.0      0      0    0.0    0.0| da0s1
    0     40      0      0    0.0     40    375    0.2    0.8| da1s1
    0      0      0      0    0.0      0      0    0.0    0.0| da0s1a
    0      0      0      0    0.0      0      0    0.0    0.0| da0s1b
    0      0      0      0    0.0      0      0    0.0    0.0| da0s1c
    0      0      0      0    0.0      0      0    0.0    0.0| da0s1d
    0      0      0      0    0.0      0      0    0.0    0.0| da0s1e
    0      0      0      0    0.0      0      0    0.0    0.0| da0s1f
    0      0      0      0    0.0      0      0    0.0    0.0| da1s1c
 4294967288     40      0      0    0.0     40    375    0.2  220.5| da1s1d


The queue length is always 4294967288 and the %busy columns shows high percents even when the machine is idle. When I put some load to the disks, the queue length varies between 0, 1 and some high numbers and if the disk goes idle, it switches back to 4294967288.
>How-To-Repeat:
      
>Fix:
      
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->phk 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Jul 25 17:54:42 GMT 2005 
Responsible-Changed-Why:  
phk probably either knows about this or who it should be assigned to. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=84042 
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Mon Jul 25 21:13:18 GMT 2005 
State-Changed-Why:  
fixed in 7-current 

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

From: Kris Kennaway <kris@obsecurity.org>
To: Attila Nagy <bra@fsn.hu>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/84042: strange numbers in gstat on 6.0
Date: Fri, 29 Jul 2005 17:47:31 -0400

 On Mon, Jul 25, 2005 at 08:49:23AM +0000, Attila Nagy wrote:
 
 >  4294967288     40      0      0    0.0     40    375    0.2  220.5| da1s1d
 > 
 > 
 > The queue length is always 4294967288 and the %busy columns shows high percents even when the machine is idle. When I put some load to the disks, the queue length varies between 0, 1 and some high numbers and if the disk goes idle, it switches back to 4294967288.
 
 This is just a race condition in the stats collection..phk did it this
 way deliberately to avoid an additional synchronization overhead, but
 it turns out not to have a measurable performance impact and he
 changed it in 7.0.  In the meantime you can increase the value of the
 kern.geom.collectstats sysctl (I forget what value is necessary, it
 goes up to 7 or so) to prevent the race.
 
 Kris
>Unformatted:
