linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: "李傲傲 (Carson Li1/9542)" <Carson.Li1@unisoc.com>
Cc: linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: ubifs: read bad node type in ubifs_tnc_read_wbuf
Date: Mon, 13 Jan 2020 00:48:55 +0100 (CET)	[thread overview]
Message-ID: <733427970.19532.1578872935782.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <46e2f6ca11a442f38d476d4346e8034c@shmbx04.spreadtrum.com>

----- Ursprüngliche Mail -----
> Von: "李傲傲 (Carson Li1/9542)" <Carson.Li1@unisoc.com>
> An: "linux-mtd" <linux-mtd@lists.infradead.org>, "richard" <richard@nod.at>
> Gesendet: Freitag, 10. Januar 2020 08:46:38
> Betreff: FW: ubifs: read bad node type in ubifs_tnc_read_wbuf

> Hi mtd-list:

> I have a problem recently on ubifs: kernel reports to read a bad node type in

> ubifs_tnc_read_wbuf.

> I guess th e problem occurs because of tnc_mutex is freed in ubifs_tnc_locate.

> Though it marks the journal heads will not be GCed. But if there is a commit
> just

> finished, LEBs in journal heads will not be in bud rbtree anymore. And it might

> be GCed. Here is the kernel log:

> ------------------------------------------------kernel log
> ----------------------------------------------

> [ 30.072901] c0 UBIFS error (ubi0:23 pid 944): ubifs_read_node_wbuf: bad node
> type (232 but expected 0)

> [ 30.085890] c1 UBIFS error (ubi0:23 pid 944): ubifs_read_node_wbuf:
> wbuf=cd008f40,buf=d4cd9000,

> wbuf->buf=c90ec000,offs=164320, len=160, rlen=0

Do you have a test/reproducer for this issue?

Also see:
commit 601c0bc46753007be011b513ba4fc50ed8e30aef
Author: Adrian Hunter <ext-adrian.hunter@nokia.com>
Date:   Fri Aug 22 14:23:35 2008 +0300

    UBIFS: allow for racing between GC and TNC
    
    The TNC mutex is unlocked prematurely when reading leaf nodes
    with non-hashed keys.  This is unsafe because the node may be
    moved by garbage collection and the eraseblock unmapped, although
    that has never actually happened during stress testing.
    
    This patch fixes the flaw by detecting the race and retrying with
    the TNC mutex locked.
    
    Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>

It really looks like a journal is being garbage collected. Hmm.

Thanks,
//richard

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

       reply	other threads:[~2020-01-12 23:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <e2d34800d72243ed85e8df63bb80f7ab@shmbx04.spreadtrum.com>
     [not found] ` <ce621148db0e4f9c80f32c348975663a@shmbx04.spreadtrum.com>
     [not found]   ` <ae16d475c0d24c1ba6ab18f1e766e928@shmbx04.spreadtrum.com>
     [not found]     ` <46e2f6ca11a442f38d476d4346e8034c@shmbx04.spreadtrum.com>
2020-01-12 23:48       ` Richard Weinberger [this message]
2020-01-14  1:09         ` ubifs: read bad node type in ubifs_tnc_read_wbuf 李傲傲 (Carson Li1/9542)
2020-01-14  8:09           ` Richard Weinberger
2020-01-14  8:28             ` 李傲傲 (Carson Li1/9542)
2020-01-14 11:01             ` 李傲傲 (Carson Li1/9542)
2020-01-14 23:16               ` Richard Weinberger
2020-01-16  0:54                 ` 李傲傲 (Carson Li1/9542)
2020-02-19 12:03                 ` 李傲傲 (Carson Li1/9542)
2020-02-26 12:11                   ` Hou Tao
2020-02-27  1:18                     ` 李傲傲 (Carson Li1/9542)
2020-02-27  6:34                       ` Hou Tao
2020-02-27  6:49                         ` 李傲傲 (Carson Li1/9542)
2020-03-02  1:39                           ` Hou Tao
2020-03-02  3:12                             ` 李傲傲 (Carson Li1/9542)
2020-03-02  6:35                               ` Hou Tao
2020-03-02  7:56                                 ` 李傲傲 (Carson Li1/9542)
2020-03-02 10:23                                   ` Hou Tao
2020-03-03  1:21                                     ` 李傲傲 (Carson Li1/9542)
2020-01-10  9:10 李傲傲 (Carson Li1/9542)

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=733427970.19532.1578872935782.JavaMail.zimbra@nod.at \
    --to=richard@nod.at \
    --cc=Carson.Li1@unisoc.com \
    --cc=linux-mtd@lists.infradead.org \
    /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).