Kernel 2.6.29-rc7 Yaffs cvs 05/03/2009 Samsung Nand 256MB hw: Balloon3 board I have a recurring set of segfaults with 2.6.29-rc7 and yaffs 05/03/09 whilst trying to recover from a large failure. I have just moved up from 2.6.25.2 (with checkpointed root partition yaffs cvs 05/03/09 with 7 bad blocks) to 2.6.29-rc7. On the initial mounting several thousand errors were produced (yaffs cvs 03/03/09), I moved yaffs up to the 05/03/09 cvs version to be consistent but without any reduction in messages. Attempting to do rm -rf /mnt/root results in differing segfaults, the initial one logged below. The same applies when returning to 2.6.25.2 with yaffs 05/03/09. The partitions cannot be unmounted (busy) after the segfaults. I am able to do rm -rf and umount using a recovery initrd running 2.6.25.2 & yaffs cvs 13/12/07, returning to yaffs 05/03/09, either kernel, and executing rm -rf causes the same segfaults. I have logs I can email but too large for the ML limit. Initial bits of importance pasted below. Any advice gratefully appreciated, Jim before initial mounting: NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit) 4 NAND chips detected Scanning device for bad blocks Bad eraseblock 609 at 0x000004c20000 Bad eraseblock 612 at 0x000004c80000 Bad eraseblock 614 at 0x000004cc0000 Bad eraseblock 616 at 0x000004d00000 Bad eraseblock 911 at 0x0000071e0000 Bad eraseblock 6116 at 0x00002fc80000 Bad eraseblock 6491 at 0x000032b60000 cmdlinepart partition parsing not available Creating 2 MTD partitions on "balloon3-nand": 0x000000000000-0x000000400000 : "Boot" 0x000000400000-0x000040000000 : "Root fs" .... # mount /mnt/root yaffs: dev is 32505857 name is "mtdblock1" yaffs: passed flags "" yaffs: Attempting MTD mount on 31.1, "mtdblock1" uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <4>block 578 is bad block 581 is bad block 583 is bad block 585 is bad block 880 is bad block 6085 is bad block 6460 is bad uncorrectable error : <3>uncorrectable error : <4>nand_erase: attempt to erase a bad block at page 0x00001d80 nand_erase: attempt to erase a bad block at page 0x00001dc0 nand_erase: attempt to erase a bad block at page 0x00001e00 nand_erase: attempt to erase a bad block at page 0x00001e40 nand_erase: attempt to erase a bad block at page 0x00001e80 nand_erase: attempt to erase a bad block at page 0x00001ec0 nand_erase: attempt to erase a bad block at page 0x00001f00 nand_erase: attempt to erase a bad block at page 0x00001f40 nand_erase: attempt to erase a bad block at page 0x00001f80 uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncor **>> Block 8148 retired uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncord Partially written block 6876 detected Partially written block 6876 detected [..... large number of lines .....] !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!! yaffs tragedy: no more erased blocks !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!! uncorrectable error : <4>yaffs tragedy: no more erased blocks !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!! yaffs tragedy: no more erased blocks !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!! # umount /mnt/root save exit: isCheckpointed 0 save exit: isCheckpointed 0 After moving to 05/03/09 had same effect, decided to start logging details for ML submission .. # cat /proc/yaffs YAFFS built:Mar 13 2009 17:01:38 $Id: yaffs_fs.c,v 1.75 2009-03-05 01:45:28 charles Exp $ $Id: yaffs_guts.c,v 1.79 2009-03-05 01:45:28 charles Exp $ # mount /mnt/root yaffs: dev is 32505857 name is "mtdblock1" yaffs: passed flags "" yaffs: Attempting MTD mount on 31.1, "mtdblock1" uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <4>blockd block 85 is bad block 86 is bad [..... large number of lines .....] !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!! uncorrectable error : <3>uncorrectable error : <4>yaffs tragedy: no more erased blocks !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!! yaffs tragedy: no more erased blocks !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!! yaffs_read_super: isCheckpointed 0 # cat /proc/yaffs YAFFS built:Mar 13 2009 17:01:38 $Id: yaffs_fs.c,v 1.75 2009-03-05 01:45:28 charles Exp $ $Id: yaffs_guts.c,v 1.79 2009-03-05 01:45:28 charles Exp $ Device 0 "Root fs" startBlock......... 0 endBlock........... 8159 totalBytesPerChunk. 2048 nDataBytesPerChunk. 2048 chunkGroupBits..... 0 chunkGroupSize..... 1 nErasedBlocks...... 0 nReservedBlocks.... 5 blocksInCheckpoint. 0 nTnodesCreated..... 29900 nFreeTnodes........ 6715 nObjectsCreated.... 23400 nFreeObjects....... 5551 nFreeChunks........ 240983 nPageWrites........ 0 nPageReads......... 0 nBlockErasures..... 0 nGCCopies.......... 0 garbageCollections. 14640 passiveGCs......... 0 nRetriedWrites..... 0 nShortOpCaches..... 10 nRetireBlocks...... 0 eccFixed........... 0 eccUnfixed......... 0 tagsEccFixed....... 0 tagsEccUnfixed..... 0 cacheHits.......... 0 nDeletedFiles...... 2258 nUnlinkedFiles..... 7828 nBackgroudDeletions 0 useNANDECC......... 1 isYaffs2........... 1 inbandTags......... 0 # umount /mnt/root save exit: isCheckpointed 0 save exit: isCheckpointed 0 # mount /mnt/root yaffs: dev is 32505857 name is "mtdblock1" yaffs: passed flags "" yaffs: Attempting MTD mount on 31.1, "mtdblock1" block 84 is bad block 85 is bad [..... large number of lines .....] **>> Erasure failed 1930 **>> Block 1930 retired **>> Erasure failed 1935 **>> Block 1935 retired **>> yaffs write required 321 attempts yaffs_read_super: isCheckpointed 0 # # cat /proc/yaffs YAFFS built:Mar 13 2009 17:01:38 $Id: yaffs_fs.c,v 1.75 2009-03-05 01:45:28 charles Exp $ $Id: yaffs_guts.c,v 1.79 2009-03-05 01:45:28 charles Exp $ Device 0 "Root fs" startBlock......... 0 endBlock........... 8159 totalBytesPerChunk. 2048 nDataBytesPerChunk. 2048 chunkGroupBits..... 0 chunkGroupSize..... 1 nErasedBlocks...... 5371 nReservedBlocks.... 5 blocksInCheckpoint. 0 nTnodesCreated..... 1700 nFreeTnodes........ 364 nObjectsCreated.... 1100 nFreeObjects....... 360 nFreeChunks........ 385521 nPageWrites........ 0 nPageReads......... 0 nBlockErasures..... 0 nGCCopies.......... 0 garbageCollections. 324 passiveGCs......... 324 nRetriedWrites..... 0 nShortOpCaches..... 10 nRetireBlocks...... 0 eccFixed........... 0 eccUnfixed......... 0 tagsEccFixed....... 0 tagsEccUnfixed..... 0 cacheHits.......... 0 nDeletedFiles...... 5 nUnlinkedFiles..... 388 nBackgroudDeletions 0 useNANDECC......... 1 isYaffs2........... 1 inbandTags......... 0 # rm -rf /mnt/root uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncor **>> Block 1946 retired **>> Erasure failed 1950 **>> Block 1950 retired **>> Erasure failed 195 [..... large numbers of lines .....] yaffs: Block struck out **>> Block 3468 retired yaffs: Block struck out **>> Block 3469 retired **>> yaffs write required 8 attempts uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <3>uncor0 pgd = d7c10000 [00000030] *pgd=b7aee031, *pte=00000000, *ppte=00000000 Internal error: Oops: 17 [#1] Modules linked in: pxamci mmc_core i2c_pxa i2c_core g_ether pxa27x_udc ext2 vfat fat sd_mod usb_storage scsi_mod libusual pegasus dm9601 asix usbnet mii ohe CPU: 0 Not tainted (2.6.29-rc7-pxa270 #15) PC is at yaffs_GetObjectInode+0x10/0x18 LR is at yaffs_GetEquivalentObject+0x38/0x40 pc : [] lr : [] psr: 60000013 sp : d73e5de8 ip : d73e5dd0 fp : d73e5df4 r10: 00000002 r9 : d7c3289c r8 : 00000002 r7 : d7c327d8 r6 : 0000002d r5 : d7c327b8 r4 : 00000002 r3 : 00000004 r2 : d73e5e20 r1 : d73d0000 r0 : 00000000 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 0000397f Table: b7c10000 DAC: 00000015 Process rm (pid: 375, stack limit = 0xd73e4270) Stack: (0xd73e5de8 to 0xd73e6000) 5de0: d73e5f4c d73e5df8 c02a4574 c02a9648 00000001 00000000 5e00: 00000002 00000000 00000004 d73e5e40 c0245034 d73e5f78 d70b46e0 d73d0000 5e20: 30303030 30303030 30303030 30303030 30303030 30303030 30303030 30303030 5e40: 30303030 30303030 30303030 00000030 00000000 00000000 00000000 00000000 5e60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 5e80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 5ea0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 5ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 5ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 5f00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 5f20: d73e5f78 d70b46e0 00000000 d7468050 d73e5f78 c0245034 d73e4000 d74680bc 5f40: d73e5f74 d73e5f50 c0245308 c02a4364 00000000 be899bfc 00000f5d d70b46e0 5f60: c01ca72c 0090008d d73e5fa4 d73e5f78 c0245460 c0245288 be899c1c be899c0c 5f80: 00000f3d ffffffea 000950d0 000950b8 0000000c 0000008d 00000000 d73e5fa8 5fa0: c01c9f00 c02453f4 000950d0 000950b8 00000006 be899bfc 00000f5d 00000f60 5fc0: 000950d0 000950b8 0000000c 000950b8 00001000 be899bfc 4009dea4 be89ab90 5fe0: 4009dec8 be899bfc 4005a630 4005a65c 20000010 00000006 00000000 00000000 Backtrace: [] (yaffs_GetObjectInode+0x0/0x18) from [] (yaffs_readdir+0x21c/0x2fc) [] (yaffs_readdir+0x0/0x2fc) from [] (vfs_readdir+0x8c/0xac) [] (vfs_readdir+0x0/0xac) from [] (sys_getdents+0x78/0xb8) [] (sys_getdents+0x0/0xb8) from [] (ret_fast_syscall+0x0/0x2c) r7:0000008d r6:0000000c r5:000950b8 r4:000950d0 Code: e1a0c00d e92dd800 e24cb004 ebffffc8 (e5900030) ---[ end trace d82b342aa9882610 ]--- Segmentation fault All subsequent rm -rf and some umounts have segfaulted with differing errors that I assume are in part compounded by earlier failures.