From ditka!ohare.chicago.com!kls@wetware.com  Sun Mar  3 23:59:23 1996
Received: from wetware.com (root@wetware.wetware.com [192.216.52.1])
          by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id XAA10280
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 3 Mar 1996 23:59:21 -0800 (PST)
Received: from ditka by wetware.com with uucp
	(Smail3.1.28.1 #4) id m0ttVAo-000JaZC; Sun, 3 Mar 96 23:59 PST
Received: from ohare.chicago.com by ditka.chicago.com with smtp
	(Smail3.1.28.1 #1) id m0ttV9x-0001VuC; Sun, 3 Mar 96 23:58 WET
Received: by ohare.chicago.com (Smail3.1.28.1 #1)
	id m0ttV9x-0000FbC; Sun, 3 Mar 96 23:58 WET
Message-Id: <m0ttV9x-0000FbC@ohare.chicago.com>
Date: Sun, 3 Mar 96 23:58 WET
From: kls@ohare.chicago.com
Reply-To: kls@chicago.com
To: FreeBSD-gnats-submit@freebsd.org, kls@chicago.com
Subject: null fs panics system
X-Send-Pr-Version: 3.2

>Number:         1059
>Category:       kern
>Synopsis:       null fs panics system
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    hsu
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar  4 00:00:00 PST 1996
>Closed-Date:    Fri May 23 10:09:33 PDT 1997
>Last-Modified:  Fri May 23 10:11:37 PDT 1997
>Originator:     Karl Swartz
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
Karl Swartz	|Home	kls@chicago.com
		|Work	kls@slac.stanford.edu
		|WWW	http://www.chicago.com/~kls/
Moderator of sci.aeronautics.airliners -- Unix/network work pays the bills
>Environment:

Newly installed FreeBSD 2.1 system (from Walnut Creek CDROM), with
selected packages installed (including bash and perl) but no other
special software, running the stock kernel on the following hardware:

    Alaris motherboard with IBM 486SLC2-66 (no 387 installed)
    8 MB memory
    generic IDE controller
    Maxtor 7420AV disk
    SMC Ultra Ethernet

User home directories in /usr/u/<user>, which preferably would be
visible as /u/<user> via a null/lofs mount.

Running as nonprivileged user with bash as the default shell.

>Description:

The system panics as follows when trying to execute a newly created
Perl script iff running from a null fs:

    Fatal trap 12: page fault while in kernel mode
    fault virtual address   = 0x0
    fault code              = supervisor read, page not present
    instruction pointer     = 0x8:0xf05586fc
    code segment            = base 0x0, limit 0xfffff, type 0x1b
                            = DPL 0, pres 1, def32 1, gran 1
    processor eflags        = interrupt enabled, resume, IOPL = 0
    current process         = 1119 (bash)
    interrupt mask          =
    panic: page fault

>How-To-Repeat:

(login)
$ echo $SHELL
/usr/local/bin/bash
$ echo $HOME
/usr/u/user
$ su
Password:
# mkdir /u
# mount -t null /usr/u /u
# exit
$ cd /u/user
$ mkdir panic
$ cd panic
$ cat >hello <<EOF
#!/usr/local/bin/perl
print "Hello, world!!!\n";
EOF
$ chmod a+x hello
$ ./hello

Panic occurs at this point immediately and consistently.  I'm not sure
if the extra directory or creating the script via the null fs matters
or not.  Running the script again after rebooting will again panic the
system.  Doing the same with a symlink from /u to /usr/u, or running
the script in /usr/u/panic, will not panic the system.  I have not
tried to see if the problem is specific to bash as the shell and/or
perl scripts.

>Fix:
	
	

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: gpalmer 
State-Changed-When: Mon Apr 8 19:04:33 PDT 1996 
State-Changed-Why:  
nullfs is known to have problems in all versions of FreeBSD. Work 
underway by Jeffrey Hsu <hsu@freebsd.org> to integrate 4.4BSD Lite2 
code should go some way to fixing this problem. 
Responsible-Changed-From-To: freebsd-bugs->hsu 
Responsible-Changed-By: scrappy 
Responsible-Changed-When: Fri Apr 12 21:55:40 PDT 1996 
Responsible-Changed-Why:  
Jeffrey is integrating BSD4.4 Lite2 code pertaining to this? 
State-Changed-From-To: analyzed->closed 
State-Changed-By: dfr 
State-Changed-When: Fri May 23 10:09:33 PDT 1997 
State-Changed-Why:  
This problem doesn't show up in current.  It was either fixed by Lite2 or 
by kato@freebsd.org's fixes to nullfs. 
>Unformatted:
