Subject: kern/9297: mounting LFS after crash => panic
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Thilo.Manske@HEH.Uni-Oldenburg.DE>
List: netbsd-bugs
Date: 01/25/2000 22:21:36
>Number:         9297
>Category:       kern
>Synopsis:       mounting LFS after crash => panic
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 25 20:18:00 2000
>Last-Modified:
>Originator:     Thilo Manske
>Organization:
	
>Release:        NetBSD-current supped Jan 22 ~12:00 UTC
>Environment:
	
System: NetBSD WintelKiller 1.4Q NetBSD 1.4Q (WintelKiller) #190: Sat Jan 22 22:10:24 MET 2000 thilo@Seti.HEH.Uni-Oldenburg.DE:/usr/src/sys/arch/i386/compile/WintelKiller i386
world rebuild with sources of the same age as kernel's sources (maybe one
day older)

>Description:
A few hours ago this system froze (wich is bad but not subject of this PR).
After a reset/reboot the machine paniced immediatly trying to mount an LFS.

Here's a bt from the crashdump:

panic: trap
#0  0xf024bf7b in rcsid ()
#0  0xf024bf7b in rcsid ()
#1  0x15ce000 in ?? ()
#2  0xf01e10b3 in cpu_reboot (howto=256, bootstr=0x0)
    at ../../../../arch/i386/i386/machdep.c:1114
#3  0xf0132a38 in log (level=-266027141, fmt=0x0)
    at ../../../../kern/subr_prf.c:217
#4  0xf01e6ced in trap (frame={tf_es = 16, tf_ds = 16, tf_edi = 12, 
      tf_esi = -251981360, tf_ebp = -131244980, tf_ebx = 0, 
      tf_edx = -131245016, tf_ecx = 0, tf_eax = -155095040, tf_trapno = 6, 
      tf_err = 0, tf_eip = -266556022, tf_cs = 8, tf_eflags = 66118, 
      tf_esp = -251981120, tf_ss = -131234200, tf_vm86_es = -131244872, 
      tf_vm86_ds = -267384501, tf_vm86_fs = 0, tf_vm86_gs = 11647025})
    at ../../../../arch/i386/i386/trap.c:309
#5  0xf0100cdd in calltrap ()
#6  0xf01cab29 in ufs_bmap (v=0xf82d5c88) at ../../../../ufs/ufs/ufs_bmap.c:85
#7  0xf01cefa3 in ufs_strategy (v=0xf82d5cb8) at ../../../../sys/vnode_if.h:802
#8  0xf014560b in bread (vp=0xf82d8668, blkno=12, size=8192, cred=0xffffffff, 
    bpp=0xf82d5d20) at ../../../../sys/vnode_if.h:1124
#9  0xf01c882b in lfs_mountfs (devvp=0xf82d859c, mp=0xf0581800, p=0xf82ba780)
    at ../../../../ufs/lfs/lfs_vfsops.c:461
can not access 0xefbfddd6, invalid translation (invalid PDE)
can not access 0xefbfddd6, invalid translation (invalid PDE)
can not access 0xefbfddd6, invalid translation (invalid PDE)
can not access 0xefbfddd6, invalid translation (invalid PDE)
#10 0xf01c82f5 in lfs_mount (mp=0xf0581800, 
    path=0xefbfddd6 <Address 0xefbfddd6 out of bounds>, data=0xefbfdca4, 
    ndp=0xf82d5e78, p=0xf82ba780) at ../../../../ufs/lfs/lfs_vfsops.c:292
#11 0xf014c63e in sys_mount (p=0xf82ba780, v=0xf82d5f88, retval=0xf82d5f80)
    at ../../../../kern/vfs_syscalls.c:315
#12 0xf01e72d9 in syscall (frame={tf_es = 31, tf_ds = 31, tf_edi = 1, 
      tf_esi = 2, tf_ebp = -272638700, tf_ebx = -272638506, tf_edx = 3, 
      tf_ecx = 134565888, tf_eax = 21, tf_trapno = 3, tf_err = 2, 
      tf_eip = 134515443, tf_cs = 23, tf_eflags = 514, tf_esp = -272638848, 
      tf_ss = 31, tf_vm86_es = 0, tf_vm86_ds = 0, tf_vm86_fs = 0, 
      tf_vm86_gs = 0}) at ../../../../arch/i386/i386/trap.c:760
#13 0xf0100d89 in syscall1 ()
can not access 0xefbfdd14, invalid translation (invalid PDE)
can not access 0xefbfdd14, invalid translation (invalid PDE)

This LFS wasn't in heavy use when the freeze happend (it contains just my
homedir and some ohter data, the machine was compiling something on a NFS
filesystem when it suddenly froze), it was freshly newfs_fs'd because this
has happend before two times.
In all of these cases a fsck -n just shows one "UNREF FILE" and dump_lfs
was able to read the partition.

The LFS looks like this:
  g: 14222680  3627320     4.4LFS     1024  8192     7   # (Cyl. 1711 - 8419*)
"1024, 8192, 7" are the "reasonable values" sugested in the newfs_lfs manpage.

The newfs_lfs command prints everytime a message I don't remember right now,
but it didn't look like a warning (something about "using n indirect blocks
for indode m", n,m=0 or 1).

>How-To-Repeat:
Crash a NetBSD-current machine with an LFS?
>Fix:
>Audit-Trail:
>Unformatted: