From dada@localhost.tu-graz.ac.at  Tue Dec 30 11:46:29 1997
Received: from mbox.tu-graz.ac.at (mbox.tu-graz.ac.at [129.27.2.6])
          by hub.freebsd.org (8.8.7/8.8.7) with SMTP id LAA19410
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 30 Dec 1997 11:46:25 -0800 (PST)
          (envelope-from dada@localhost.tu-graz.ac.at)
Received: from fcggsg07.icg.tu-graz.ac.at by mbox.tu-graz.ac.at with SMTP id AA22613
  (5.67c/IDA-1.5t for <FreeBSD-gnats-submit@freebsd.org>); Tue, 30 Dec 1997 20:47:14 +0100
Received: from localhost.tu-graz.ac.at (isdn086.tu-graz.ac.at [129.27.240.86])
	by fcggsg07.icg.tu-graz.ac.at (8.8.8/8.8.8) with ESMTP id UAA07431
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 30 Dec 1997 20:46:12 +0100 (MET)
Received: (from dada@localhost)
	by localhost.tu-graz.ac.at (8.8.8/8.8.5) id QAA00925;
	Tue, 30 Dec 1997 16:03:14 +0100 (CET)
Message-Id: <199712301503.QAA00925@localhost.tu-graz.ac.at>
Date: Tue, 30 Dec 1997 16:03:14 +0100 (CET)
From: Martin Kammerhofer <dada@sbox.tu-graz.ac.at>
Reply-To: dada@sbox.tu-graz.ac.at
To: FreeBSD-gnats-submit@freebsd.org
Subject: fdesc fs crashes system
X-Send-Pr-Version: 3.2

>Number:         5396
>Category:       kern
>Synopsis:       fdesc fs crashes system
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 30 11:50:01 PST 1997
>Closed-Date:    Wed Mar 28 10:47:54 PST 2001
>Last-Modified:  Wed Mar 28 10:48:03 PST 2001
>Originator:     Martin Kammerhofer
>Release:        FreeBSD 2.2.5-STABLE i386
>Organization:
Graz University of Technology
>Environment:

2.2.5-STABLE cvsupped a few days ago

>Description:

Doing an "ls -lR" over the directory where a fdesd fs is mounted
reliably crashes my system - if and only if the output of that "ls"
is piped into another (seems arbitrary) command.

DDB tells me "panic: false attr" then
and trace gives roughly
	_Debugger
	_panic
	_end
	_end
	_vn_stat
	_lstat
	_syscall
Unfortunately no coredump is possible.

>How-To-Repeat:

% mount -p
/dev/wd1a	/	ufs rw	1 1
/dev/wd1s8e	/var	ufs rw	1 2
/dev/wd1s8h	/usr	ufs rw,async	1 2
procfs	/proc	procfs rw	0 0
kernfs	/kern	kernfs rw	0 0
% mount -tfdesc FDESC /mnt
% mount -furv /usr	# only here to save fsck time on reboot
/dev/wd1s8h on /usr (local, read-only)
% mount -p
/dev/wd1a	/	ufs rw	1 1
/dev/wd1s8e	/var	ufs rw	1 2
/dev/wd1s8h	/usr	ufs ro	1 2
procfs	/proc	procfs rw	0 0
kernfs	/kern	kernfs rw	0 0
fdesc	/mnt	fdesc rw	0 0
% ls -lR /mnt | wc	# pipeline required here

>Fix:
	
none known (only not mounting fdesc-fs)
>Release-Note:
>Audit-Trail:

From: Cy Schubert <cys@wlc.com>
To: freebsd-gnats-submit@freebsd.org, dada@sbox.tu-graz.ac.at,
        cschuber@uumail.gov.bc.ca
Cc:  Subject: Re: kern/5396: fdesc fs crashes system
Date: Sun, 18 Jan 1998 08:22:39 -0800

 This is a multi-part message in MIME format.
 --------------7659CB72A8A636143F84B4FC
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 I submitted a PR a while ago about this and submitted a followup fix to
 this about two weeks ago.  I believe that my fix has been incorporated
 into -stable and should be included in 2.2.6.  Here is the fix.
 
 
 Regards,                       Phone:  (250)387-8437
 Cy Schubert                      Fax:  (250)387-5766
 UNIX Support                   OV/VM:  BCSC02(CSCHUBER)
 ITSD                          BITNET:  CSCHUBER@BCSC02.BITNET
 Government of BC            Internet:  cschuber@uumail.gov.bc.ca
                                        Cy.Schubert@gems8.gov.bc.ca
 
                 "Quit spooling around, JES do it."
 
 
 --------------7659CB72A8A636143F84B4FC
 Content-Type: text/plain; charset=us-ascii; name="fdesc_panic_fix.usermod"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline; filename="fdesc_panic_fix.usermod"
 
 --- sys/miscfs/fdesc/fdesc_vnops.c.orig	Sat Dec 21 11:04:28 1996
 +++ sys/miscfs/fdesc/fdesc_vnops.c	Fri Jan  2 09:18:12 1998
 @@ -409,11 +409,18 @@
  		}
  		break;
  
 +	case DTYPE_PIPE:
  	case DTYPE_SOCKET:
 -		error = soo_stat((struct socket *)fp->f_data, &stb);
 +		if (fp->f_type == DTYPE_SOCKET)
 +			error = soo_stat((struct socket *)fp->f_data, &stb);
 +		else
 +			error = pipe_stat((struct pipe *)fp->f_data, &stb);
  		if (error == 0) {
  			vattr_null(vap);
 -			vap->va_type = VSOCK;
 +			if (fp->f_type == DTYPE_SOCKET)
 +				vap->va_type = VSOCK;
 +			else
 +				vap->va_type = VFIFO;
  			vap->va_mode = stb.st_mode;
  			vap->va_nlink = stb.st_nlink;
  			vap->va_uid = stb.st_uid;
 @@ -557,6 +564,7 @@
  		error = VOP_SETATTR((struct vnode *) fp->f_data, ap->a_vap, ap->a_cred, ap->a_p);
  		break;
  
 +	case DTYPE_PIPE:
  	case DTYPE_SOCKET:
  		error = 0;
  		break;
 
 --------------7659CB72A8A636143F84B4FC--
 
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Wed Mar 28 10:47:54 PST 2001 
State-Changed-Why:  
Antique PR. 

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