Subject: Re: netbsd-4 LFS problems
To: NetBSD Current Users <current-users@netbsd.org>
From: Chris Ross <cross+netbsd@distal.com>
List: current-users
Date: 07/05/2007 15:31:04
On Jul 5, 2007, at 10:48, Chris Ross wrote:
>   I have a netbsd-4 i386 machine, MP.  Running code that's only a  
> week or two old.  Last night, I got the following panic on this  
> machine:
>
> panic: kernel diagnostic assertion "vp != NULL" failed: file "/data/ 
> NetBSD/src-4/sys/ufs/lfs/lfs_segment.c", line 1574

   Okay.  I looked into this a little.  This is relatively near the  
top of lfs_updatemeta(), and it's failing to assert that there's a  
non-null vnode pointer in the "struct segment" passed in.  The struct  
segment passed in is:

$3 = {fs = 0xc1d7b800, bpp = 0xcf895bc8, cbpp = 0xcf895bd8,
   start_bpp = 0xcf895bd8, ibp = 0xcf2d8ad8, idp = 0x0, fip =  
0xc2384c4c,
   vp = 0x0, segsum = 0xc2384c00, ninodes = 3, seg_bytes_left = 129024,
   sum_bytes_left = 912, seg_number = 9629, start_lbp = 0xc2384c5c,
   seg_flags = 5, seg_iocount = 0, ndupino = 0}

  and looking at the other variable that's pulled out of here at the  
same point at the top of lfs_updatemeta(), nblocks ends up being 0.   
Immediately after the assert that failed, there's:

            if (nblocks == 0)
                    return;

   So, the question to people who know LFS and/or filesystems much  
better that I is, is it reasonable for the vnode pointer to be NULL  
if it decides that there are 0 blocks to be updated?

   Thanks.  Let me know if you'd like anything else from the crash  
dump...

                   - Chris