Subject: kern/32101: netbsd-3 kernel panics on netbsd-2 lfs v2
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: netbsd-bugs
Date: 11/17/2005 22:29:00
>Number:         32101
>Category:       kern
>Synopsis:       netbsd-3 kernel panics on netbsd-2 lfs v2
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 17 22:29:00 +0000 2005
>Originator:     Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
>Release:        NetBSD 3.0_RC1
>Organization:
Mahlzeit!
>Environment:
	
	
Kernel: NetBSD 3.0_RC1 (CHARCOAL) #5: Thu Nov 17 20:57:01 CET 2005
        hauke@quiche:/usr/src/sys/arch/i386/compile/CHARCOAL
System: NetBSD charcoal 2.0 NetBSD 2.0 (GENERIC_LAPTOP) #1: Thu Dec 2 14:59:45 CET 2004 hf@heiligenberg:/var/obj/netbsd-builds/2_0/i386/sys/arch/i386/compile/GENERIC_LAPTOP i386
Architecture: i386
Machine: i386


>Description:
	A netbsd-3 kernel booted on a netbsd-2 system panics while
	going multi-user on an lfs v2 root filesystem.

NetBSD 3.0_RC1 (CHARCOAL) #5: Thu Nov 17 20:57:01 CET 2005
        hauke@quiche:/usr/src/sys/arch/i386/compile/CHARCOAL
total memory = 81532 KB
avail memory = 76248 KB

[...]

mountroot: trying lfs...
lfs_mountfs: inode part of ifile of length 1294336 cannot fit in 215040 bytes
lfs_mountfs: please consider increasing BUFPAGES to at least 1304
root file system type: lfs

[...]

Starting syslogd.
panic: kernel diagnostic assertion "!ISSET(bp->b_flags, B_CALL)" failed: file ".
./../../../kern/vfs_bio.c", line 891
Stopped in pid 209.1 (syslogd) at       netbsd:cpu_Debugger+0x4: leave
db> t
cpu_Debugger(0,0,0,c061c788,0) at netbsd:cpu_Debugger+0x4
panic(c0399ec0,c03529c2,c035c0ad,c035c001,37b) at netbsd:panic+0x11d
__qdivrem(c03529c2,c035c001,37b,c035c0ad,0) at netbsd:__qdivrem
brelse(c061c788,2,c7737b4c,c02a955d,c05eae00) at netbsd:brelse+0x179
lfs_bwrite_ext(c061c788,0,c7737c0c,246,c061c788) at netbsd:lfs_bwrite_ext+0xab
lfs_bwrite(c7737bdc,c061c788,c7737bf0,282,c0562074) at netbsd:lfs_bwrite+0x33
lfs_gop_write(c7a87000,c7737c24,2000,81,c0561c00) at netbsd:lfs_gop_write+0x881
genfs_putpages(c7737e84,0,0,1,d1) at netbsd:genfs_putpages+0x9bc
lfs_putpages(c7737e84,c7737e5c,0,0,0) at netbsd:lfs_putpages+0x47b
lfs_fsync(c7737ef4,20002,9,c6dd63b8,0) at netbsd:lfs_fsync+0x95
sys_fsync(c6dcb948,c7737f64,c7737f5c,0,246) at netbsd:sys_fsync+0xd3
syscall_plain() at netbsd:syscall_plain+0x18f
--- syscall (number 95) ---
0xbdb46033:
db> reboot
syncing disks... panic: kernel diagnostic assertion "sp->vp == NULL" failed: file "../../../../ufs/lfs/lfs_segment.c", line 1132
Stopped in pid 209.1 (syslogd) at       netbsd:cpu_Debugger+0x4:        leave
db> reboot
ep0: adapter failure (ffff)
ep0: adapter failure (ffff)
rebooting...

[hauke@charcoal] ~ > dumplfs /dev/rwd0a | head
Master Superblock at 0x8:
    magic    0x70162     version  0x2         size     1587096
    ssize    419840      dsize    1507490     bsize    8192
    fsize    1024        frag     8           minfree  10
    inopb    8           ifpb     409         nindir   2048
    nseg     3870        sepb     341         cleansz  1
    segtabsz 12          segmask  0x0         segshift 0
    bmask    0x1fff      bshift   13          ffmask   0x3FF
    ffshift  10          fbmask   0x7         fbshift  3
    sushift  0           fsbtodb  1           cksum    0x8832


The panic is reproducible; I can provide a coredump and a filesystem
image, if needed.

>How-To-Repeat:
	In order to upgrade, boot netbsd-3 kernel on a netbsd-2 system
	with lfs root filesystem.

>Fix:
	None known.

>Unformatted: