NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/60746: kernel diagnostic assertion "ino >= LFS_IFILE_INUM" failed: file "../../../../ufs/lfs/lfs_vfsops.c", line 1800



The following reply was made to PR kern/60746; it has been noted by GNATS.

From: Shinichi Doyashiki <clare%csel.org@localhost>
To: gnats-bugs%netbsd.org@localhost, Konrad Schroder <perseant%hhhh.org@localhost>
Cc: 
Subject:  Re: kern/60746: kernel diagnostic assertion "ino >= LFS_IFILE_INUM" failed:
 file "../../../../ufs/lfs/lfs_vfsops.c", line 1800
Date: Tue, 22 Sep 2026 11:33:42 +0900

 > >   [  65.9236610] panic: kernel diagnostic assertion "(ino >= LFS_IFILE_INUM)" failed: file "../../../../ufs/lfs/lfs_kclean.c", line 619 nonpositive inum: 0 at offset 0x8bd (seg 34)
 > 
 > Oh, I missed the obvious.  Those inode blocks are padded with zero and 
 > should ignore the appearance of inode zero.  It will still panic, 
 > however, at the FNFO with inode zero, which is more interesting.  Please 
 > try this patch instead (also attached) and give me the dumplfs of that 
 > segment:
 
 after replaced the patch with yours, I got following result.
 
 ===> MOUNT 31
 ===> GOOD mount
 1+0 records in
 1+0 records out
 1048576 bytes transferred in 0.008 secs (131072000 bytes/sec)
 [  81.0289078] panic: kernel diagnostic assertion "(lfs_fi_getnblocks(fs, fip) > 0 && ino >= LFS_IFILE_INUM)" failed: file "../../../../ufs/lfs/lfs_kclean.c", line 669 bad FINFO count=0 inum=0 at offset 0xb4 (seg 2)
 
 [  81.0489068] cpu1: Begin traceback...
 [  81.0489068] vpanic() at netbsd:vpanic+0x171
 [  81.0589090] kern_assert() at netbsd:kern_assert+0x4b
 [  81.0589090] finfo_func_checkempty() at netbsd:finfo_func_checkempty+0x2c5
 [  81.0689086] lfs_parse_pseg() at netbsd:lfs_parse_pseg+0x398
 [  81.0789060] lfs_checkempty() at netbsd:lfs_checkempty+0xec
 [  81.0789060] lfs_markclean() at netbsd:lfs_markclean+0x3e
 [  81.0889058] lfs_auto_segclean() at netbsd:lfs_auto_segclean+0x22a
 [  81.0989057] lfs_segunlock() at netbsd:lfs_segunlock+0x760
 [  81.0989057] lfs_segwrite() at netbsd:lfs_segwrite+0x531
 [  81.1089056] lfs_sync() at netbsd:lfs_sync+0xc6
 [  81.1089056] VFS_SYNC() at netbsd:VFS_SYNC+0x22
 [  81.1189055] do_sys_sync() at netbsd:do_sys_sync+0x65
 [  81.1189055] sys_sync() at netbsd:sys_sync+0x9
 [  81.1289054] syscall() at netbsd:syscall+0x9d
 [  81.1289054] --- syscall (number 36) ---
 [  81.1389054] netbsd:syscall+0x9d:
 [  81.1389054] cpu1: End traceback...
 
 # dumplfs -s 2 /dev/rdk4
 Master LFS32 superblock at 0x10:
     magic    0x70162     version  0x2         size     65536     
     ssize    32768       dsize    58784       bsize    1024      
     fsize    512         frag     2           ibsize   512       
     inopb    4           ifpb     51          nindir   256       
     nseg     1023        sepb     42          cleansz  1         
     segtabsz 25          segmask  0x0         segshift 0         
     bmask    0x3ff       bshift   10          ffmask   0x1FF     
     ffshift  9           fbmask   0x1         fbshift  1
     sushift  0           fsbtodb  0           cksum    0xfe8e    
     nclean   966         dmeta    319         minfreeseg 102       
     roll_id  0x76aa3189  interleave 0         sumsize  512       
     minfree  10          seg0addr 0           maxfilesize  0x404043000
   Superblock disk addresses:
      0x10       0x1980     0x3300     0x4c80     0x6600     0x7f80    
      0x9900     0xb280     0xcc00     0xe580    
   Checkpoint Info
     freehd   3           idaddr   0xd1      
     uinodes  0           bfree    58394       avail    58462     
     nfiles   0           lastseg  0x80        nextseg  0x100     
     curseg   0xc0        offset   0xd2        serial   1228      
     tstamp   Tue Sep 22 11:25:46 2026
   32-bit only derived or constant fields
     ifile    1         
 
 IFILE inode
     mode  o100600       nlink 1 uid   0 gid   0 size  27648
     atime Thu Jan  1 09:00:00 1970
     mtime Tue Sep 22 11:25:45 2026
     ctime Tue Sep 22 11:25:14 2026
     inum  1     nblocks  56
     Direct Addresses
         0xc1    0xcf    0x225a  0x2ada  0x3362  0x4460
         0x4cf2  0x5578  0x5dfa  0x6f1a  0x779c  0x8030
     Indirect Addresses
         0xcb    0x0     0x0
 
 IFILE contents
 free_head 3
 free_tail 50
 clean   966     dirty   57
 bfree   58398   avail   58468
 
 
 SEGMENT 2 (Disk Address 0x80)
 Segment Summary Info at 0x80
     next     0xc0       nfinfo   1      ninos    3      flags    D---
     sumsum   0x509e     datasum  0x8d32 create   Tue Sep 22 11:25:45 2026
     roll_id  76aa3189   serial   1222
     Inode addresses:
         0x9d {3v30, 2v1, 3v30}
     FINFO for inode: 3 version 30 nblocks 14 lastlength 1024
         1015    1016    1017    1018    1019    1020    1021    1022
         1023    -780    -524    -268    -12     -269
 Segment Summary Info at 0x9e
     next     0xc0       nfinfo   1      ninos    1      flags    D---
     sumsum   0xa9fc     datasum  0x769a create   Tue Sep 22 11:25:45 2026
     roll_id  76aa3189   serial   1223
     Inode addresses:
         0xab {1v1}
     FINFO for inode: 1 version 1 nblocks 6 lastlength 1024
         0       1       24      25      26      -12
 Segment Summary Info at 0xac
     next     0xc0       nfinfo   1      ninos    3      flags    D---
     sumsum   0x9895     datasum  0x41ed create   Tue Sep 22 11:25:45 2026
     roll_id  76aa3189   serial   1224
     Inode addresses:
         0xae {2v1, 3v30, 2v1}
     FINFO for inode: 2 version 1 nblocks 1 lastlength 512
         0
 Segment Summary Info at 0xaf
     next     0xc0       nfinfo   1      ninos    1      flags    D---
     sumsum   0xd589     datasum  0xaf8  create   Tue Sep 22 11:25:45 2026
     roll_id  76aa3189   serial   1225
     Inode addresses:
         0xbc {1v1}
     FINFO for inode: 1 version 1 nblocks 6 lastlength 1024
         0       1       23      24      26      -12
 Segment Summary Info at 0xbd
     next     0xc0       nfinfo   1      ninos    0      flags    ----
     sumsum   0xdfd7     datasum  0x0    create   Tue Sep 22 11:25:45 2026
     roll_id  76aa3189   serial   1226
     Inode addresses:
     FINFO for inode: 1 version 1 nblocks 1 lastlength 1024
         1
 
 # fsck_lfs -nf /dev/rdk4
 ** /dev/rdk4 (NO WRITE)
 ** Newer checkpoint verified; recovered 0 seconds of data
 ** Last Mounted on /testlfs
 ** Phase 0 - Check Inode Free List
 ** Phase 1 - Check Blocks and Sizes
 ** Phase 2 - Check Pathnames
 ** Phase 3 - Check Connectivity
 ** Phase 4 - Check Reference Counts
 ** Phase 5 - Check Segment Block Accounting
 3 files, 2115 used, 56298 free
 
 
 



Home | Main Index | Thread Index | Old Index