Skip to contentSkip to conversation

ubifs crash with two cases( switched to readonly, recover fail )

DISCUSSION 이양우 1 participant 1 message Aug 31, 2012 Memory technology devices (MTD)

lore
Share & tools
lore

이양우

author
#0 lore raw

Hi mtd members.

I have more message regarding nand crash.
It happed both on boot time and runnning with writing
Is it related with unstable bit issue? otherwise It also need mtd test to fix nand driver?
I want fix this problem...

running
 [10:10:59:405][  666.395000] UBIFS error (pid 3949): ubifs_scan: corrupt empty space at LEB 601:126300 [10:10:59:420][  666.400000] UBIFS error (pid 3949): ubifs_scanned_corruption: corruption at LEB 601:126300 [10:10:59:434][  666.410000] UBIFS error (pid 3949): ubifs_scan: LEB 601 scanning failed [10:10:59:435][  666.415000] UBIFS warning (pid 3949): ubifs_ro_mode: switched to read-only mode, error -117 [10:10:59:446][  666.420000] UBIFS error (pid 3949): ubifs_budget_space: cannot budget space, error -117
on boot
[    1.805000] UBI: attaching mtd5 to ubi1
[    1.810000] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[    1.815000] UBI: logical eraseblock size:    129024 bytes
[    1.820000] UBI: smallest flash I/O unit:    2048
[    1.825000] UBI: sub-page size:              512
[    1.830000] UBI: VID header offset:          512 (aligned 512)
[    1.835000] UBI: data offset:                2048
[    2.130000] UBI: attached mtd5 to ubi1
[    2.135000] UBI: MTD device name:            "Android RW"
[    2.140000] UBI: MTD device size:            150 MiB
[    2.145000] UBI: number of good PEBs:        1199
[    2.150000] UBI: number of bad PEBs:         1
[    2.155000] UBI: max. allowed volumes:       128
[    2.160000] UBI: wear-leveling threshold:    4096
[    2.165000] UBI: number of internal volumes: 1
[    2.170000] UBI: number of user volumes:     1
[    2.170000] UBI: available PEBs:             0
[    2.175000] UBI: total number of reserved PEBs: 1199
[    2.180000] UBI: number of PEBs reserved for bad PEB handling: 22
[    2.185000] UBI: max/mean erase counter: 1/0
[    2.185000] UBI: image sequence number: 0
[    2.190000] UBI: background thread "ubi_bgt1d" started, PID 1746
[    2.240000] UBIFS: recovery needed
[    2.375000] UBIFS error (pid 1747): ubifs_recover_leb: corrupt empty space LEB 940:90112, corruption starts at 2048 [    2.380000] UBIFS error (pid 1747): ubifs_scanned_corruption: corruption at LEB 940:2048
[    2.390000] UBIFS error (pid 1747): ubifs_recover_leb: LEB 940 scanning failed
[    2.405000] init: Unable to open persistent property directory /data/property errno: 2
[    2.410000] init: Unable to write persistent property to temp file /data/property/.temp errno: 2 [    2.465000] Micom status is set to micom_status = 0

------- Original Message -------
Sender: 이양우<[email protected]> S4(선임)/선임/PRT S/W Platform Lab(IT)/삼성전자
Date: 2012-08-29 11:18 (GMT+09:00)
Title: ubifs crash with two cases( switched to readonly, recover fail )

I'm facing some problem of file system crash.
This error happen very some times(about 3%) and seems happen on boot time after power cut.
Anyone tell me that how to fix it. Do I need additional patch?

I'm using ubifs on 512M raw flash device(SLC) and using kernel 2.6.35 with some ubifs patches.
applied patches
1. [PATCH] UBIFS: fix debugging failure in dbg_check_space_info
http://lists.infradead.org/pipermail/linux-mtd/2011-April/034692.html
2. Oops when calling fsync on read-only file-system
http://lists.infradead.org/pipermail/linux-mtd/2011-April/034884.html
3.[PATCH] UBIFS: handle allocation failures in UBIFS write path
http://lists.infradead.org/pipermail/linux-mtd/2011-March/034286.html
4. [PATCH] [93/106] UBIFS: fix master node recovery
http://lkml.indiana.edu/hypermail/linux/kernel/1104.3/01215.html
5. Patchwork ubi : kernel panic on erroneous block
http://patchwork.ozlabs.org/patch/61368/
<crash case 1>
[    1.750000] UBI: attaching mtd5 to ubi1
[    1.755000] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[    1.760000] UBI: logical eraseblock size:    129024 bytes
[    1.765000] UBI: smallest flash I/O unit:    2048
[    1.770000] UBI: sub-page size:              512
[    1.775000] UBI: VID header offset:          512 (aligned 512)
[    1.780000] UBI: data offset:                2048
[    2.075000] UBI: attached mtd5 to ubi1
[    2.080000] UBI: MTD device name:            "Android RW"
[    2.085000] UBI: MTD device size:            150 MiB
[    2.090000] UBI: number of good PEBs:        1200
[    2.095000] UBI: number of bad PEBs:         0
[    2.100000] UBI: max. allowed volumes:       128
[    2.105000] UBI: wear-leveling threshold:    4096
[    2.110000] UBI: number of internal volumes: 1
[    2.110000] UBI: number of user volumes:     1
[    2.115000] UBI: available PEBs:             0
[    2.120000] UBI: total number of reserved PEBs: 1200
[    2.125000] UBI: number of PEBs reserved for bad PEB handling: 24
[    2.130000] UBI: max/mean erase counter: 24/9
[    2.135000] UBI: image sequence number: 0
[    2.140000] UBI: background thread "ubi_bgt1d" started, PID 1746
[    2.195000] UBIFS: recovery needed
[    2.225000] UBIFS: recovery completed
[    2.230000] UBIFS: mounted UBI device 1, volume 0, name "rootfs"
[    2.235000] UBIFS: file system size:   149796864 bytes (146286 KiB, 142 MiB, 1161 LEBs)
[    2.240000] UBIFS: journal size:       9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
[    2.245000] UBIFS: media format:       w4/r0 (latest is w4/r0)
[    2.250000] UBIFS: default compressor: lzo
[    2.255000] UBIFS: reserved for root:  0 bytes (0 KiB)
[    2.335000] UBI error: ubi_io_read: error -74 while reading 128 bytes from PEB 385:3280, read 128 bytes [    2.400000] UBI error: ubi_io_read: error -74 while reading 128 bytes from PEB 385:3152, read 128 bytes
....
[    5.965000] UBI error: ubi_io_read: error -74 while reading 68 bytes from PEB 385:2776, read 68 bytes [    5.975000] UBIFS error (pid 1863): ubifs_check_node: bad CRC: calculated 0x6ef6c81c, read 0x2ef6c81c [    5.980000] UBIFS error (pid 1863): ubifs_check_node: bad node at LEB 22:728
[    5.990000] UBIFS error (pid 1863): ubifs_read_node: expected node type 9
[    6.000000] UBIFS warning (pid 1863): ubifs_ro_mode: switched to read-only mode, error -117
[    6.010000] [<c002c560>] (unwind_backtrace+0x0/0x164) from [<c019f174>] (ubifs_ro_mode+0x5c/0x78)
[    6.015000] [<c019f174>] (ubifs_ro_mode+0x5c/0x78) from [<c01a8470>] (ubifs_garbage_collect+0x2c8/0x328) [    6.025000] [<c01a8470>] (ubifs_garbage_collect+0x2c8/0x328) from [<c01960a4>] (make_reservation+0x100/0x34c) [    6.035000] [<c01960a4>] (make_reservation+0x100/0x34c) from [<c0196988>] (ubifs_jnl_write_data+0x114/0x1f8) [    6.040000] [<c0196988>] (ubifs_jnl_write_data+0x114/0x1f8) from [<c01986cc>] (do_writepage+0x84/0x174) [    6.050000] [<c01986cc>] (do_writepage+0x84/0x174) from [<c0084e68>] (__writepage+0x14/0x5c)
[    6.060000] [<c0084e68>] (__writepage+0x14/0x5c) from [<c0085600>] (write_cache_pages+0x254/0x354)
[    6.105000] [<c0085600>] (write_cache_pages+0x254/0x354) from [<c007fe18>] (__filemap_fdatawrite_range+0x60/0x68) [    6.125000] [<c007fe18>] (__filemap_fdatawrite_range+0x60/0x68) from [<c007fe54>] (filemap_write_and_wait_range+0x34/0x68) [    6.130000] [<c007fe54>] (filemap_write_and_wait_range+0x34/0x68) from [<c00caa70>] (vfs_fsync_range+0x34/0x7c) [    6.155000] [<c00caa70>] (vfs_fsync_range+0x34/0x7c) from [<c00cab50>] (vfs_fsync+0x20/0x28)
[    6.170000] [<c00cab50>] (vfs_fsync+0x20/0x28) from [<c00cab78>] (do_fsync+0x20/0x34)
[    6.180000] [<c00cab78>] (do_fsync+0x20/0x34) from [<c00267c0>] (ret_fast_syscall+0x0/0x30)
<crash case 2>
[    1.840000] UBI: attaching mtd5 to ubi1
[    1.840000] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[    1.845000] UBI: logical eraseblock size:    129024 bytes
[    1.850000] UBI: smallest flash I/O unit:    2048
[    1.855000] UBI: sub-page size:              512
[    1.855000] UBI: VID header offset:          512 (aligned 512)
[    1.860000] UBI: data offset:                2048
[    2.165000] UBI: attached mtd5 to ubi1
[    2.170000] UBI: MTD device name:            "Android RW"
[    2.175000] UBI: MTD device size:            150 MiB
[    2.180000] UBI: number of good PEBs:        1200
[    2.185000] UBI: number of bad PEBs:         0
[    2.190000] UBI: max. allowed volumes:       128
[    2.195000] UBI: wear-leveling threshold:    4096
[    2.200000] UBI: number of internal volumes: 1
[    2.205000] UBI: number of user volumes:     1
[    2.210000] UBI: available PEBs:             0
[    2.215000] UBI: total number of reserved PEBs: 1200
[    2.220000] UBI: number of PEBs reserved for bad PEB handling: 24
[    2.225000] UBI: max/mean erase counter: 104/16
[    2.230000] UBI: image sequence number: 0
[    2.230000] UBI: background thread "ubi_bgt1d" started, PID 1746
[    2.280000] UBIFS: recovery needed
[    2.400000] UBIFS error (pid 1747): ubifs_recover_leb: corrupt empty space LEB 189:83968, corruption starts at 2048 [    2.405000] UBIFS error (pid 1747): ubifs_scanned_corruption: corruption at LEB 189:2048
[    2.415000] UBIFS error (pid 1747): ubifs_recover_leb: LEB 189 scanning failed



Lee, Yang-Woo
S/W R&D Group 2
Digital Printing Division
Digital Media Business

SAMSUNG ELECTRONICS CO.,LTD

TEL : 82-31-277-9248
[email protected]




Lee, Yang-Woo
S/W R&D Group 2
Digital Printing Division
Digital Media Business

SAMSUNG ELECTRONICS CO.,LTD

TEL : 82-31-277-9248
[email protected]