From leon@ra.obsidian.co.za  Mon Jan 31 05:41:43 2000
Return-Path: <leon@ra.obsidian.co.za>
Received: from ra.obsidian.co.za (lava.obsidian.co.za [160.124.182.1])
	by hub.freebsd.org (Postfix) with ESMTP id E221914FC5
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 31 Jan 2000 05:41:38 -0800 (PST)
	(envelope-from leon@ra.obsidian.co.za)
Received: from localhost (leon@localhost)
	by ra.obsidian.co.za (8.9.3/8.9.3) with ESMTP id PAA14079
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 31 Jan 2000 15:41:28 +0200
Message-Id: <Pine.LNX.4.10.10001311539560.14014-100000@ra.obsidian.co.za>
Date: Mon, 31 Jan 2000 15:41:28 +0200 (SAST)
From: Leon Breedt <leon@obsidian.co.za>
Sender: leon@ra.obsidian.co.za
To: FreeBSD-gnats-submit@freebsd.org
Subject: Attempted listing of just-mounted ext2fs causes kernel panic

>Number:         16490
>Category:       kern
>Synopsis:       Attempted listing of just-mounted ext2fs causes kernel panic
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 31 05:50:00 PST 2000
>Closed-Date:    Sun Apr 30 01:11:46 PDT 2000
>Last-Modified:  Sun Apr 30 01:26:32 PDT 2000
>Originator:     Leon Breedt
>Release:        FreeBSD 3.4-STABLE i386
>Organization:
Obsidian Systems
>Environment:
>Description:
 
     Attempted directory listing of an ext2 filesystem fails, just after 
     mounting, and causes a kernel panic. Kernel panic output follows:
 
 FATAL TRAP 12:              Page fault while in kernel mode
 Fault virtual address       = 0x0
 fault code                  = supervisor write, page not present
 instruction pointer         = 0x8:0xc0203d7e
 stack pointer               = 0x10:0xc7609c34
 frame pointer               = 0x10:0xc7609d64
 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             = 387 (gnuls)
 interrupt mask              =
 trap number                 = 12
 panic: page fault
 
 .........
 
     Panic occurs with an ext2 filesystem having this superblock:
 SUPERBLOCK:
 Inodes count:373152
 Blocks count:744912
 Reserv blocks count:37245
 Free blocks   count:226021
 Free inodes   count:356018
 First data block   :0
 Block size   :4096
 Fragment size:4096
 Blocks per group:32768
 Frags  per group:32768
 Inodes per group:16224
 mount time:Mon Jan 31 14:47:14 2000
 write time:Mon Jan 31 15:18:39 2000
 magic:0xEF53 (OK)
 state:0x0
 
     An ext2 filesystem with this superblock gives no problems:
 SUPERBLOCK:
 Inodes count:1359016
 Blocks count:5413873
 Reserv blocks count:216554
 Free blocks   count:1648520
 Free inodes   count:1293094
 First data block   :1
 Block size   :1024
 Fragment size:1024
 Blocks per group:8192
 Frags  per group:8192
 Inodes per group:2056
 mount time:Mon Jan 31 16:46:01 2000
 write time:Mon Jan 31 15:18:39 2000
 magic:0xEF53 (OK)
 state:0x0
 
     I am not sure if the differing blocksizes have anything to do with the
     problem.  If more information is required, please inform me as to what
     you need. Thanks.
 
>How-To-Repeat:
 
 	(root@core) /root# mount_ext2fs /dev/wd1s2 /mnt
     (root@core) /root# cd /mnt
     (root@core) /root# ls
 
     ls is an alias to '/usr/local/bin/gnuls'
 
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: asmodai 
Responsible-Changed-When: Tue Feb 1 08:07:40 PST 2000 
Responsible-Changed-Why:  
Misfiled PR. 
State-Changed-From-To: open->feedback 
State-Changed-By: bde 
State-Changed-When: Tue Mar 7 22:47:17 PST 2000 
State-Changed-Why:  
This is probably caused by the filesystem being mke2fs'd with the "filetype" 
feature.  This feature was unsupported, and unsupported features used to 
cause panics.  This feature is now supported in both -stable and -current, 
and unsupported features now cause mount failures. 

Do you still have the problem?  Current versions of dumpe2fs show the 
feature list.  The default features are "filetype" and "sparse".  The 
latter is unsupported so it will now cause a mount failure. 
State-Changed-From-To: feedback->closed 
State-Changed-By: bde 
State-Changed-When: Sat Apr 29 23:56:37 PDT 2000 
State-Changed-Why:  
No feedback after 7 weeks. 
Probably fixed by the "filetype" fixes in RELENG_3 and RELENG_4. 
State-Changed-From-To: closed->feedback 
State-Changed-By: bde 
State-Changed-When: Sun Apr 30 01:10:21 PDT 2000 
State-Changed-Why:  
Fix confirmed by submitter. 
State-Changed-From-To: feedback->closed 
State-Changed-By: bde 
State-Changed-When: Sun Apr 30 01:11:46 PDT 2000 
State-Changed-Why:  
Close it again after changing state to feedback to add a message about 
feedback. 
>Unformatted:
