Bug 31135

Summary: /bin/df reporting 'NaNB' as a Size.
Product: Base System Reporter: Josef Karthauser <joe>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   

Description Josef Karthauser 2001-10-08 13:10:01 UTC
	I've just had the strangest output from 'df':

	% while test /tmp; do df -h /data; sleep 5; done
	[cut]
	Filesystem     Size   Used  Avail Capacity  Mounted on
	/dev/ad0s2h     10G   9.5G    72M    99%    /data
	Filesystem     Size   Used  Avail Capacity  Mounted on
	/dev/ad0s2h    NaNB   9.5G    69M    99%    /data
	               ^^^^
	Filesystem     Size   Used  Avail Capacity  Mounted on
	/dev/ad0s2h     10G   9.5G    72M    99%    /data
	[cut]

Fix: 

I've not looked for a fix yet.  I don't know where the problem
	lies, I'm just recording that there is one.
How-To-Repeat: 	Unknown.  This is the first time I've seen this.
Comment 1 Crist J. Clark 2001-10-10 09:23:50 UTC
On Mon, Oct 08, 2001 at 01:06:27PM +0100, Joe Karthauser wrote:
> >Description:
> 	I've just had the strangest output from 'df':
> 
> 	% while test /tmp; do df -h /data; sleep 5; done
> 	[cut]
> 	Filesystem     Size   Used  Avail Capacity  Mounted on
> 	/dev/ad0s2h     10G   9.5G    72M    99%    /data
> 	Filesystem     Size   Used  Avail Capacity  Mounted on
> 	/dev/ad0s2h    NaNB   9.5G    69M    99%    /data
> 	               ^^^^
> 	Filesystem     Size   Used  Avail Capacity  Mounted on
> 	/dev/ad0s2h     10G   9.5G    72M    99%    /data
> 	[cut]

Can you reproduce this? Looking through src/bin/df/df.c, I can't see
what type of exceptional condition could sneak through. There are some
checks for "impossible" conditions. It's hard to see how the 'size'
can be messed up and yet the 'used' is OK since 'size' is used to
calculate 'used.' And obviously, the size of your file system is not
changing between df(1) runs.
-- 
Crist J. Clark                           cjclark@alum.mit.edu
                                         cjclark@jhu.edu
                                         cjc@freebsd.org
Comment 2 Josef Karthauser 2001-10-10 13:49:08 UTC
On Wed, Oct 10, 2001 at 01:23:50AM -0700, Crist J. Clark wrote:
> On Mon, Oct 08, 2001 at 01:06:27PM +0100, Joe Karthauser wrote:
> > >Description:
> > 	I've just had the strangest output from 'df':
> > 
> > 	% while test /tmp; do df -h /data; sleep 5; done
> > 	[cut]
> > 	Filesystem     Size   Used  Avail Capacity  Mounted on
> > 	/dev/ad0s2h     10G   9.5G    72M    99%    /data
> > 	Filesystem     Size   Used  Avail Capacity  Mounted on
> > 	/dev/ad0s2h    NaNB   9.5G    69M    99%    /data
> > 	               ^^^^
> > 	Filesystem     Size   Used  Avail Capacity  Mounted on
> > 	/dev/ad0s2h     10G   9.5G    72M    99%    /data
> > 	[cut]
> 
> Can you reproduce this? Looking through src/bin/df/df.c, I can't see
> what type of exceptional condition could sneak through. There are some
> checks for "impossible" conditions. It's hard to see how the 'size'
> can be messed up and yet the 'used' is OK since 'size' is used to
> calculate 'used.' And obviously, the size of your file system is not
> changing between df(1) runs.


No I can't.  I did a:

while true; df -h /data  | grep -i nan; done

for several hours but didn't see anything.   Wierd isn't it?

I definitely didn't dream this up though; the example above is cut and
pasted from the console.

Joe
Comment 3 Jens Schweikhardt freebsd_committer freebsd_triage 2002-08-07 22:36:30 UTC
State Changed
From-To: open->closed

Originator cannot reproduce behavior. Could have been a transient 
failure of HW (CPU, FP Register, RAM?). If it happens again, let us 
know and we reopen this PR.