Bug 16490

Summary: Attempted listing of just-mounted ext2fs causes kernel panic
Product: Base System Reporter: Leon Breedt <leon>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.4-STABLE   
Hardware: Any   
OS: Any   

Description Leon Breedt 2000-01-31 13:50:00 UTC
 
     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 rx0, 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'
Comment 1 Jeroen Ruigrok van der Werven freebsd_committer freebsd_triage 2000-02-01 16:07:40 UTC
Responsible Changed
From-To: gnats-admin->freebsd-bugs

Misfiled PR. 
Comment 2 Bruce Evans freebsd_committer freebsd_triage 2000-03-08 06:47:17 UTC
State Changed
From-To: open->feedback

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. 
Comment 3 Bruce Evans freebsd_committer freebsd_triage 2000-04-30 07:56:37 UTC
State Changed
From-To: feedback->closed

No feedback after 7 weeks. 
Probably fixed by the "filetype" fixes in RELENG_3 and RELENG_4. 
Comment 4 Bruce Evans freebsd_committer freebsd_triage 2000-04-30 09:10:21 UTC
State Changed
From-To: closed->feedback

Fix confirmed by submitter. 
Comment 5 Bruce Evans freebsd_committer freebsd_triage 2000-04-30 09:11:46 UTC
State Changed
From-To: feedback->closed

Close it again after changing state to feedback to add a message about 
feedback.