Booting stops at UBI Scan/UBIFS recovery needed

Vankam, Rajasekhar Rajasekhar.Vankam at spx.com
Mon Jan 7 14:59:38 EST 2013


Hi,

We are facing an issue of fail in booting at UBI/UBIFS during kernel boot but it will happen after several boots but not immediate second boot.
Booting gets stuck sometimes at UBI scan and sometimes after UBIFS Recovery needed and it stays forever. Below are the log snippets where it exactly stuck.

1.       At UBI:
[   20.076281] UBI: scan PEB 1902
[   20.080509] UBI: add to free: PEB 1902, EC 1
[   20.084953] UBI: scan PEB 1903
[   20.089181] UBI: add to free: PEB 1903, EC 1
[   20.093625] UBI: scan PEB 1904
[   20.097853] UBI: add to free: PEB 1904, EC 1
[   20.102297] UBI: scan PEB 1905
[   20.106525] UBI: add to free: PEB 1905, EC 1
[   20.110970] UBI: scan PEB 1906
[   20.115200] UBI: PEB 1906, LEB 2147479551:1, EC 0, sqnum 2, bitflips 0
[   20.122001] UBI: added volume 2147479551
[   20.126084] UBI: scan PEB 1907
[   20.130316] UBI: PEB 1907, LEB 2147479551:0, EC 0, sqnum 1, bitflips 0
[   20.137325] UBI: max. sequence number:       1034
[   20.156705] UBI: ubi0 major is 252
[   20.161381] UBI: attached mtd10 to ubi0
[   20.165385] UBI: MTD device name:            "File System"
[   20.171099] UBI: MTD device size:            238 MiB
[   20.176267] UBI: number of good PEBs:        1908
[   20.181164] UBI: number of bad PEBs:         0
[   20.185790] UBI: number of corrupted PEBs:   0
[   20.190415] UBI: max. allowed volumes:       128
[   20.195221] UBI: wear-leveling threshold:    4096
[   20.200118] UBI: number of internal volumes: 1
[   20.204743] UBI: number of user volumes:     1
[   20.209369] UBI: available PEBs:             0
[   20.213994] UBI: total number of reserved PEBs: 1908
[   20.219164] UBI: number of PEBs reserved for bad PEB handling: 19
[   20.225511] UBI: max/mean erase counter: 5/0
[   20.229955] UBI: image sequence number:  1053333153
[   20.235125] UBI: background thread "ubi_bgt0d" started, PID 528
Booting stops after this and stays forever.

2.       Another sequence at UBI:

[    1.532395] UBI: attaching mtd10 to ubi0

[    1.536484] UBI: sizeof(struct ubi_scan_leb) 40

[    1.541200] UBI: sizeof(struct ubi_wl_entry) 20

[    1.545959] UBI: min_io_size      2048

[    1.549861] UBI: max_write_size   2048

[    1.553772] UBI: hdrs_min_io_size 512

[    1.557582] UBI: ec_hdr_alsize    512

[    1.561402] UBI: vid_hdr_alsize   512

[    1.565214] UBI: vid_hdr_offset   2048

[    1.569115] UBI: vid_hdr_aloffset 2048

[    1.573024] UBI: vid_hdr_shift    0

[    1.576654] UBI: leb_start        4096

[    1.580556] UBI: max_erroneous    190

[    1.584378] UBI: physical eraseblock size:   131072 bytes (128 KiB)

[    1.590906] UBI: logical eraseblock size:    126976 bytes

[    1.596536] UBI: smallest flash I/O unit:    2048

[    1.601442] UBI: sub-page size:              512

[    1.606249] UBI: VID header offset:          2048 (aligned 2048)

[    1.612514] UBI: data offset:                4096

[    1.617583] UBI: scan PEB 0

[    1.621608] UBI: add to free: PEB 0, EC 2

[    1.625806] UBI: scan PEB 1

[    1.629782] UBI: PEB 1, LEB 0:0, EC 1, sqnum 3, bitflips 0

[    1.635513] UBI: added volume 0

[    1.638791] UBI: scan PEB 2

[    1.642765] UBI: add to free: PEB 2, EC 2

---------------

---------------
[    3.975949] UBI: scan PEB 235
[    3.980091] UBI: PEB 235, LEB 0:233, EC 0, sqnum 0, bitflips 0
[    3.986178] UBI: scan PEB 236
[    3.990321] UBI: PEB 236, LEB 0:234, EC 0, sqnum 0, bitflips 0
[    3.996408] UBI: scan PEB 237
[    4.000552] UBI: PEB 237, LEB 0:235, EC 0, sqnum 0, bitflips 0
[    4.006640] UBI: scan PEB 238
[    4.010783] UBI: PEB 238, LEB 0:236, EC 0, sqnum 0, bitflips 0
[    4.016870] UBI: scan PEB 239
[    4.021014] UBI: PEB 239, LEB 0:237, EC 0, sqnum 0, bitflips 0
[    4.027101] UBI: scan PEB 240
[    4.031244] UBI: PEB 240, LEB 0:238, EC 0, sqnum 0, bitflips 0
[    4.037331] UBI: scan PEB 241
[    4.041482] UBI: PEB 241, LEB 0:239, EC 0, sqnum 0, bitflips 0
[    4.047687] UBI: scan PEB 242
[    4.051850] UBI: PEB 242, LEB 0:240, EC 0, sqnum 0, bitflips 0
[    4.057928] UBI: scan PEB 243

Booting stops after this and stays forever.
Also observed that, UBI: max/mean erase counter: x/y gets incremented randomly after several boots. Does this give any indication?


At UBIFS:
Couple of times we have seen stop in booting after UBIFS recovery needed and stays forever.
[   20.641396] UBIFS: opened ubi0_0
[   20.709725] UBIFS: recovery needed

In all above scenarios, if reset is generated (even without power cycle) then next boot will come up properly.

I have tried the patch to comment out ubifs_fixup_free_space function suggested in one of the forum threads and also tried removing -F option while using mkfs.ubifs command. But the problem still persists.
To simulate the problem we have programmed the system to reset (watchdog reset) after every 2 mins and above scenarios happen after around 240 or more resets.
Could you please help me on how to get away with this? I do not have information on what version of UBIFS is in my kernel. I am using TI AM335x kernel 3.1.0 version. Please let me know if you need further details.

Proper boot log is attached for your reference.


Regards,
Raja.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20130107/d93b7e30/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Properboot log.txt
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20130107/d93b7e30/attachment-0001.txt>


More information about the linux-mtd mailing list