linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Han Xu <xhnjupt@gmail.com>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: Han Xu <han.xu@nxp.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: 5.2.0-rc1 UBIFS bad unlock balance
Date: Mon, 12 Aug 2019 14:40:17 -0500	[thread overview]
Message-ID: <CA+EcR23V1nP9d6iYysT6vR+n8-BRnU-vursaxvcGB1LdBy+8NQ@mail.gmail.com> (raw)
In-Reply-To: <CAFLxGvwZ_85eR5Qkjka4CyDOAP_jw-hpk7WwttbAzjLFS4MavQ@mail.gmail.com>

On Tue, Jun 4, 2019 at 3:59 PM Richard Weinberger
<richard.weinberger@gmail.com> wrote:
>
> On Tue, Jun 4, 2019 at 10:21 PM Han Xu <han.xu@nxp.com> wrote:
> >
> > Hi Richard,
> >
> > Found such issue with lock debugging. Running bonnie++ on QSPI with UBIFS.
> >
> > Erasing 64 Kibyte @ 1ff0000 -- 100 % complete
> > [  129.575631] ubi0: attaching mtd0
> > [  129.620067] ubi0: scanning is finished
> > [  129.623888] ubi0: empty MTD device detected
> > [  129.723031] ubi0: attached mtd0 (name "30bb0000.spi", size 32 MiB)
> > [  129.729289] ubi0: PEB size: 65536 bytes (64 KiB), LEB size: 65408 bytes
> > [  129.735994] ubi0: min./max. I/O unit sizes: 1/256, sub-page size 1
> > [  129.742267] ubi0: VID header offset: 64 (aligned 64), data offset: 128
> > [  129.748915] ubi0: good PEBs: 512, bad PEBs: 0, corrupted PEBs: 0
> > [  129.755026] ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
> > [  129.762365] ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 445061296
> > [  129.771508] ubi0: available PEBs: 508, total reserved PEBs: 4, PEBs reserved for bad PEB handling: 0
> > [  129.781182] ubi0: background thread "ubi_bgt0d" started, PID 516
> > UBI device number 0, total 512 LEBs (33488896 bytes, 31.9 MiB), available 508 LEBs (33227264 bytes, 31.6 MiB), LEB size 65408 bytes (63.8 KiB)
> > Set volume size to 33227264
> > Volume ID 0, size 508 LEBs (33227264 bytes, 31.6 MiB), LEB size 65408 bytes (63.8 KiB), dynamic, name "test", alignment 1
> > [  132.036227] UBIFS (ubi0:0): default file-system created
> > [  132.046036] UBIFS (ubi0:0): Mounting in unauthenticated mode
> > [  132.052526] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 524
> > [  132.095082] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "test"
> > [  132.102377] UBIFS (ubi0:0): LEB size: 65408 bytes (63 KiB), min./max. I/O unit sizes: 8 bytes/256 bytes
> > [  132.111870] UBIFS (ubi0:0): FS size: 32573184 bytes (31 MiB, 498 LEBs), journal size 1635200 bytes (1 MiB, 25 LEBs)
> > [  132.122423] UBIFS (ubi0:0): reserved for root: 1538511 bytes (1502 KiB)
> > [  132.129123] UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID 2866BEC7-B74D-4793-8A66-E113C824711F, small LPT model
> > Using uid:0, gid:0.
> > Writing with putc()...done
> > Writing intelligently...done
> > Rewriting...done
> > Reading with getc()...done
> > Reading intelligently...done
> > start 'em...done...done...done...
> > Create files in sequential order...done.
> > Stat files in sequential order...done.
> > Delete files in sequential order...[  162.282301]
> > [  162.283809] =====================================
> > [  162.288514] WARNING: bad unlock balance detected!
> > [  162.293221] 5.2.0-rc1-next-20190524-45490-g89d8c504132e-dirty #24 Not tainted
> > [  162.300356] -------------------------------------
> > [  162.305061] bonnie++/525 is trying to release lock (&(&c->orphan_lock)->rlock) at:
> > [  162.312643] [<ffff0000104a0774>] ubifs_delete_orphan+0xec/0xfc
> > [  162.318476] but there are no more locks to release!
> > [  162.323353]
> > [  162.323353] other info that might help us debug this:
> > [  162.329881] 2 locks held by bonnie++/525:
> > [  162.333890]  #0: 00000000a21aa66e (sb_writers#10){.+.+}, at: mnt_want_write+0x20/0x4c
> > [  162.341734]  #1: 000000002fe597e5 (&c->commit_sem){++++}, at: make_reservation+0x84/0x3b4
> > [  162.349919]
> > [  162.349919] stack backtrace:
> > [  162.354281] CPU: 1 PID: 525 Comm: bonnie++ Not tainted 5.2.0-rc1-next-20190524-45490-g89d8c504132e-dirty #24
>
> I see the bug, thanks a lot for reporting!
> But it is not in 5.2-rc1, the bad commit is so far only in linux-next.

Ping, any fixing plans?

>
> --
> Thanks,
> //richard
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/



-- 
Sincerely,

Han XU

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2019-08-12 19:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 20:21 5.2.0-rc1 UBIFS bad unlock balance Han Xu
2019-06-04 20:59 ` Richard Weinberger
2019-08-12 19:40   ` Han Xu [this message]
2019-08-12 19:55     ` Richard Weinberger
2019-08-13 19:33       ` Han Xu
2019-08-13 19:48         ` Richard Weinberger
2019-08-13 19:59           ` [EXT] " Han Xu

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=CA+EcR23V1nP9d6iYysT6vR+n8-BRnU-vursaxvcGB1LdBy+8NQ@mail.gmail.com \
    --to=xhnjupt@gmail.com \
    --cc=han.xu@nxp.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard.weinberger@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).