[Yaffs] Re: power fail testing

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Sergei Sharonov
Date:  
To: yaffs
Subject: [Yaffs] Re: power fail testing
Hi,

> 2. Finally I got a message:
> nand_read_ecc: Failed ECC read, page 0x0002710e
> and after a power cycle verification application failed to verify data:
> read=0xec expected=0xe4
> Looks like one bit did not program from 1 to 0, but why didn't ecc catch it?
> I'll take a look at the rest of the file tomorrow..


OK, it is reproducible:
------------------------
verifier 0 started
nand_read_ecc: Failed ECC read, page 0x00004a77
nand_read_ecc: Failed ECC read, page 0x00004a77
instance 0 terminated with status -1
verifyBlock: verify failed,
instance=0 block=95488 blockSize=1024 position=578,
read=0xee expected=0xe6
------------------------

All messages except nand_read_ecc are produced by test application.
Application instance number = 0 (only one was run)
Data was written/verified in 1 kB blocks (nothing to do with "erase block")
Verify failed at position 578 of the block number 95488. I think it maps to the
physical NAND address 0x0094ee42. See nand dump below.

Looks like ECC fails for whatever is the reason and cannot correct
bit error. Makes sense?
Then the filesystem quitely returned bad data?!
BTW, "Failed ECC read" message is produced when nand_correct_data()
function fails.

Here is a failed page dump from mtd device:
# /mnt/nfs/nanddump -p -s 9760256 -l 32 /dev/mtd3

Block size 16384,
nand_read_ecc: Failed ECC read, page 0x00004a77
nand_read_ecc: Failed ECC read, page 0x00004a77
page size 512, OOB size 16
Dumping data starting at 0x0094ee00 and ending at 0x0094ee20...
0x0094ee00: f3 e3 d7 cc 96 e7 3b ad 86 cf ff 50 a8 30 78 86
0x0094ee10: 76 e9 7f 11 8a bf 8d ec 0b c8 c3 99 84 be 1f 77
0x0094ee20: a2 f6 43 38 dd 7e e5 63 4d e5 b3 f6 15 2c 7c 8b
0x0094ee30: 15 fc 9c 9f bb 29 8b c6 f1 4e 5f 75 0c 7e ec ae
0x0094ee40: 74 2f ee 51 ad cc b4 fb b1 68 f1 c6 94 6d 51 a9
0x0094ee50: 69 ed 48 24 17 d3 ea 08 21 4a 7e 2d c8 6a dc 3d
0x0094ee60: 9a c2 8e 47 8e 43 42 3f ab 33 05 3f a1 56 e8 0a
0x0094ee70: 44 30 2f 5b 03 19 63 24 63 e1 51 2c 4c 2d 69 e6
0x0094ee80: f0 f7 2d 7e 3a 70 be e5 a3 c3 24 44 1a 0c 4f 5e
0x0094ee90: 3c 7e b9 3f 97 1c 63 fb fe b5 27 4a e2 90 30 d2
0x0094eea0: 87 5d 51 c2 cd 0f a7 71 d2 cc b5 ec d8 04 4a 15
0x0094eeb0: 82 03 54 1a 20 b8 15 1e 6d 3c 68 4f cc 98 22 53
0x0094eec0: f5 73 15 c3 82 bd 34 54 89 e9 41 61 ee 8b 76 70
0x0094eed0: 8f cb 8a af 83 9f cd f0 db 35 3f a7 cd 61 fb c2
0x0094eee0: d4 10 85 56 cd b9 ab 56 a3 ec b8 91 77 2e 01 06
0x0094eef0: f9 8c b5 7c 2b 82 6e 07 b7 ac ae 84 0d a9 47 e2
0x0094ef00: ba cc 38 87 86 e3 de 29 cf 96 ba 47 c4 bb 4d be
0x0094ef10: 47 03 3a f3 85 a7 7a 3d 53 28 c1 60 d2 48 42 8c
0x0094ef20: d5 7b 13 5b 5e f1 84 2e 87 3e 75 4c f9 c2 0a 41
0x0094ef30: c5 44 b4 4b eb 2e 88 3e 56 49 9f 28 52 e1 b4 27
0x0094ef40: 5c c8 82 bb b9 06 e9 41 44 5e 8d 3d 20 97 7e e6
0x0094ef50: db 32 31 e7 70 b9 05 b7 02 a4 df 54 86 94 7b e2
0x0094ef60: 5c fd dd 15 03 86 56 47 e4 e3 85 05 7a 03 eb 56
0x0094ef70: 36 1c 1d 96 d5 22 4d d7 c7 2d 2c 4d c1 a7 2f 1d
0x0094ef80: a5 cd 32 a8 53 89 f0 38 6c 75 3d e7 78 28 3d ae
0x0094ef90: 44 5a 45 19 7c 92 f0 43 bf 1c 90 80 c4 c0 9d 69
0x0094efa0: 8d d0 15 e0 59 01 18 c5 76 55 ac ef 7d e9 9d c1
0x0094efb0: 43 e2 da c0 75 cb 03 34 e7 94 b5 ab 54 52 14 e1
0x0094efc0: 22 26 c1 7b 27 da 41 9e 2f ed 8d ad d7 2b 6e 1a
0x0094efd0: 0d 49 da 82 14 de b6 fb 72 6b a7 c6 be bb a7 e0
0x0094efe0: e1 68 5c 09 42 9d a7 72 8a 34 1f 61 5e 8d 7c 6b
0x0094eff0: d6 56 ed ea 34 a4 e6 a6 0f 8d 6c cd 48 13 ae 2a
OOB Data: 02 ea 12 80 ff ff 06 01 cf c3 03 94 c1 d6 55 a7

Byte by byte comparison of the good and bad files yield:
FileOffset   Good  Bad
97780291     0xe6  0xee
97780471     0x6c  0x6e
97780500     0x73  0xf3
97780510     0x8   0x48 
97780564     0xc7  0xe7 
97780565     0x60  0x70 
97780579     0x9d  0xdd
97780643     0x11  0x15
97780686     0x2a  0x2b


Looks like some bits did not program to 0.

Sergei Sharonov

P.S. Any of you people tested yaffs under power fail conditions?