From nobody@FreeBSD.org  Tue Jan 10 05:23:00 2006
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 1B1D916A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 10 Jan 2006 05:23:00 +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 D77F543D45
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 10 Jan 2006 05:22:59 +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 k0A5Mxer040249
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 10 Jan 2006 05:22:59 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k0A5Mx7Y040247;
	Tue, 10 Jan 2006 05:22:59 GMT
	(envelope-from nobody)
Message-Id: <200601100522.k0A5Mx7Y040247@www.freebsd.org>
Date: Tue, 10 Jan 2006 05:22:59 GMT
From: Bob McClure <h8msft@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: fstat not working properly?
X-Send-Pr-Version: www-2.3

>Number:         91580
>Category:       kern
>Synopsis:       fstat(2) not working properly in 6.0?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    rwatson
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 10 05:30:07 GMT 2006
>Closed-Date:    Sat Mar 08 21:48:05 UTC 2008
>Last-Modified:  Sat Mar 08 21:48:05 UTC 2008
>Originator:     Bob McClure
>Release:        FreeBSD 6.0-RELEASE
>Organization:
Vestcom
>Environment:
FreeBSD lr-netcom-01.vestcomretail.com 6.0-RELEASE FreeBSD 6.0-RELEASE #2: Sat Dec 17 09:58:03 CST 2005     bobm@lr-netcom-02.vestcomretail.com:/usr/src/sys/i386/compile/GENERIC  i386
              
>Description:
I have been relying on fstat to verify that files are closed before processing
in batch FreeBSD 5.3-RELEASE and parsing the output.  6.0-RELEASE does not
report open files in the same manner.

>How-To-Repeat:
5.3-RELEASE:
  ;cd /var/log
  ;fstat messages
USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W NAME
root     syslogd      296    9 /var      16486 -rw-r--r--   79798  w  messages


6.0-RELEASE:
  ;cd /var/log
  fstat messages
USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W NAME
(no output)            
>Fix:
              
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: rwatson 
State-Changed-When: Sat Mar 8 20:12:12 UTC 2008 
State-Changed-Why:  
Trying this on a recent 7.0-STABLE: 

rwatson@freefall:/var/log> fstat messages 
USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W NAME 
root     syslogd      595   11 /var      47138 -rw-r--r--   72653  w  messages 
rwatson@freefall:/var/log> uname -a 
FreeBSD freefall.freebsd.org 7.0-STABLE FreeBSD 7.0-STABLE #33: Fri Feb 29 00:53:41 UTC 2008     simon@freefall.freebsd.org:/usr/src/sys/i386/compile/FREEFALL  i386 

Could you confirm whether this problem still happens for you in your 
environment?  Thanks! 

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

From: "Bob McClure" <h8msft@gmail.com>
To: rwatson@freebsd.org
Cc:  
Subject: Re: kern/91580: fstat(2) not working properly in 6.0?
Date: Sat, 8 Mar 2008 14:50:12 -0600

 ------=_Part_47811_31242749.1205009412564
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 This is still re-creatable on 6.0-RELEASE.
 
 tested on 6.2 RELEASE and 7.0-RC1 it works properly
 
 Thank you.
 
 On Sat, Mar 8, 2008 at 2:13 PM, <rwatson@freebsd.org> wrote:
 
 > Synopsis: fstat(2) not working properly in 6.0?
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: rwatson
 > State-Changed-When: Sat Mar 8 20:12:12 UTC 2008
 > State-Changed-Why:
 > Trying this on a recent 7.0-STABLE:
 >
 > rwatson@freefall:/var/log> fstat messages
 > USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W NAME
 > root     syslogd      595   11 /var      47138 -rw-r--r--   72653  w
 >  messages
 > rwatson@freefall:/var/log> uname -a
 > FreeBSD freefall.freebsd.org 7.0-STABLE FreeBSD 7.0-STABLE #33: Fri Feb 29
 > 00:53:41 UTC 2008     simon@freefall.freebsd.org:/usr/src/sys/i386/compile/FREEFALL
 >  i386
 >
 > Could you confirm whether this problem still happens for you in your
 > environment?  Thanks!
 >
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=91580
 >
 
 ------=_Part_47811_31242749.1205009412564
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 This is still re-creatable on 6.0-RELEASE. <br><br>tested on 6.2 RELEASE and 7.0-RC1 it works properly<br><br>Thank you.<br><br><div class="gmail_quote">On Sat, Mar 8, 2008 at 2:13 PM,  &lt;<a href="mailto:rwatson@freebsd.org">rwatson@freebsd.org</a>&gt; wrote:<br>
 <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Synopsis: fstat(2) not working properly in 6.0?<br>
 <br>
 State-Changed-From-To: open-&gt;feedback<br>
 State-Changed-By: rwatson<br>
 State-Changed-When: Sat Mar 8 20:12:12 UTC 2008<br>
 State-Changed-Why:<br>
 Trying this on a recent 7.0-STABLE:<br>
 <br>
 rwatson@freefall:/var/log&gt; fstat messages<br>
 USER &nbsp; &nbsp; CMD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PID &nbsp; FD MOUNT &nbsp; &nbsp; &nbsp;INUM MODE &nbsp; &nbsp; &nbsp; &nbsp; SZ|DV R/W NAME<br>
 root &nbsp; &nbsp; syslogd &nbsp; &nbsp; &nbsp;595 &nbsp; 11 /var &nbsp; &nbsp; &nbsp;47138 -rw-r--r-- &nbsp; 72653 &nbsp;w &nbsp;messages<br>
 rwatson@freefall:/var/log&gt; uname -a<br>
 FreeBSD <a href="http://freefall.freebsd.org" target="_blank">freefall.freebsd.org</a> 7.0-STABLE FreeBSD 7.0-STABLE #33: Fri Feb 29 00:53:41 UTC 2008 &nbsp; &nbsp; simon@freefall.freebsd.org:/usr/src/sys/i386/compile/FREEFALL &nbsp;i386<br>
 
 <br>
 Could you confirm whether this problem still happens for you in your<br>
 environment? &nbsp;Thanks!<br>
 <br>
 <a href="http://www.freebsd.org/cgi/query-pr.cgi?pr=91580" target="_blank">http://www.freebsd.org/cgi/query-pr.cgi?pr=91580</a><br>
 </blockquote></div><br>
 
 ------=_Part_47811_31242749.1205009412564--
State-Changed-From-To: feedback->closed 
State-Changed-By: rwatson 
State-Changed-When: Sat Mar 8 21:47:13 UTC 2008 
State-Changed-Why:  

Submitter reports that this is not a problem on recent FreeBSD versions, so 
close PR.  If the problem recurs, please follow up on this PR so that I can 
reopen it.  Thanks for the report! 



Responsible-Changed-From-To: freebsd-bugs->rwatson 
Responsible-Changed-By: rwatson 
Responsible-Changed-When: Sat Mar 8 21:47:13 UTC 2008 
Responsible-Changed-Why:  
Take ownership so that if there are any further follow-ups, I see them. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=91580 
>Unformatted:
