* UBI power cut
@ 2011-02-22 22:21 Marco Cesarano
2011-02-23 4:32 ` Artem Bityutskiy
0 siblings, 1 reply; 7+ messages in thread
From: Marco Cesarano @ 2011-02-22 22:21 UTC (permalink / raw)
To: linux-mtd@lists.infradead.org
Hi,
I tested UBI/UBIFS on Linux 2.6.31 and I experienced some issues in case of power cut. I've pasted some logs below. You can see that the driver returns a code that means that a page is partially written on the flash, and at the boot phase the driver detects corrupted data.
LOG 1:
...
[09/21 09:31:30]UBIFS: recovery needed
[09/21 09:31:30]UBIFS error (pid 1): ubifs_check_node: bad CRC: calculated 0xbdb34226, read
0xbd330226
[09/21 09:31:30]UBIFS error (pid 1): ubifs_check_node: bad node at LEB 51:24576
[09/21 09:31:30]UBIFS error (pid 1): ubifs_scanned_corruption: corruption at LEB 51:24576
[09/21 09:31:30]UBIFS error (pid 1): ubifs_recover_leb: LEB 51 scanning failed
[09/21 09:31:30]VFS: Cannot open root device "ubi0:rootfs" or unknown-block(8,1)
[09/21 09:31:30]Please append a correct "root=" boot option; here are the available
partitions:
[09/21 09:31:30]0800 156290904 sda driver: sd
[09/21 09:31:30] 0801 4112639 sda1
[09/21 09:31:30] 0802 514080 sda2
[09/21 09:31:30] 0803 8225280 sda3
[09/21 09:31:31] 0804 143436352 sda4
[09/21 09:31:31]1f00 122880 mtdblock0 (driver?)
[09/21 09:31:31]1f01 130048 mtdblock1 (driver?)
[09/21 09:31:31]1f02 4096 mtdblock2 (driver?)
[09/21 09:31:31]1f03 32768 mtdblock3 (driver?)
[09/21 09:31:31]1f04 117428 mtdblock4 (driver?)
[09/21 09:31:31]Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(8,1)
LOG 2:
...
physmap-flash.0: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
usb 1-2: new high speed USB device using ehci-brcm and address 2
RedBoot partition parsing not available
UBI: attaching mtd0 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
usb 1-2: configuration #1 chosen from 1 choice
UBI: attached mtd0 to ubi0
UBI: MTD device name: "rootfs"
UBI: MTD device size: 120 MiB
UBI: number of good PEBs: 960
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 960
UBI: number of PEBs reserved for bad PEB handling: 9
UBI: max/mean erase counter: 3/1
UBI: image sequence number: 0
UBI: background thread "ubi_bgt0d" started, PID 294
eth0: register 'asix' at usb-ehci_hcd-2, ASIX AX88772 USB 2.0 Ethernet, 00:50:b6:00:a4:e1
UBIFS: recovery needed
brcmnand_handle_false_read_ecc_unc_errors: Uncorrectable error at offset 48b1e00
Data:
0000: 31181006 575593c9 4f330f00 00004000 40004000 02010000 01000000 0c036b5c
0020: 04000000 00000000 34260200 00000000 00000700 00000000 7736392e 67617200
0040: 31181006 41eceb6d 10330f00 00000000 a0000000 00010000 30270200 00000002
0060: 00000000 00000000 0e330f00 00000000 00000000 00000000 0a000000 00000000
0080: 2a000000 01000000 0b000000 00000000 00000100 00000000 00000100 09001041
00a0: 00000000 00000000 a4810000 01000000 00000000 00000003 00000000 00004000
00c0: 00000000 89000002 00100000 08000000 00000008 00000000 04000000 00000008
00e0: 31181006 eee62377 11330f00 00000000 a0000200 00820000 01000000 00000000
0100: 00000000 00000000 01000000 00000000 e0060000 00000000 78164d4c 00010000
0120: 0a000000 00008000 2a000000 01010400 00000000 00000000 00000000 0f000000
0140: 00010000 00000000 ff410000 01000000 01000000 00010000 00010000 00000000
0160: 00000200 01000400 00000208 00000800 00000000 01000000 00000000 00008000
0180: 31181006 32698d78 12330f00 00000100 40040000 03010000 01020000 dca3075b
01a0: 00002000 00800000 00000300 00000000 00000700 00040000 3336302e 67617200
01c0: 31181006 15f2f3d4 13338f00 00000100 a0000000 00010000 27260300 00000000
01e0: 00000000 00000000 cf320f00 00000000 61230000 00000000 0a040080 00000000
Spare Area
ffffffff ffff3103 03ffffff ffffffff
brcmnand_post_mortem_dump at offset 48b1e00
Call Trace:
[<80016808>] dump_stack+0x8/0x34
[<802f93ec>] brcmnand_post_mortem_dump+0x48/0x11c
[<802fb0dc>] brcmnand_ctrl_posted_read_cache+0x71c/0x8d0
[<802f5824>] brcmnand_read_page+0xdc/0x228
[<802f6cbc>] brcmnand_do_read_ops+0xe4/0x2a8
[<802fa144>] brcmnand_read+0xd8/0x14c
[<802d3a44>] part_read+0x7c/0x124
[<803088b0>] ubi_io_read+0x8c/0x1a4
[<80308264>] ubi_eba_read_leb+0x130/0x2e8
[<80305c1c>] ubi_leb_read+0xf0/0x150
[<801e5dd4>] ubifs_start_scan+0x80/0x124
[<801f4f50>] ubifs_recover_leb+0x58/0x888
[<801e6c0c>] ubifs_replay_journal+0x5e4/0x1230
[<801dd5bc>] ubifs_get_sb+0xe14/0x13f0
[<800ccdcc>] vfs_kern_mount+0x50/0xbc
[<800cce8c>] do_kern_mount+0x44/0x128
[<800ec1c0>] do_mount+0x2d8/0x8d4
[<800ec840>] sys_mount+0x84/0xf8
[<804cef28>] do_mount_root+0x2c/0xc8
[<804cf204>] mount_block_root+0x12c/0x274
[<804cf584>] prepare_namespace+0xf4/0x240
[<804ce4d8>] kernel_init+0x208/0x234
[<80020cfc>] kernel_thread_helper+0x10/0x18
NAND registers snapshot
00442800: 00000303 01000000 00010000 048b1e00
00442810: 00000000 50000200 00000000 00000000
00442820: ffffffff ffff3103 03ffffff ffffffff
00442830: ffffffff ffffffff ffffffff ffffffff
00442840: d7ff1010 00000000 15142200 00000000
00442850: 5363444f 00000fc6 00000000 00000000
00442860: 20f1001d 20f1001d 00000000 f0000000
00442870: 00000000 00000000 00010000 048b1e00
00442880: 00000000 00000001 00000000 00000000
00442890: 00010000 048b1e00 00000000 00000000
004428a0: 00000000 00000000 00000000 00000000
004428b0: 00000000 00000000 00000000 00000000
004428c0: 00000000 00000000 00000000 00000000
004428d0: d70f0010 15142200 5363444f 00000fc6
004428e0: d7ff1010 15142200 5363444f 00000fc6
004428f0: d7ff1010 15142200 5363444f 00000fc6
brcmnand_read_page: 3: brcmnand_posted_read_cache failed at offset=48b1e00, ret=-77
brcmnand_handle_false_read_ecc_unc_errors: Uncorrectable error at offset 48b1e00
Data:
0000: 31181006 575593c9 4f330f00 00004000 40004000 02010000 01000000 0c036b5c
0020: 04000000 00000000 34260200 00000000 00000700 00000000 7736392e 67617200
0040: 31181006 41eceb6d 10330f00 00000000 a0000000 00014000 30270200 00000002
0060: 00000000 00000000 0e330f00 00000000 00000000 00000000 0a000000 00000000
0080: 2a000000 01000000 0b000000 00000000 00000100 00000000 00000100 09001041
00a0: 00000000 00000000 a4810000 01000000 00000000 00000003 00000000 00004000
00c0: 00000000 89000102 00100000 08000000 00000008 00000000 04000000 00000008
00e0: 31181006 eee62377 11330f00 00000000 a0000200 00820000 01000000 00000000
0100: 00000000 00000000 01000000 00000000 e0060000 00000000 78164d4c 00010000
0120: 0a000000 00008000 2a000000 01010400 00000000 00000000 00000000 0f000000
0140: 00010000 00000000 ff410000 01000000 01000000 00010000 00010000 00001000
0160: 00000200 01000400 00000208 00000800 00000000 01000000 00000000 00008000
0180: 31181006 32698d78 12330f00 00000100 40040000 03010000 01020000 dca3075b
01a0: 00002000 00800000 00000300 00000000 00000700 00040000 3336302e 67617200
01c0: 31181006 15f2f3d4 13338f00 00000100 a0000000 00010000 27260300 00000000
01e0: 00000000 00000000 cf320f00 00000000 61230000 00000000 0a040080 00000000
Spare Area
ffffffff ffff3103 03ffffff ffffffff
brcmnand_post_mortem_dump at offset 48b1e00
Call Trace:
[<80016808>] dump_stack+0x8/0x34
[<802f93ec>] brcmnand_post_mortem_dump+0x48/0x11c
[<802fb0dc>] brcmnand_ctrl_posted_read_cache+0x71c/0x8d0
[<802f5824>] brcmnand_read_page+0xdc/0x228
[<802f6cbc>] brcmnand_do_read_ops+0xe4/0x2a8
[<802fa144>] brcmnand_read+0xd8/0x14c
[<802d3a44>] part_read+0x7c/0x124
[<8030890c>] ubi_io_read+0xe8/0x1a4
[<80308264>] ubi_eba_read_leb+0x130/0x2e8
[<80305c1c>] ubi_leb_read+0xf0/0x150
[<801e5dd4>] ubifs_start_scan+0x80/0x124
[<801f4f50>] ubifs_recover_leb+0x58/0x888
[<801e6c0c>] ubifs_replay_journal+0x5e4/0x1230
[<801dd5bc>] ubifs_get_sb+0xe14/0x13f0
[<800ccdcc>] vfs_kern_mount+0x50/0xbc
[<800cce8c>] do_kern_mount+0x44/0x128
[<800ec1c0>] do_mount+0x2d8/0x8d4
[<800ec840>] sys_mount+0x84/0xf8
[<804cef28>] do_mount_root+0x2c/0xc8
[<804cf204>] mount_block_root+0x12c/0x274
[<804cf584>] prepare_namespace+0xf4/0x240
[<804ce4d8>] kernel_init+0x208/0x234
[<80020cfc>] kernel_thread_helper+0x10/0x18
NAND registers snapshot
00442800: 00000303 01000000 00010000 048b1e00
00442810: 00000000 50000200 00000000 00000000
00442820: ffffffff ffff3103 03ffffff ffffffff
00442830: ffffffff ffffffff ffffffff ffffffff
00442840: d7ff1010 00000000 15142200 00000000
00442850: 5363444f 00000fc6 00000000 00000000
00442860: 20f1001d 20f1001d 00000000 f0000000
00442870: 00000000 00000000 00010000 048b1e00
00442880: 00000000 00000001 00000000 00000000
00442890: 00010000 048b1e00 00000000 00000000
004428a0: 00000000 00000000 00000000 00000000
004428b0: 00000000 00000000 00000000 00000000
004428c0: 00000000 00000000 00000000 00000000
004428d0: d70f0010 15142200 5363444f 00000fc6
004428e0: d7ff1010 15142200 5363444f 00000fc6
004428f0: d7ff1010 15142200 5363444f 00000fc6
brcmnand_read_page: 3: brcmnand_posted_read_cache failed at offset=48b1e00, ret=-77
brcmnand_handle_false_read_ecc_unc_errors: Uncorrectable error at offset 48b1e00
Data:
0000: 31181006 575593c9 4f330f00 00004000 40004000 02010000 01000000 0c036b5c
0020: 04000000 00000000 34260200 00000000 00000700 00000000 7736392e 67617200
0040: 31181006 41eceb6d 10330f00 00000000 a0000000 00014000 30270200 00000002
0060: 00000000 00000000 0e330f00 00000000 00000000 00000000 0a000000 00000000
0080: 2a000000 01008000 0b000000 00000000 00000100 00000000 00000100 09001041
00a0: 00000000 00000000 a4810000 01000000 00000000 00000003 00000000 00004000
00c0: 00010000 89000102 00100000 08000000 00000008 00000000 04000000 00000008
00e0: 31181006 eee62377 19330f00 00000000 a0000200 00820000 01000000 00000000
0100: 00000000 00000000 01000000 00000000 e0060000 00000000 78164d4c 00010001
0120: 0a000000 00008000 2a000000 01010400 00000000 00000000 00000000 0f000000
0140: 00010000 00000000 ff410000 01000000 01000000 00010000 00010000 00001000
0160: 00000200 01000400 00000208 00000800 00000000 01000000 00000000 00008000
0180: 31181006 32698d78 12330f00 00000100 40040000 03010000 01020000 dca3075b
01a0: 00002000 00800000 00000300 00000000 00000700 00040000 3336302e 67617200
01c0: 31181006 15f2f3d4 13338f00 00000100 a0000000 00010000 27260300 00000000
01e0: 00000000 00000000 cf320f00 00000000 61230000 00000000 0a040080 00000000
Spare Area
ffffffff ffff3103 03ffffff ffffffff
brcmnand_post_mortem_dump at offset 48b1e00
Call Trace:
[<80016808>] dump_stack+0x8/0x34
[<802f93ec>] brcmnand_post_mortem_dump+0x48/0x11c
[<802fb0dc>] brcmnand_ctrl_posted_read_cache+0x71c/0x8d0
[<802f5824>] brcmnand_read_page+0xdc/0x228
[<802f6cbc>] brcmnand_do_read_ops+0xe4/0x2a8
[<802fa144>] brcmnand_read+0xd8/0x14c
[<802d3a44>] part_read+0x7c/0x124
[<8030890c>] ubi_io_read+0xe8/0x1a4
[<80308264>] ubi_eba_read_leb+0x130/0x2e8
[<80305c1c>] ubi_leb_read+0xf0/0x150
[<801e5dd4>] ubifs_start_scan+0x80/0x124
[<801f4f50>] ubifs_recover_leb+0x58/0x888
[<801e6c0c>] ubifs_replay_journal+0x5e4/0x1230
[<801dd5bc>] ubifs_get_sb+0xe14/0x13f0
[<800ccdcc>] vfs_kern_mount+0x50/0xbc
[<800cce8c>] do_kern_mount+0x44/0x128
[<800ec1c0>] do_mount+0x2d8/0x8d4
[<800ec840>] sys_mount+0x84/0xf8
[<804cef28>] do_mount_root+0x2c/0xc8
[<804cf204>] mount_block_root+0x12c/0x274
[<804cf584>] prepare_namespace+0xf4/0x240
[<804ce4d8>] kernel_init+0x208/0x234
[<80020cfc>] kernel_thread_helper+0x10/0x18
NAND registers snapshot
00442800: 00000303 01000000 00010000 048b1e00
00442810: 00000000 50000200 00000000 00000000
00442820: ffffffff ffff3103 03ffffff ffffffff
00442830: ffffffff ffffffff ffffffff ffffffff
00442840: d7ff1010 00000000 15142200 00000000
00442850: 5363444f 00000fc6 00000000 00000000
00442860: 20f1001d 20f1001d 00000000 f0000000
00442870: 00000000 00000000 00010000 048b1e00
00442880: 00000000 00000001 00000000 00000000
00442890: 00010000 048b1e00 00000000 00000000
004428a0: 00000000 00000000 00000000 00000000
004428b0: 00000000 00000000 00000000 00000000
004428c0: 00000000 00000000 00000000 00000000
004428d0: d70f0010 15142200 5363444f 00000fc6
004428e0: d7ff1010 15142200 5363444f 00000fc6
004428f0: d7ff1010 15142200 5363444f 00000fc6
brcmnand_read_page: 3: brcmnand_posted_read_cache failed at offset=48b1e00, ret=-77
brcmnand_handle_false_read_ecc_unc_errors: Uncorrectable error at offset 48b1e00
Data:
0000: 31181006 575593c9 4f330f00 00004000 40004000 02010000 01000000 0c036b5c
0020: 04000000 00000000 34260200 00000000 00000700 00000000 7736392e 67617200
0040: 31181006 41e8eb6d 10330f00 00000000 a0000000 00010000 30270200 00000002
0060: 00000000 00000000 0e330f00 00000000 00000000 00000000 0a000000 00000000
0080: 2a000000 01000000 0b000000 00000000 00000000 00000000 00000100 09001041
00a0: 00000000 00000000 a4810000 01000000 00000000 00000003 00000000 00004000
00c0: 00000000 09000002 00100000 08000000 00000008 00000000 04000000 00000008
00e0: 31181006 eee62377 11330f00 00000000 a0000200 00820000 01000000 00000000
0100: 00000000 00000000 01000000 00000000 e0060000 00000000 78164d4c 00010000
0120: 0a000000 00008000 2a000000 01010400 00000000 00000000 00000000 0f000000
0140: 00010000 00000000 ff410000 01000000 01000000 00010000 00010000 00000000
0160: 00000200 01000400 00000208 00000800 00000000 01000000 00000000 00008000
0180: 31181006 32698d78 12330f00 00000100 40040000 03010000 01020000 dca3075b
01a0: 00002000 00800000 00000300 00000000 00000700 00040000 3336302e 67617200
01c0: 31181006 15f2f3d4 13338f00 00000100 a0000000 00010000 27260300 00000000
01e0: 00000000 00000000 cf320f00 00000000 61230000 00000000 0a000000 00000000
Spare Area
ffffffff ffff3103 03ffffff ffffffff
brcmnand_post_mortem_dump at offset 48b1e00
Call Trace:
[<80016808>] dump_stack+0x8/0x34
[<802f93ec>] brcmnand_post_mortem_dump+0x48/0x11c
[<802fb0dc>] brcmnand_ctrl_posted_read_cache+0x71c/0x8d0
[<802f5824>] brcmnand_read_page+0xdc/0x228
[<802f6cbc>] brcmnand_do_read_ops+0xe4/0x2a8
[<802fa144>] brcmnand_read+0xd8/0x14c
[<802d3a44>] part_read+0x7c/0x124
[<8030890c>] ubi_io_read+0xe8/0x1a4
[<80308264>] ubi_eba_read_leb+0x130/0x2e8
[<80305c1c>] ubi_leb_read+0xf0/0x150
[<801e5dd4>] ubifs_start_scan+0x80/0x124
[<801f4f50>] ubifs_recover_leb+0x58/0x888
[<801e6c0c>] ubifs_replay_journal+0x5e4/0x1230
[<801dd5bc>] ubifs_get_sb+0xe14/0x13f0
[<800ccdcc>] vfs_kern_mount+0x50/0xbc
[<800cce8c>] do_kern_mount+0x44/0x128
[<800ec1c0>] do_mount+0x2d8/0x8d4
[<800ec840>] sys_mount+0x84/0xf8
[<804cef28>] do_mount_root+0x2c/0xc8
[<804cf204>] mount_block_root+0x12c/0x274
[<804cf584>] prepare_namespace+0xf4/0x240
[<804ce4d8>] kernel_init+0x208/0x234
[<80020cfc>] kernel_thread_helper+0x10/0x18
NAND registers snapshot
00442800: 00000303 01000000 00010000 048b1e00
00442810: 00000000 50000200 00000000 00000000
00442820: ffffffff ffff3103 03ffffff ffffffff
00442830: ffffffff ffffffff ffffffff ffffffff
00442840: d7ff1010 00000000 15142200 00000000
00442850: 5363444f 00000fc6 00000000 00000000
00442860: 20f1001d 20f1001d 00000000 f0000000
00442870: 00000000 00000000 00010000 048b1e00
00442880: 00000000 00000001 00000000 00000000
00442890: 00010000 048b1e00 00000000 00000000
004428a0: 00000000 00000000 00000000 00000000
004428b0: 00000000 00000000 00000000 00000000
004428c0: 00000000 00000000 00000000 00000000
004428d0: d70f0010 15142200 5363444f 00000fc6
004428e0: d7ff1010 15142200 5363444f 00000fc6
004428f0: d7ff1010 15142200 5363444f 00000fc6
brcmnand_read_page: 3: brcmnand_posted_read_cache failed at offset=48b1e00, ret=-77
UBI error: ubi_io_read: error -77 while reading 126976 bytes from PEB 581:4096, read 67584
bytes
UBIFS error (pid 1): ubifs_start_scan: cannot read 126976 bytes from LEB 44:0, error -5
VFS: Cannot open root device "ubi0:rootfs" or unknown-block(8,1)
Please append a correct "root=" boot option; here are the available partitions:
0800 156290904 sda driver: sd
0801 4112639 sda1
0802 514080 sda2
0803 8225280 sda3
0804 143436352 sda4
1f00 122880 mtdblock0 (driver?)
1f01 130048 mtdblock1 (driver?)
1f02 4096 mtdblock2 (driver?)
1f03 32768 mtdblock3 (driver?)
1f04 117428 mtdblock4 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)
Rebooting in 180 seconds..
For thoses cases, I'm working on a patch that esentially replicates each write in a PEB, and deletes the backup PEB only if the write is successful. To accomplish this, I'm working on eba.c (UBI layer) where I get for each write another PEB with ubi_wl_get_peb(), then I write its VID header (I put in the ubi_vid_hdr data structure an entry that, for each PEB, indicates what is the backup PEB) and the data, and then deletes the backup PEB only if the write of the original PEB returns. Otherwise a power cut could have happened and the system has been rebooted during the write and when the UBI performs the scanning, process_eb() isolates the backup PEB, looking the VID header entries, and replaces the corrupted (partially written) PEB with its content. Are there other solutions for the problems that I posted above?
Thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: UBI power cut
2011-02-22 22:21 UBI power cut Marco Cesarano
@ 2011-02-23 4:32 ` Artem Bityutskiy
2011-02-25 21:03 ` Marco Cesarano
0 siblings, 1 reply; 7+ messages in thread
From: Artem Bityutskiy @ 2011-02-23 4:32 UTC (permalink / raw)
To: Marco Cesarano; +Cc: linux-mtd@lists.infradead.org
On Tue, 2011-02-22 at 14:21 -0800, Marco Cesarano wrote:
> Hi,
>
> I tested UBI/UBIFS on Linux 2.6.31 and I experienced some issues in
> case of power cut. I've pasted some logs below. You can see that the
> driver returns a code that means that a page is partially written on
> the flash, and at the boot phase the driver detects corrupted data.
Do you still have this corrupted media? Could you please enable UBIFS
debugging and reproduce the issue and send the UBIFS logs? This may
help: http://linux-mtd.infradead.org/doc/ubifs.html#L_how_send_bugreport
--
Best Regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: UBI power cut
2011-02-23 4:32 ` Artem Bityutskiy
@ 2011-02-25 21:03 ` Marco Cesarano
2011-02-26 5:17 ` Artem Bityutskiy
0 siblings, 1 reply; 7+ messages in thread
From: Marco Cesarano @ 2011-02-25 21:03 UTC (permalink / raw)
To: dedekind1@gmail.com; +Cc: linux-mtd@lists.infradead.org
Hi Artem,
thanks for your answer. I enabled the debugging mode and I pasted the logs:
Adjust partition entire_device size from entire device to ff00000 to avoid overl
ap with BBT reserved space
Creating 3 MTD partitions on "brcmnand.0":
0x000000500000-0x00000ff00000 : "rootfs"
0x000000000000-0x00000ff00000 : "entire_device"
0x000000000000-0x000000500000 : "kernel"
EBI CS0: setting up NOR flash
physmap platform flash device: 04000000 at 1c000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
physmap-flash.0: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
UBI: attaching mtd0 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
eth0 Link UP.
Auto config phy
eth0: Link is up, 100 Mbps Full Duplex
UBI: max. sequence number: 0
UBI: volume 0 ("rootfs") re-sized from 42 to 1972 LEBs
UBI: attached mtd0 to ubi0
UBI: MTD device name: "rootfs"
UBI: MTD device size: 250 MiB
UBI: number of good PEBs: 1995
UBI: number of bad PEBs: 5
UBI: number of corrupted PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 1995
UBI: number of PEBs reserved for bad PEB handling: 19
UBI: max/mean erase counter: 0/0
UBI: image sequence number: 719378999
UBI: background thread "ubi_bgt0d" started, PID 385
UBI: scrubbed PEB 17 (LEB 0:15), data moved to PEB 1842
UBI: scrubbed PEB 13 (LEB 0:11), data moved to PEB 1831
UBI: scrubbed PEB 32 (LEB 0:30), data moved to PEB 1718
UBI: scrubbed PEB 40 (LEB 0:38), data moved to PEB 1655
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size: 248999936 bytes (243164 KiB, 237 MiB, 1961 LEBs)
UBIFS: journal size: 9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:12.
Freeing unused kernel memory: 172k freed
starting pid 1, tty '': '/etc/init.d/rcS'
UBI: scrubbed PEB 26 (LEB 0:24), data moved to PEB 1624
Mounting virtual filesystems
Starting mdev
* WARNING: THIS STB CONTAINS GPLv3 SOFTWARE
* GPLv3 programs must be removed in order to enable security.
* See: http://www.gnu.org/licenses/gpl-faq.html#Tivoization
/bin/mocacfg: MoCA utilities are not installed
Configuring eth0 interface
brcm-pm: enabling moca_genet clocks
brcm-pm: enabling enet clocks
eth0 Link DOWN.
Configuring eth1 interface
Configuring lo interface
Starting network services
starting pid 1, tty '/dev/ttyS0': '/bin/login -f root'
Jan 1 00:00:11 login[421]: root login on 'ttyS0'
# eth0 Link UP.
Auto config phy
eth0: Link is up, 100 Mbps Full Duplex
# mount stb-bld-00:/exp/mcesaran /mnt/nfs/
# cp /mnt/nfs/ubifs_test2.sh .; sync; chmod +x ./ubifs_test2.sh; umount /mnt/nfs
/
#
# ./ubifs_test2.sh
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_0
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_1
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_2
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_3
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_4
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_5
Call Trace:
[<80016390>] dump_stack+0x8/0x34
[<8033a3b4>] ubi_io_write+0x3f0/0x4b4
[<803370e0>] ubi_eba_write_leb+0x398/0x8cc
[<80334c58>] ubi_leb_write+0x18c/0x194
[<80211a94>] dbg_leb_write+0x10c/0x124
[<801e1298>] ubifs_wbuf_write_nolock+0x188/0xa60
[<801d3838>] ubifs_jnl_write_data+0x17c/0x414
[<801d6fb8>] do_writepage+0x1d0/0x44c
[<800997f0>] __writepage+0x18/0x170
[<8009a74c>] write_cache_pages+0x298/0x510
[<8009aa60>] do_writepages+0x78/0x80
[<800f01d0>] writeback_single_inode+0xb0/0x438
[<800f0d54>] generic_sync_sb_inodes+0x4f0/0x75c
[<800f1118>] writeback_inodes+0x98/0x164
[<8009b81c>] balance_dirty_pages_ratelimited_nr+0x37c/0x43c
[<80091a4c>] generic_file_buffered_write+0x1e0/0x398
[<80092208>] __generic_file_aio_write_nolock+0x278/0x608
[<80092a4c>] generic_file_aio_write+0x78/0x12c
[<801d47b0>] ubifs_aio_write+0x134/0x248
[<800c9c54>] do_sync_write+0xe0/0x158
[<800ca934>] vfs_write+0xb4/0x174
[<800caaec>] sys_write+0x4c/0xa4
[<80003d7c>] stack_done+0x20/0x3c
UBI warning: ubi_eba_write_leb: failed to write data to PEB 50
UBI: recover PEB 50, move data to PEB 1074
UBI: data was successfully recovered
UBI: run torture test for PEB 50
UBI: PEB 50 passed torture test, do not mark it a bad
UBI warning: ubi_eba_write_leb: failed to write data to PEB 53
UBI warning: ubi_ro_mode: switch to read-only mode
UBIFS error (pid 445): ubifs_wbuf_write_nolock: cannot write 4144 bytes to LEB 1
964:81920, error 5
Call Trace:
[<80016390>] dump_stack+0x8/0x34
[<801e1940>] ubifs_wbuf_write_nolock+0x830/0xa60
[<801d3838>] ubifs_jnl_write_data+0x17c/0x414
[<801d6fb8>] do_writepage+0x1d0/0x44c
[<800997f0>] __writepage+0x18/0x170
[<8009a74c>] write_cache_pages+0x298/0x510
[<8009aa60>] do_writepages+0x78/0x80
[<800f01d0>] writeback_single_inode+0xb0/0x438
[<800f0d54>] generic_sync_sb_inodes+0x4f0/0x75c
[<800f1118>] writeback_inodes+0x98/0x164
[<8009b81c>] balance_dirty_pages_ratelimited_nr+0x37c/0x43c
[<80091a4c>] generic_file_buffered_write+0x1e0/0x398
[<80092208>] __generic_file_aio_write_nolock+0x278/0x608
[<80092a4c>] generic_file_aio_write+0x78/0x12c
[<801d47b0>] ubifs_aio_write+0x134/0x248
[<800c9c54>] do_sync_write+0xe0/0x158
[<800ca934>] vfs_write+0xb4/0x174
[<800caaec>] sys_write+0x4c/0xa4
[<80003d7c>] stack_done+0x20/0x3c
UBIFS error (pid 445): ubifs_check_node: bad CRC: calculated 0x5bc413d4, read 0x
ae0a6952
UBIFS error (pid 445): ubifs_check_node: bad node at LEB 1964:82784
Call Trace:
[<80016390>] dump_stack+0x8/0x34
[<801e1e1c>] ubifs_check_node+0x1b4/0x320
[<801ebee0>] ubifs_scan_a_node+0x194/0x488
[<801ec274>] ubifs_scan+0xa0/0x454
[<80215750>] dbg_dump_leb+0x90/0x180
[<801e17a4>] ubifs_wbuf_write_nolock+0x694/0xa60
[<801d3838>] ubifs_jnl_write_data+0x17c/0x414
[<801d6fb8>] do_writepage+0x1d0/0x44c
[<800997f0>] __writepage+0x18/0x170
[<8009a74c>] write_cache_pages+0x298/0x510
[<8009aa60>] do_writepages+0x78/0x80
[<800f01d0>] writeback_single_inode+0xb0/0x438
[<800f0d54>] generic_sync_sb_inodes+0x4f0/0x75c
[<800f1118>] writeback_inodes+0x98/0x164
[<8009b81c>] balance_dirty_pages_ratelimited_nr+0x37c/0x43c
[<80091a4c>] generic_file_buffered_write+0x1e0/0x398
[<80092208>] __generic_file_aio_write_nolock+0x278/0x608
[<80092a4c>] generic_file_aio_write+0x78/0x12c
[<801d47b0>] ubifs_aio_write+0x134/0x248
[<800c9c54>] do_sync_write+0xe0/0x158
[<800ca934>] vfs_write+0xb4/0x174
[<800caaec>] sys_write+0x4c/0xa4
[<80003d7c>] stack_done+0x20/0x3c
UBIFS error (pid 445): ubifs_scan: bad node
UBIFS error (pid 445): ubifs_scanned_corruption: corruption at LEB 1964:82784
UBIFS error (pid 445): ubifs_scanned_corruption: first 8192 bytes from LEB 1964:
82784
UBIFS error (pid 445): ubifs_scan: LEB 1964 scanning failed
UBIFS error (pid 445): dbg_dump_leb: scan error -135
UBIFS warning (pid 445): ubifs_ro_mode: switched to read-only mode, error 5
UBIFS error (pid 159): make_reservation: cannot reserve 2849 bytes in jhead 2, e
rror -30
UBIFS error (pid 159): do_writepage: cannot write page 9 of inode 333, error -30
UBIFS error (pid 159): make_reservation: cannot reserve 160 bytes in jhead 1, er
ror -30
UBIFS error (pid 159): ubifs_write_inode: can't write inode 334, error -30
Call Trace:
[<80016390>] dump_stack+0x8/0x34
[<801d388c>] ubifs_jnl_write_data+0x1d0/0x414
[<801d6fb8>] do_writepage+0x1d0/0x44c
[<800997f0>] __writepage+0x18/0x170
[<8009a74c>] write_cache_pages+0x298/0x510
[<8009aa60>] do_writepages+0x78/0x80
[<800f01d0>] writeback_single_inode+0xb0/0x438
[<800f0d54>] generic_sync_sb_inodes+0x4f0/0x75c
[<800f1118>] writeback_inodes+0x98/0x164
[<8009b81c>] balance_dirty_pages_ratelimited_nr+0x37c/0x43c
[<80091a4c>] generic_file_buffered_write+0x1e0/0x398
[<80092208>] __generic_file_aio_write_nolock+0x278/0x608
[<80092a4c>] generic_file_aio_write+0x78/0x12c
[<801d47b0>] ubifs_aio_write+0x134/0x248
[<800c9c54>] do_sync_write+0xe0/0x158
[<800ca934>] vfs_write+0xb4/0x174
[<800caaec>] sys_write+0x4c/0xa4
UBIFS error (pid 159): make_reservation: cannot reserve 160 bytes in jhead 1, er
ror -30
UBIFS error (pid 159): ubifs_write_inode: can't write inode 335, error -30
UBIFS error (pid 159): make_reservation: cannot reserve 160 bytes in jhead 1, er
ror -30
UBIFS error (pid 159): ubifs_write_inode: can't write inode 336, error -30
UBIFS error (pid 159): make_reservation: cannot reserve 2922 bytes in jhead 2, e
rror -30
UBIFS error (pid 159): do_writepage: cannot write page 10 of inode 333, error -3
0
UBIFS error (pid 159): make_reservation: cannot reserve 2442 bytes in jhead 2, e
rror -30
UBIFS error (pid 159): do_writepage: cannot write page 1 of inode 334, error -30
[<80003d7c>] stack_done+0x20/0x3c
UBIFS error (pid 445): do_writepage: cannot write page 367 of inode 332, error 5
UBIFS error (pid 159): make_reservation: cannot reserve 2442 bytes in jhead 2, e
rror -30
UBIFS error (pid 159): do_writepage: cannot write page 1 of inode 335, error -30
UBIFS error (pid 159): make_reservation: cannot reserve 2442 bytes in jhead 2, e
rror -30
UBIFS error (pid 159): do_writepage: cannot write page 1 of inode 336, error -30
UBIFS error (pid 159): make_reservation: cannot reserve 2974 bytes in jhead 2, e
rror -30
UBIFS error (pid 159): do_writepage: cannot write page 11 of inode 333, error -3
0
UBIFS error (pid 159): make_reservation: cannot reserve 3266 bytes in jhead 2, e
rror -30
UBIFS error (pid 159): do_writepage: cannot write page 2 of inode 334, error -30
UBIFS error (pid 159): make_reservation: cannot reserve 394 bytes in jhead 2, er
ror -30
UBIFS error (pid 159): do_writepage: cannot write page 368 of inode 332, error -
30
cp: write error:UBIFS error (pid 159): make_reservation: cannot reserve 3266 byt
es in jhead 2, error -30
Read-only file UBIFS error (pid 159): do_writepage: cannot write page 2 of inod
e 335, error -30
system
UBIFS error (pid 159): make_reservation: cannot reserve 160 bytes in jhead 1, er
ror -30
cp /lib/libstdc+UBIFS error (pid 159): ubifs_write_inode: can't write inode 336,
error -30
+.so.6.0.13 /rooUBIFS error (pid 159): make_reservation: cannot reserve 2901 byt
es in jhead 2, error -30
t/libstdc++_6
cUBIFS error (pid 159): do_writepage: cannot write page 12 of inode 333, error -
30
p: can't create UBIFS error (pid 159): make_reservation: cannot reserve 2348 byt
es in jhead 2, error -30
'/root/libstdc++UBIFS error (pid 159): do_writepage: cannot write page 3 of inod
e 334, error -30
_6': Read-only fUBIFS error (pid 159): make_reservation: cannot reserve 992 byte
s in jhead 2, error -30
ile system
cp /UBIFS error (pid 159): do_writepage: cannot write page 369 of inode 332, err
or -30
lib/libstdc++.so.6.0.13 /root/libstdc++_7
cp: can't create '/root/libstdc++_7': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_8
cp: can't create '/root/libstdc++_8': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_9
cp: can't create '/root/libstdc++_9': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_10
cp: can't create '/root/libstdc++_10': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_11
cp: can't create '/root/libstdc++_11': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_12
cp: can't create '/root/libstdc++_12': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_13
cp: can't create '/root/libstdc++_13': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_14
cp: can't create '/root/libstdc++_14': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_15
cp: can't create '/root/libstdc++_15': Read-only file systUBIFS error (pid 159):
make_reservation: cannot reserve 2348 bytes in jhead 2, error -30
em
cp /lib/libsUBIFS error (pid 159): do_writepage: cannot write page 3 of inode 33
5, error -30
tdc++.so.6.0.13 UBIFS error (pid 159): make_reservation: cannot reserve 2348 byt
es in jhead 2, error -30
/root/libstdc++_UBIFS error (pid 159): do_writepage: cannot write page 3 of inod
e 336, error -30
16
cp: can't crUBIFS error (pid 159): make_reservation: cannot reserve 2953 bytes i
n jhead 2, error -30
eate '/root/libsUBIFS error (pid 159): do_writepage: cannot write page 13 of ino
de 333, error -30
tdc++_16': Read-UBIFS error (pid 159): make_reservation: cannot reserve 2880 byt
es in jhead 2, error -30
only file systemUBIFS error (pid 159): do_writepage: cannot write page 4 of inod
e 334, error -30
cp /lib/libstdUBIFS error (pid 159): make_reservation: cannot reserve 2880 bytes
in jhead 2, error -30
c++.so.6.0.13 /rUBIFS error (pid 159): do_writepage: cannot write page 4 of inod
e 335, error -30
oot/libstdc++_17UBIFS error (pid 159): make_reservation: cannot reserve 2880 byt
es in jhead 2, error -30
cp: can't creaUBIFS error (pid 159): do_writepage: cannot write page 4 of inode
336, error -30
te '/root/libstdc++_17': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_18
cp: can't create '/root/libstdc++_18': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_19
cp: can't create '/root/libstdc++_19': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_20
cp: can't create '/root/libstdc++_20': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_21
cp: can't create '/root/libstdc++_21': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_22
cp: can't create '/root/libstdc++_22': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_23
cp: can't create '/root/libstdc++_23': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_24
cp: can't create '/root/libstdc++_24': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_25
cp: can't create '/root/libstdc++_25': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_26
cp: can't create '/root/libstdc++_26': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_27
cp: can't create '/root/libstdc++_27': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_28
cp: can't create '/root/libstdc++_28': Read-only file system
cp /lib/libstdc++.so.6.0.13 /root/libstdc++_29
cp: can't create '/root/libstdc++_29': Read-only file system
Marco
________________________________________
From: Artem Bityutskiy [dedekind1@gmail.com]
Sent: Tuesday, February 22, 2011 8:32 PM
To: Marco Cesarano
Cc: linux-mtd@lists.infradead.org
Subject: Re: UBI power cut
On Tue, 2011-02-22 at 14:21 -0800, Marco Cesarano wrote:
> Hi,
>
> I tested UBI/UBIFS on Linux 2.6.31 and I experienced some issues in
> case of power cut. I've pasted some logs below. You can see that the
> driver returns a code that means that a page is partially written on
> the flash, and at the boot phase the driver detects corrupted data.
Do you still have this corrupted media? Could you please enable UBIFS
debugging and reproduce the issue and send the UBIFS logs? This may
help: http://linux-mtd.infradead.org/doc/ubifs.html#L_how_send_bugreport
--
Best Regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: UBI power cut
2011-02-25 21:03 ` Marco Cesarano
@ 2011-02-26 5:17 ` Artem Bityutskiy
2011-03-03 19:40 ` Marco Cesarano
0 siblings, 1 reply; 7+ messages in thread
From: Artem Bityutskiy @ 2011-02-26 5:17 UTC (permalink / raw)
To: Marco Cesarano; +Cc: linux-mtd@lists.infradead.org
On Fri, 2011-02-25 at 13:03 -0800, Marco Cesarano wrote:
> Hi Artem,
>
> thanks for your answer. I enabled the debugging mode and I pasted the logs:
Sorry, but you unfortunately failed to provide full output - KERN_DEBUG
messages are omitted. The article I gave you discusses this in item 4.
E.g., try ignore_loglevel.
--
Best Regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: UBI power cut
2011-02-26 5:17 ` Artem Bityutskiy
@ 2011-03-03 19:40 ` Marco Cesarano
2011-03-03 22:02 ` Anatolij Gustschin
0 siblings, 1 reply; 7+ messages in thread
From: Marco Cesarano @ 2011-03-03 19:40 UTC (permalink / raw)
To: dedekind1@gmail.com; +Cc: linux-mtd@lists.infradead.org
Hi Artem,
I enabled full debug mode, and I realized that a similar problem happened in the thread "UBI recovery stops". Therefore I made the necessary changes and it works.
Thanks for your help,
Marco
________________________________________
From: Artem Bityutskiy [dedekind1@gmail.com]
Sent: Friday, February 25, 2011 9:17 PM
To: Marco Cesarano
Cc: linux-mtd@lists.infradead.org
Subject: RE: UBI power cut
On Fri, 2011-02-25 at 13:03 -0800, Marco Cesarano wrote:
> Hi Artem,
>
> thanks for your answer. I enabled the debugging mode and I pasted the logs:
Sorry, but you unfortunately failed to provide full output - KERN_DEBUG
messages are omitted. The article I gave you discusses this in item 4.
E.g., try ignore_loglevel.
--
Best Regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: UBI power cut
2011-03-03 19:40 ` Marco Cesarano
@ 2011-03-03 22:02 ` Anatolij Gustschin
2011-03-03 23:00 ` Marco Cesarano
0 siblings, 1 reply; 7+ messages in thread
From: Anatolij Gustschin @ 2011-03-03 22:02 UTC (permalink / raw)
To: Marco Cesarano; +Cc: linux-mtd@lists.infradead.org, dedekind1@gmail.com
Hi Marco,
On Thu, 3 Mar 2011 11:40:49 -0800
"Marco Cesarano" <mcesaran@broadcom.com> wrote:
...
> I enabled full debug mode, and I realized that a similar problem
> happened in the thread "UBI recovery stops". Therefore I made the
> necessary changes and it works.
Which changes did you make?
Thanks,
Anatolij
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: UBI power cut
2011-03-03 22:02 ` Anatolij Gustschin
@ 2011-03-03 23:00 ` Marco Cesarano
0 siblings, 0 replies; 7+ messages in thread
From: Marco Cesarano @ 2011-03-03 23:00 UTC (permalink / raw)
To: Anatolij Gustschin; +Cc: linux-mtd@lists.infradead.org, dedekind1@gmail.com
I used the following patch:
http://lists.infradead.org/pipermail/linux-mtd/2011-January/033768.html
Marco
________________________________________
From: Anatolij Gustschin [agust@denx.de]
Sent: Thursday, March 03, 2011 2:02 PM
To: Marco Cesarano
Cc: dedekind1@gmail.com; linux-mtd@lists.infradead.org
Subject: Re: UBI power cut
Hi Marco,
On Thu, 3 Mar 2011 11:40:49 -0800
"Marco Cesarano" <mcesaran@broadcom.com> wrote:
...
> I enabled full debug mode, and I realized that a similar problem
> happened in the thread "UBI recovery stops". Therefore I made the
> necessary changes and it works.
Which changes did you make?
Thanks,
Anatolij
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-03-03 23:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-22 22:21 UBI power cut Marco Cesarano
2011-02-23 4:32 ` Artem Bityutskiy
2011-02-25 21:03 ` Marco Cesarano
2011-02-26 5:17 ` Artem Bityutskiy
2011-03-03 19:40 ` Marco Cesarano
2011-03-03 22:02 ` Anatolij Gustschin
2011-03-03 23:00 ` Marco Cesarano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox