All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@sigma-star.at>
To: Timo Ketola <timo@exertus.fi>, linux-mtd@lists.infradead.org
Subject: Re: UBI assert failed in ubi_wl_init
Date: Thu, 22 Mar 2018 16:48:02 +0100	[thread overview]
Message-ID: <2385502.GW1C2yTnO0@blindfold> (raw)
In-Reply-To: <a6a77fba-9df1-2dac-25a7-c0d3d9bc5b42@exertus.fi>

Timo,

Am Donnerstag, 22. März 2018, 16:40:42 CET schrieb Timo Ketola:
> On 22.03.2018 17:05, Richard Weinberger wrote:
> > Timo,
> 
> > Am Donnerstag, 22. März 2018, 14:57:57 CET schrieb Timo Ketola:
> ...
> 
> >> Here is a dump after the second boot:
> >> 
> >> https://drive.google.com/open?id=1oa2lV_OB_tC-SX_c4jylnMXK6x1xhj2o
> >> 
> >> After I dumped it I erased the whole mtd, wrote the dump back there,
> >> dumped another dump and verified that it was identical with the first
> >> one. Then I rebooted and observed that the issue was still there just as
> >> before.
> > 
> > This image contains a Fastmap, but it is invalid.
> > The image has a length of 2079326208 bytes, your PEB size is 128KiB.
> > Therefore PEB count is 15864.
> > But the Fastmap references PEBs 15865, 15866 and 15867.
> > 
> > This explains the failing assert, Fastmap talks about PEBs which are
> > unknown to UBI.
> > 
> > Can it be that your mtd partition layout is bad/broken?
> 
> The partition spans two chips and they both have four blocks of bad
> block tables at the end of the chips. Would that explain?

If this setup works correctly, it should work.

> I'm slightly confused though, because flash_erase reports total of eight
> blocks:
> 
> # flash_eraseall /dev/mtd1
> Erasing 128 Kibyte @ 3bf60000 - 48% complete.
> Skipping bad block at 0x3bf80000
> 
> Skipping bad block at 0x3bfa0000
> 
> Skipping bad block at 0x3bfc0000
> 
> Skipping bad block at 0x3bfe0000
> Erasing 128 Kibyte @ 7bf60000 - 99% complete.
> Skipping bad block at 0x7bf80000
> 
> Skipping bad block at 0x7bfa0000
> 
> Skipping bad block at 0x7bfc0000
> 
> Skipping bad block at 0x7bfe0000
> Erasing 128 Kibyte @ 7c000000 - 100% complete.
> 
> 
> but, log tells only about four blocks:
> 
> [    1.549699] Bad block table found at page 524224, version 0x01
> [    1.554241] Bad block table found at page 1048512, version 0x01
> [    1.561314] Bad block table found at page 524160, version 0x01
> [    1.565853] Bad block table found at page 1048448, version 0x01
> [    1.573232] 2 ofpart partitions found on MTD device gpmi-nand
> [    1.577688] Creating 2 MTD partitions on "gpmi-nand":
> [    1.581499] 0x000000000000-0x000004000000 : "system"
> [    1.595001] 0x000004000000-0x000080000000 : "user"

Now things get interesting.
Can it be that the number of bad blocks is not stable?
IOW sometimes 4 and sometimes 8 are reported?
This would more or less explain what you see.

Fastmap does not care about bad block itself, all it cares about the total 
number of good blocks.

Thanks,
//richard

-- 
sigma star gmbh - Eduard-Bodem-Gasse 6 - 6020 Innsbruck - Austria
ATU66964118 - FN 374287y

  reply	other threads:[~2018-03-22 15:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-01  6:44 UBI assert failed in ubi_wl_init Timo Ketola
2018-02-04 13:44 ` Richard Weinberger
2018-02-05  6:39   ` Timo Ketola
2018-02-12 22:49     ` Richard Weinberger
2018-02-13 11:58       ` Timo Ketola
2018-02-13 12:42         ` Richard Weinberger
2018-02-13 14:00           ` Timo Ketola
2018-02-18 20:31             ` Richard Weinberger
2018-03-16 13:34               ` Timo Ketola
2018-03-19  7:13                 ` Timo Ketola
2018-03-20 22:02                 ` Richard Weinberger
2018-03-22 13:57                   ` Timo Ketola
2018-03-22 15:05                     ` Richard Weinberger
2018-03-22 15:40                       ` Timo Ketola
2018-03-22 15:48                         ` Richard Weinberger [this message]
2018-03-23  9:26                           ` Timo Ketola
2018-03-23  9:35                             ` Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2385502.GW1C2yTnO0@blindfold \
    --to=richard@sigma-star.at \
    --cc=linux-mtd@lists.infradead.org \
    --cc=timo@exertus.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.