Received: from mdfmta009.mxout.tbr.inty.net ([91.221.168.50] helo=smtp.demon.co.uk) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xg8np-00016t-G7 for linux-mtd@lists.infradead.org; Mon, 20 Oct 2014 08:58:58 +0000 Received: from mdfmta009.tbr.inty.net (unknown [127.0.0.1]) by mdfmta009.tbr.inty.net (Postfix) with ESMTP id C508D384091 for ; Mon, 20 Oct 2014 09:57:32 +0100 (BST) Received: from mdfmta009.tbr.inty.net (unknown [127.0.0.1]) by mdfmta009.tbr.inty.net (Postfix) with ESMTP id 7D0FF38408B for ; Mon, 20 Oct 2014 09:57:32 +0100 (BST) Received: from [192.168.0.200] (unknown [80.176.156.169]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mdfmta009.tbr.inty.net (Postfix) with ESMTP for ; Mon, 20 Oct 2014 09:57:32 +0100 (BST) Date: Mon, 20 Oct 2014 09:54:18 +0100 (BST) From: Steve B To: linux-mtd@lists.infradead.org Subject: Re: UBI/UBFS: ubi_eba_read_leb() reporting unmapped LEB In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi, Can anyone help me with this? Thanks, Steve On Fri, 10 Oct 2014, Steve B wrote: > Hi All, > > I've been running a reboot test on 5 devices and after about 7000 reboot > files in > one of our UBIFS volumes reports a corruption (SQUASHFS errors). I have been > able to extract the mtd partition and pull it into a nandsim instance on my > host > machine so I can add some extra debug. Here's the error log when trying to > load > the file: > > [41308.683356] UBI DBG gen (pid 15044): read 4062 bytes from LEB 1:352:0 > [41308.683358] UBI DBG eba (pid 15044): read 4062 bytes from offset 0 of LEB > 1:352 (unmapped) > [41308.683362] UBI DBG gen (pid 15044): read 4062 bytes from LEB 1:352:0 > [41308.683364] UBI DBG eba (pid 15044): read 4062 bytes from offset 0 of LEB > 1:352 (unmapped) > [41308.683368] UBIFS error (pid 15044): ubifs_read_node: bad node type (255 > but expected 1) > [41308.683373] UBI DBG gen (pid 15044): test LEB 1:352 > [41308.683377] UBIFS error (pid 15044): ubifs_read_node: bad node at LEB > 352:0, LEB mapping status 0 > [41308.683381] Not a node, first 24 bytes: > [41308.683386] 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff > ff ff ff ff ff ff ff ........................ > [41308.683392] Pid: 15044, comm: md5sum Tainted: GF O > 3.8.0-29-generic #42~precise1-Ubuntu > [41308.683396] Call Trace: > [41308.683411] [] ubifs_read_node+0x26d/0x2d0 [ubifs] > [41308.683419] [] ubifs_tnc_read_node+0x148/0x160 [ubifs] > [41308.683426] [] ubifs_tnc_locate+0x1cc/0x1f0 [ubifs] > [41308.683431] [] do_readpage+0x10e/0x410 [ubifs] > [41308.683437] [] ubifs_readpage+0x5e/0x580 [ubifs] > [41308.683441] [] ? __inc_zone_page_state+0x33/0x40 > [41308.683444] [] ? > add_to_page_cache_locked.part.26+0x76/0xd0 > [41308.683447] [] ? add_to_page_cache_locked+0x7d/0x90 > [41308.683452] [] > do_generic_file_read.constprop.31+0x10d/0x440 > [41308.683460] [] generic_file_aio_read+0xe1/0x220 > [41308.683469] [] do_sync_read+0xa3/0xe0 > [41308.683477] [] vfs_read+0xb0/0x180 > [41308.683485] [] sys_read+0x52/0xa0 > [41308.683492] [] system_call_fastpath+0x1a/0x1f > > I have written a small tool to scan the headers in all PEBs and this confirms > that LEB 352 doesn't exist for this volume. > > We are running a Linux kernel based off 3.4.0 > > This issue seems similar to an issue already raised on this mailing list: > linux-mtd/2010-September/031837.html > subject: ubi_eba_init_scan: cannot reserve enough PEBs > > I would like to know the best way to debug this issue, does anyone have the > patch > mentioned in the issue above to add more debugging in the right places? > > Our test setup has the facility of pulling the power on the unit if a GPIO > line > is toggled, with this we can test sensitive areas of the code, can anyone > suggest > where would be a good place to perform this action. > > Thanks for any help on this, > Steve B > > ______________________________________________________ > Linux MTD discussion mailing list > http://lists.infradead.org/mailman/listinfo/linux-mtd/ >