From dada@localhost.tu-graz.ac.at  Sat Dec 27 19:26:33 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 TAA11878
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 27 Dec 1997 19:26:24 -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 AA12418
  (5.67c/IDA-1.5t for <FreeBSD-gnats-submit@freebsd.org>); Sun, 28 Dec 1997 04:27:07 +0100
Received: from localhost.tu-graz.ac.at (isdn092.tu-graz.ac.at [129.27.240.92])
	by fcggsg07.icg.tu-graz.ac.at (8.8.8/8.8.8) with ESMTP id EAA07237
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 28 Dec 1997 04:26:06 +0100 (MET)
Received: (from dada@localhost)
	by localhost.tu-graz.ac.at (8.8.8/8.8.5) id EAA01960;
	Sun, 28 Dec 1997 04:22:17 +0100 (CET)
Message-Id: <199712280322.EAA01960@localhost.tu-graz.ac.at>
Date: Sun, 28 Dec 1997 04:22:17 +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: DEVFS and IDE broken in stable since 1997/11/13 18:22
X-Send-Pr-Version: 3.2

>Number:         5385
>Category:       kern
>Synopsis:       DEVFS and IDE broken in stable since 1997/11/13 18:22
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 27 19:30:00 PST 1997
>Closed-Date:    Thu Jan 1 16:33:29 MET 1998
>Last-Modified:  Thu Jan  1 16:42:55 MET 1998
>Originator:     Martin Kammerhofer
>Release:        FreeBSD 2.2.5-STABLE i386
>Organization:
Graz University of Technology
>Environment:

-STABLE (i.e. RELENG_2_2) after 1997/11/13 18:22

>Description:

After cvsupping (on 97/12/25) and making world and kernel the new
kernel panics very soon after device probing is finished.  DDB gave me
a "fatal trap 12: page fault while in kernel mode" and trace showed

	_dev_add_name
	_devs_link
	_set_ds_labeldevs_unaliased
	_set_ds_labeldevs
	_dsioctl
	_wdioctl
	_spec_ioctl
	_vn_ioctl
	_ioctl
	_syscall
	_Xsyscall

the offending process was disklabel, but commenting that out in
/etc/rc leads to a similar panic from process 0.  DDB complains about
a bad dumpdev and cannot do a crashdump.

Here's my dmesgs:
FreeBSD 2.2.5-STABLE #0: Sun Dec 28 03:19:26 CET 1997
    toot@localhost:/usr/src/sys/compile/LEND
CPU: i486DX (486-class CPU)
real memory  = 50331648 (49152K bytes)
avail memory = 46587904 (45496K bytes)
DEVFS: ready for devices
Probing for devices on the ISA bus:
sc0 at 0x60-0x6f irq 1 on motherboard
sc0: VGA color <16 virtual consoles, flags=0x0>
sio0 at 0x3f8-0x3ff irq 4 on isa
sio0: type 16450
sio1 at 0x2f8-0x2ff irq 3 on isa
sio1: type 16450
lpt0 at 0x378-0x37f on isa
pca0 on motherboard
pca0: PC speaker audio driver
fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa
fd0: 1.44MB 3.5in
wdc0 at 0x1f0-0x1f7 irq 14 on isa
wdc0: unit 0 (wd0): <ST3491A-XR>, 32-bit, multi-block-16
wd0: 408MB (836070 sectors), 899 cyls, 15 heads, 62 S/T, 512 B/S
wdc0: unit 1 (wd1): <IBM-DAQA-32160>, 32-bit, multi-block-16
wd1: 2067MB (4233600 sectors), 4200 cyls, 16 heads, 63 S/T, 512 B/S
wdc1 at 0x170-0x177 irq 15 on isa
npx0 on motherboard
npx0: INT 16 interface
sb0 at 0x220 irq 7 drq 1 on isa
sb0: <SoundBlaster Pro 3.2>
opl0 at 0x388 on isa
opl0: <Yamaha OPL-3 FM>
DEVFS: ready to run
wdc1: unit 0 (atapi): <CDA66801I/F1.03000>, removable, iordy
wcd0: 1033Kb/sec, 240Kb cache, audio play, 255 volume levels, ejectable tray
wcd0: no disc inside, unlocked

>How-To-Repeat:

boot a recent -stable kernel with DEVFS (from an EIDE disk - probably
that matters)

>Fix:
	
By a little trial and error I found that reverting files

	/src/sys/miscfs/devfs/devfs_tree.c to 1.32.2.2
	/src/sys/miscfs/devfs/devfs_vfsops.c to 1.14.2.2
	/src/sys/miscfs/devfs/devfs_vnops.c to 1.32.2.3

i.e. undoing julians commit from 1997/11/13 18:22 in /src/sys/miscfs/devfs:
	MFC: bring in changes from -current including some formatting changes
	so that I can keep them in sync easier.

solves the problem and makes devfs working again. Obviously this
commit broke something.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: joerg 
State-Changed-When: Thu Jan 1 16:33:29 MET 1998 
State-Changed-Why:  

Sorry, bug DEVFS is still higly experimental, and not supposed to work 
in -stable at all.  (One could argue it should be removed then.) 
>Unformatted:
