Recently I had a Yaffs2 crash issue. It crashed in yaffs_AddObjectToDirectory. I ran stress test with a tool, fsstress, on Yaffs2. The steps I used is listed below: 1. Run fsstress to test any file operations on Yaffs2. 2. Reset device suddenly. 3. Repeat step 1, and step2 After the test, I found a device eventually failed to reboot successfully, since it crashed in yaffs_AddObjectToDirectory. The dmesg log is listed at the bottom: The issue is very similiar to the message posted in http://wookware.org/lurker/message/20100616.085237.b6e6828b.ca.html It looks like a reused objectID. Do you have any idea about this issue? === [ 8.955538] yaffs tragedy: Bad object type, 1 != 3, for object 3393 at chunk 45610 during scan [ 9.080778] yaffs tragedy: Bad object type, 5 != 3, for object 2974 at chunk 3361 during scan [ 9.163457] yaffs tragedy: Bad object type, 2 != 1, for object 1027 at chunk 19061 during scan [ 9.230557] yaffs tragedy: Bad object type, 2 != 1, for object 2513 at chunk 70993 during scan [ 11.468155] yaffs tragedy: Bad object type, 3 != 1, for object 1042 at chunk 73977 during scan [ 11.477791] Unable to handle kernel paging request at virtual address 00100004 [ 11.485771] pgd = df01c000 [ 11.488747] [00100004] *pgd=3f002031, *pte=00000000, *ppte=00000000 [ 11.495687] Exception!!! will Oops [ 11.499434] Internal error: Oops: 817 [#1] PREEMPT [ 11.504714] last sysfs file: /sys/devices/i2c-1/i2c-dev/i2c-1/uevent [ 11.511714] Modules linked in: [ 11.515084] CPU: 0 Not tainted (2.6.32.9-perf #7) [ 11.520670] PC is at yaffs_AddObjectToDirectory+0x84/0xf4 [ 11.526620] LR is at yaffs_AddObjectToDirectory+0x70/0xf4 [ 11.532570] pc : [] lr : [] psr: 40000013 [ 11.532577] sp : df825d60 ip : 00000412 fp : df1987c0 [ 11.545226] r10: 00000000 r9 : df0e2410 r8 : 00000038 [ 11.550978] r7 : 00000483 r6 : 00000000 r5 : df1987c0 r4 : df1b4e88 [ 11.558171] r3 : df198828 r2 : 00100000 r1 : df1b4ea8 r0 : df0d8174 [ 11.565366] Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 11.573231] Control: 10c5787d Table: 3f01c019 DAC: 00000015 [ 11.579559] [ 11.579562] PC: 0xc019281c: [ 11.584258] 281c e2505000 e1a04001 1a000005 e59f00d0 eb0a3d3d e59f00cc e3011ae0 e8bd4070 [ 11.593324] 283c ea0a3d39 e5953064 e3530003 0a000004 e59f00b4 eb0a3d34 e59f00a8 e3011ae8 [ 11.602390] 285c eb0a3d31 e5943024 e3530000 1a000002 e59f0090 e3011aed eb0a3d2b e1a00005 [ 11.611460] 287c ebffffa0 e1a00004 ebffffc9 e5952068 e1a03005 e2841020 e5a31068 e5843024 [ 11.620525] 289c e5821004 e5943008 e5842020 e584501c e5932e38 e1550002 0a000002 e5933e3c [ 11.629588] 28bc e1550003 1a000009 e5943008 e5d42000 e3822004 e5c42000 e5932e48 e2822001 [ 11.638660] 28dc e5832e48 e5d43000 e7c4321f e5c43000 e1a00005 ebffff83 e1a00004 e8bd4070 [ 11.647729] 28fc eaffff45 c05579e9 c05571f9 c0557a2a e92d4ff8 e1a04000 e1a05001 e1a06002 [ 11.656799] [ 11.656802] LR: 0xc0192808: [ 11.661505] 2808 e584201c e5843024 e8bd4070 eaffffba e92d4070 e2505000 e1a04001 1a000005 [ 11.670572] 2828 e59f00d0 eb0a3d3d e59f00cc e3011ae0 e8bd4070 ea0a3d39 e5953064 e3530003 [ 11.679638] 2848 0a000004 e59f00b4 eb0a3d34 e59f00a8 e3011ae8 eb0a3d31 e5943024 e3530000 [ 11.688703] 2868 1a000002 e59f0090 e3011aed eb0a3d2b e1a00005 ebffffa0 e1a00004 ebffffc9 [ 11.697773] 2888 e5952068 e1a03005 e2841020 e5a31068 e5843024 e5821004 e5943008 e5842020 [ 11.706837] 28a8 e584501c e5932e38 e1550002 0a000002 e5933e3c e1550003 1a000009 e5943008 [ 11.715909] 28c8 e5d42000 e3822004 e5c42000 e5932e48 e2822001 e5832e48 e5d43000 e7c4321f [ 11.724976] 28e8 e5c43000 e1a00005 ebffff83 e1a00004 e8bd4070 eaffff45 c05579e9 c05571f9 [ 11.734044] [ 11.734047] SP: 0xdf825ce0: [ 11.738740] 5ce0 ffffffff 20000013 00000000 df0ba000 df825db0 000120f8 ffffffff c0030a58 [ 11.747801] 5d00 df825d60 ffffffff df825d4c 00000000 00000483 c0030a78 df0d8174 df1b4ea8 [ 11.756864] 5d20 00100000 df198828 df1b4e88 df1987c0 00000000 00000483 00000038 df0e2410 [ 11.765928] 5d40 00000000 df1987c0 00000412 df825d60 c0192888 c019289c 40000013 ffffffff [ 11.774992] 5d60 df0ba000 df1b4e88 00000000 c01993fc 000120f9 00000000 00000000 00000000 [ 11.784069] 5d80 df1adf7c df055000 df0e4000 00000000 0000020e df0ba000 df0e5074 00000000 [ 11.793129] 5da0 00000482 df0e0000 00000800 00000000 aaaaaaaa 00000001 00000795 00000000 [ 11.802201] 5dc0 00000000 00000001 00000000 00000000 00000000 de00020b 00000001 00000412 [ 11.811260] [ 11.811263] FP: 0xdf198740: [ 11.815966] 8740 df16a318 00000030 00000000 df0ba000 df193000 df1a2b28 df198758 df198758 [ 11.825031] 8760 df0d8174 df198574 df198db0 00000000 0000003e 00000443 00000000 00000000 [ 11.834099] 8780 00000000 00000000 00000000 00000000 00000000 48cbf45c 48cbf45c 48cbf45c [ 11.843166] 87a0 00000000 00000000 00000001 000bb000 000bb000 ffffffff 00000002 df16a144 [ 11.852229] 87c0 000001b0 00000000 df0ba000 df189e90 df1b4940 df1987d4 df1987d4 df1b4e0c [ 11.861292] 87e0 df1b4e74 df1b4e74 000120f9 0000001a 00000412 00000000 00000000 00000000 [ 11.870352] 8800 00000000 00000000 00000000 00000000 48cbf45c 48cbf45c 48cbf45c 00000000 [ 11.879429] 8820 00000000 00000003 df1b4ea8 00100000 ffffffff 00000002 df16a1f8 000001b0 [ 11.888498] [ 11.888501] R0: 0xdf0d80f4: [ 11.893209] 80f4 00000000 00000088 00000000 df0ba000 df0ba1d8 df0da460 df0d810c df0d810c [ 11.902278] 8114 00000000 df0d8118 df0d8118 00002def 00000000 00000001 000041f9 00000000 [ 11.911351] 8134 00000000 00000000 00000000 000003e8 000003e8 4c90ffb2 49473462 494735d9 [ 11.920410] 8154 00000000 00000000 00000003 df1b4400 df0d8194 00000000 00000000 00000000 [ 11.929487] 8174 00000088 00000000 df0ba000 df0ba1e4 df0f94e0 df0d8188 df0d8188 df0d80f8 [ 11.938557] 8194 df0d8160 df1025e8 00002df6 00000000 00000002 000041f8 00000000 00000000 [ 11.947628] 81b4 00000000 00000000 00000000 00000000 494150a8 494150a8 494735d9 00000000 [ 11.956695] 81d4 00000000 00000003 df1b4e2c df0d8400 00000000 00000000 00000000 000001b0 [ 11.965761] [ 11.965764] R1: 0xdf1b4e28: [ 11.970469] 4e28 df0d8174 df1b4c3c df0d81dc 00000000 00000000 0000040c 00000000 00000000 [ 11.979538] 4e48 00000000 00000000 00000000 00000000 00000000 48cbf45f 48cbf45f 48cbf45f [ 11.988603] 4e68 00000000 00000000 00000003 df1987e0 df1987e0 00000000 00000000 00000000 [ 11.997666] 4e88 000001b0 00000000 df0ba000 df1a5844 df0ba8c8 df1b4e9c df1b4e9c 00000000 [ 12.006726] 4ea8 df1b4ea8 df198828 000120f8 00000000 00000795 00000000 00000000 00000000 [ 12.015793] 4ec8 00000000 00000000 00000000 00000000 48cbf45f 48cbf45f 48cbf45f 00000000 [ 12.024853] 4ee8 00000000 00000005 00000000 00000000 00000000 00000000 00000000 fffffdff [ 12.033920] 4f08 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff df1b4f80 [ 12.042986] [ 12.042989] R3: 0xdf1987a8: [ 12.047691] 87a8 00000001 000bb000 000bb000 ffffffff 00000002 df16a144 000001b0 00000000 [ 12.056765] 87c8 df0ba000 df189e90 df1b4940 df1987d4 df1987d4 df1b4e0c df1b4e74 df1b4e74 [ 12.065835] 87e8 000120f9 0000001a 00000412 00000000 00000000 00000000 00000000 00000000 [ 12.074888] 8808 00000000 00000000 48cbf45c 48cbf45c 48cbf45c 00000000 00000000 00000003 [ 12.083961] 8828 df1b4ea8 00100000 ffffffff 00000002 df16a1f8 000001b0 00000000 df0ba000 [ 12.093032] 8848 df195c24 df1a26cc df198850 df198850 df0d8934 df19847c df199114 0000ad06 [ 12.102094] 8868 00000004 00001452 00000000 00000000 00000000 00000000 00000000 00000000 [ 12.111158] 8888 00000000 48cbf45c 48cbf45c 48cbf45c 00000000 00000000 00000001 00001dc2 [ 12.120221] [ 12.120224] R4: 0xdf1b4e08: [ 12.124923] 4e08 df17957c 00000030 00000000 df0ba000 df199084 df0ba25c df1b4e20 df1b4e20 [ 12.133989] 4e28 df0d8174 df1b4c3c df0d81dc 00000000 00000000 0000040c 00000000 00000000 [ 12.143061] 4e48 00000000 00000000 00000000 00000000 00000000 48cbf45f 48cbf45f 48cbf45f [ 12.152138] 4e68 00000000 00000000 00000003 df1987e0 df1987e0 00000000 00000000 00000000 [ 12.161210] 4e88 000001b0 00000000 df0ba000 df1a5844 df0ba8c8 df1b4e9c df1b4e9c 00000000 [ 12.170283] 4ea8 df1b4ea8 df198828 000120f8 00000000 00000795 00000000 00000000 00000000 [ 12.179348] 4ec8 00000000 00000000 00000000 00000000 48cbf45f 48cbf45f 48cbf45f 00000000 [ 12.188406] 4ee8 00000000 00000005 00000000 00000000 00000000 00000000 00000000 fffffdff [ 12.197479] [ 12.197482] R5: 0xdf198740: [ 12.202185] 8740 df16a318 00000030 00000000 df0ba000 df193000 df1a2b28 df198758 df198758 [ 12.211261] 8760 df0d8174 df198574 df198db0 00000000 0000003e 00000443 00000000 00000000 [ 12.220336] 8780 00000000 00000000 00000000 00000000 00000000 48cbf45c 48cbf45c 48cbf45c [ 12.229395] 87a0 00000000 00000000 00000001 000bb000 000bb000 ffffffff 00000002 df16a144 [ 12.238455] 87c0 000001b0 00000000 df0ba000 df189e90 df1b4940 df1987d4 df1987d4 df1b4e0c [ 12.247516] 87e0 df1b4e74 df1b4e74 000120f9 0000001a 00000412 00000000 00000000 00000000 [ 12.256580] 8800 00000000 00000000 00000000 00000000 48cbf45c 48cbf45c 48cbf45c 00000000 [ 12.265651] 8820 00000000 00000003 df1b4ea8 00100000 ffffffff 00000002 df16a1f8 000001b0 [ 12.274725] [ 12.274728] R9: 0xdf0e2390: [ 12.279422] 2390 00200000 de0001f4 00200000 de000147 00200000 ddfffffc 4050f000 000470d1 [ 12.288485] 23b0 00200000 de0000ef 00200000 de000148 00200000 de0001be 00200000 de000149 [ 12.297549] 23d0 00510000 00046f5d 4050a800 00047454 00510000 00047620 00510000 0004754c [ 12.306610] 23f0 00510000 00047654 00200000 de0001d4 00200000 de000022 00200000 de00011f [ 12.315682] 2410 00201000 de00020b 00510000 00046fe2 00200000 de00009a 00200000 de00009b [ 12.324746] 2430 00200000 de000059 00510000 00047260 00510000 00046fb3 0050fc00 0004738b [ 12.333813] 2450 00200000 de0001f5 00510000 00047261 00200000 de000120 00510000 000472d6 [ 12.342879] 2470 0050fc00 00047341 4050d800 00046ef2 00200000 de0000f0 00200000 de00005a [ 12.351948] Process init (pid: 1, stack limit = 0xdf8242e8) [ 12.358082] Stack: (0xdf825d60 to 0xdf826000) [ 12.362885] 5d60: df0ba000 df1b4e88 00000000 c01993fc 000120f9 00000000 00000000 00000000 [ 12.371905] 5d80: df1adf7c df055000 df0e4000 00000000 0000020e df0ba000 df0e5074 00000000 [ 12.380921] 5da0: 00000482 df0e0000 00000800 00000000 aaaaaaaa 00000001 00000795 00000000 [ 12.389935] 5dc0: 00000000 00000001 00000000 00000000 00000000 de00020b 00000001 00000412 [ 12.398946] 5de0: 00000000 00000000 00000005 00000000 00000000 55555555 0000f348 00000002 [ 12.407963] 5e00: 60000013 df0ba000 c06139dc dfbf8000 00000001 df0ba0e0 df825f48 c018f9d8 [ 12.416982] 5e20: dfbfc700 c018fc64 df825e38 df825e3c df824000 6264746d 6b636f6c 00000036 [ 12.426001] 5e40: ffffffff 0000000a ffffffff ffffffff dfbf8000 df825eb0 00000000 00000000 [ 12.435018] 5e60: 00000000 00000000 00000000 00000000 dfbfc700 c01d2ea4 df825eb0 df825e8c [ 12.444032] 5e80: c053fc42 00000009 df402640 00000003 00000000 df4026d0 dfbf8000 df825f48 [ 12.453049] 5ea0: 00000000 c018fea8 df402640 c00f45a4 6264746d 6b636f6c 00000036 00000015 [ 12.462070] 5ec0: dfbfc6a0 df80ef00 00000000 df087ea0 df087ea0 df80eea0 c0613aa0 dfbfc6a0 [ 12.471088] 5ee0: 00000000 00000000 00000000 c018ddac c018fe8c df80eea0 dfbfc6a0 c00f324c [ 12.480108] 5f00: df80eea0 00000000 c0613aa0 dfbfc700 00000000 dfbfc6a0 00000000 c00f3314 [ 12.489124] 5f20: 00000000 00000023 00000006 dfbfc6a0 00000000 c010a4d4 be867dbc df824000 [ 12.498146] 5f40: c0031208 dfbfc6a0 df80e7a0 df457540 dfbfc6a0 df8cc000 be867dbc 00000000 [ 12.507165] 5f60: 00000006 c0031208 df824000 00000000 00000000 c010a5d8 00000000 c00efc1c [ 12.516182] 5f80: 00000005 00000000 dfbfc6a0 dfbfc700 00066238 00000000 0f9750b3 00066238 [ 12.525197] 5fa0: 00000015 c0031040 00000000 0f9750b3 be867dbc 0006130a 000612f6 00000006 [ 12.534216] 5fc0: 00000000 0f9750b3 00066238 00000015 00000000 00000000 00000000 00000000 [ 12.543232] 5fe0: be867d00 be867cf0 0000879d 0000d5e4 60000010 be867dbc 00000000 00000000 [ 12.552262] [] (yaffs_AddObjectToDirectory+0x84/0xf4) from [] (yaffs_GutsInitialise+0x11a8/0x1618) [ 12.564064] [] (yaffs_GutsInitialise+0x11a8/0x1618) from [] (yaffs_internal_read_super+0x7d8/0xa00) [ 12.575957] [] (yaffs_internal_read_super+0x7d8/0xa00) from [] (yaffs2_internal_read_super_mtd+0x1c/0x2c) [ 12.588426] [] (yaffs2_internal_read_super_mtd+0x1c/0x2c) from [] (get_sb_bdev+0x114/0x170) [ 12.599556] [] (get_sb_bdev+0x114/0x170) from [] (yaffs2_read_super+0x18/0x20) [ 12.609444] [] (yaffs2_read_super+0x18/0x20) from [] (vfs_kern_mount+0x4c/0xd0) [ 12.619419] [] (vfs_kern_mount+0x4c/0xd0) from [] (do_kern_mount+0x34/0xd8) [ 12.629019] [] (do_kern_mount+0x34/0xd8) from [] (do_mount+0x684/0x704) [ 12.638231] [] (do_mount+0x684/0x704) from [] (sys_mount+0x84/0xc4) [ 12.647069] [] (sys_mount+0x84/0xc4) from [] (ret_fast_syscall+0x0/0x38) [ 12.656378] Code: e1a03005 e2841020 e5a31068 e5843024 (e5821004) [ 12.663229] ---[ end trace f963764a26b9d88f ]--- [ 12.668334] kevent_trigger: queue event work [ 12.673420] kevent_work: send kobject uevent, EVENT=Oops [ 12.679632] init used greatest stack depth: 4760 bytes left [ 12.685827] Kernel panic - not syncing: Attempted to kill init! [ 12.692398] [] (unwind_backtrace+0x0/0xd8) from [] (panic+0x48/0x118) [ 12.701452] [] (panic+0x48/0x118) from [] (do_exit+0x70/0x6dc) [ 12.709827] [] (do_exit+0x70/0x6dc) from [] (die+0x190/0x1c0) [ 12.718102] [] (die+0x190/0x1c0) from [] (__do_kernel_fault+0x64/0x74) [ 12.727240] [] (__do_kernel_fault+0x64/0x74) from [] (do_page_fault+0x1d4/0x1ec) [ 12.737338] [] (do_page_fault+0x1d4/0x1ec) from [] (do_DataAbort+0x34/0x94) [ 12.746955] [] (do_DataAbort+0x34/0x94) from [] (__dabt_svc+0x58/0x80) [ 12.756087] Exception stack(0xdf825d18 to 0xdf825d60) [ 12.761655] 5d00: df0d8174 df1b4ea8 [ 12.770697] 5d20: 00100000 df198828 df1b4e88 df1987c0 00000000 00000483 00000038 df0e2410 [ 12.779734] 5d40: 00000000 df1987c0 00000412 df825d60 c0192888 c019289c 40000013 ffffffff [ 12.788779] [] (__dabt_svc+0x58/0x80) from [] (yaffs_AddObjectToDirectory+0x84/0xf4) [ 12.799252] [] (yaffs_AddObjectToDirectory+0x84/0xf4) from [] (yaffs_GutsInitialise+0x11a8/0x1618) [ 12.811066] [] (yaffs_GutsInitialise+0x11a8/0x1618) from [] (yaffs_internal_read_super+0x7d8/0xa00) [ 12.822974] [] (yaffs_internal_read_super+0x7d8/0xa00) from [] (yaffs2_internal_read_super_mtd+0x1c/0x2c) [ 12.835462] [] (yaffs2_internal_read_super_mtd+0x1c/0x2c) from [] (get_sb_bdev+0x114/0x170) [ 12.846598] [] (get_sb_bdev+0x114/0x170) from [] (yaffs2_read_super+0x18/0x20) [ 12.856507] [] (yaffs2_read_super+0x18/0x20) from [] (vfs_kern_mount+0x4c/0xd0) [ 12.866494] [] (vfs_kern_mount+0x4c/0xd0) from [] (do_kern_mount+0x34/0xd8) [ 12.876104] [] (do_kern_mount+0x34/0xd8) from [] (do_mount+0x684/0x704) [ 12.885332] [] (do_mount+0x684/0x704) from [] (sys_mount+0x84/0xc4) [ 12.894163] [] (sys_mount+0x84/0xc4) from [] (ret_fast_syscall+0x0/0x38) ===