All of lore.kernel.org
 help / color / mirror / Atom feed
* ubifs corrupt
@ 2009-04-28  1:51 jerry
  2009-05-05  5:02 ` Artem Bityutskiy
  0 siblings, 1 reply; 7+ messages in thread
From: jerry @ 2009-04-28  1:51 UTC (permalink / raw)
  To: linux-mtd

>
> jerry wrote:
>>
>> Hi Adrian,
>>
>> I'm getting some problem with UBIFS when the power is switched off abruptly
>>  during a write to flash(nandflash 2k/page). In the next boot the contents of
>>  the file is not found and prints the following information.
>>
>> UBIFS error (pid 358): ubifs_check_node: bad magic 0xffffffff,
>> expected 0x6101831
>> UBIFS error (pid 358): ubifs_check_node: bad node at LEB 27:251264
>> UBIFS error (pid 358): ubifs_read_node: expected node type 2
>> UBIFS error (pid 358): ubifs_check_node: bad magic 0xffffffff,
>> expected 0x6101831
>> UBIFS error (pid 358): ubifs_check_node: bad node at LEB 27:251264
>> UBIFS error (pid 358): ubifs_read_node: expected node type 2
>> problem renaming the file /Settings/qpe.conf.new to /Settings/qpe.conf
>> UBIFS error (pid 358): ubifs_check_node: bad magic 0xffffffff,
>> expected 0x6101831
>> UBIFS error (pid 358): ubifs_check_node: bad node at LEB 27:251264
>> UBIFS error (pid 358): ubifs_read_node: expected node type 2
>>
>> I think the qpe.conf is writting when the power is off and The problem
>> is reproducable.
>>
>> Please could you tell me if this is a known issue.
>
> Do you have this patch?
>
>        http://git.infradead.org/ubifs-2.6.git?a=commitdiff;h=de0975781a1a8bc92e07eb7681d10ef9bb5e6df9
>
1.I have  this patch:
     http://git.infradead.org/ubifs-2.6.git?a=commitdiff;h=de0975781a1a8bc92e07eb7681d10ef9bb5e6df9
2.The ubifs is updated to 2.6.28.
3. kernel version is 2.6.24.
4.The information:
UBIFS error (pid 434): ubifs_read_node: bad node type (255 but expected 2)
UBIFS error (pid 434): ubifs_read_node: bad node at LEB 16:512360
Call Trace:
[<8002057c>] dump_stack+0x8/0x34
[<80187028>] ubifs_read_node+0x3ac/0x404
[<801b2aa0>] ubifs_tnc_read_node+0x1c0/0x240
[<8018b5b4>] tnc_read_node_nm+0x88/0x28c
[<8018cf44>] ubifs_tnc_next_ent+0x1cc/0x300
[<8017ef58>] ubifs_readdir+0x210/0x674
[<800bf38c>] vfs_readdir+0xd0/0xfc
[<800bf424>] sys_getdents64+0x6c/0x100
[<800227b0>] stack_done+0x20/0x3c
UBIFS error (pid 434): ubifs_readdir: cannot find next direntry, error -22
UBIFS error (pid 434): ubifs_read_node: bad node type (255 but expected 2)
UBIFS error (pid 434): ubifs_read_node: bad node at LEB 16:512360
Call Trace:
[<8002057c>] dump_stack+0x8/0x34
[<80187028>] ubifs_read_node+0x3ac/0x404
[<801b2aa0>] ubifs_tnc_read_node+0x1c0/0x240
[<8018b5b4>] tnc_read_node_nm+0x88/0x28c
[<8018cf44>] ubifs_tnc_next_ent+0x1cc/0x300
[<8017ef58>] ubifs_readdir+0x210/0x674
[<800bf38c>] vfs_readdir+0xd0/0xfc
[<800bf520>] sys_getdents+0x68/0xfc
[<800227b0>] stack_done+0x20/0x3c
UBIFS error (pid 434): ubifs_readdir: cannot find next direntry, error -22
# dmesg
ff ff ff                          ........................
Call Trace:
[<8002057c>] dump_stack+0x8/0x34
[<80187028>] ubifs_read_node+0x3ac/0x404
[<801b2aa0>] ubifs_tnc_read_node+0x1c0/0x240
[<8018b5b4>] tnc_read_node_nm+0x88/0x28c
[<8018e298>] ubifs_tnc_locate+0x1e0/0x22c
[<8018e32c>] ubifs_tnc_lookup_nm+0x48/0x2a0
[<8017fe90>] ubifs_lookup+0xf0/0x358
[<800b71fc>] do_lookup+0x1b0/0x1fc
[<800b95ec>] __link_path_walk+0x850/0x19a0
[<800ba914>] link_path_walk+0x1d8/0x3ac
[<800bb0c8>] do_path_lookup+0x188/0x6dc
[<800bc0f4>] __user_walk_fd+0x54/0x88
[<800a9fec>] sys_faccessat+0xe0/0x198
[<800227b0>] stack_done+0x20/0x3c
UBIFS error (pid 368): ubifs_read_node: bad node type (255 but expected 2)
UBIFS error (pid 368): ubifs_read_node: bad node at LEB 16:512360
Not a node, first 24 bytes:<7>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
........................
5.when I select the UBIFS_FS_DEBUG_CHKS = y,the file system is ok.But
it is very slow.
Thanks for your help !
Regards,
jerry

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ubifs corrupt
  2009-04-28  1:51 ubifs corrupt jerry
@ 2009-05-05  5:02 ` Artem Bityutskiy
  2009-05-06 10:29   ` jerry
  0 siblings, 1 reply; 7+ messages in thread
From: Artem Bityutskiy @ 2009-05-05  5:02 UTC (permalink / raw)
  To: jerry; +Cc: linux-mtd

On Tue, 2009-04-28 at 09:51 +0800, jerry wrote:
> > Do you have this patch?
> >
> >        http://git.infradead.org/ubifs-2.6.git?a=commitdiff;h=de0975781a1a8bc92e07eb7681d10ef9bb5e6df9
> >
> 1.I have  this patch:
>      http://git.infradead.org/ubifs-2.6.git?a=commitdiff;h=de0975781a1a8bc92e07eb7681d10ef9bb5e6df9
> 2.The ubifs is updated to 2.6.28.
> 3. kernel version is 2.6.24.
> 4.The information:
> UBIFS error (pid 434): ubifs_read_node: bad node type (255 but expected 2)
> UBIFS error (pid 434): ubifs_read_node: bad node at LEB 16:512360
> Call Trace:
> [<8002057c>] dump_stack+0x8/0x34
> [<80187028>] ubifs_read_node+0x3ac/0x404
> [<801b2aa0>] ubifs_tnc_read_node+0x1c0/0x240
> [<8018b5b4>] tnc_read_node_nm+0x88/0x28c
> [<8018cf44>] ubifs_tnc_next_ent+0x1cc/0x300
> [<8017ef58>] ubifs_readdir+0x210/0x674
> [<800bf38c>] vfs_readdir+0xd0/0xfc
> [<800bf424>] sys_getdents64+0x6c/0x100
> [<800227b0>] stack_done+0x20/0x3c
> UBIFS error (pid 434): ubifs_readdir: cannot find next direntry, error -22
> UBIFS error (pid 434): ubifs_read_node: bad node type (255 but expected 2)
> UBIFS error (pid 434): ubifs_read_node: bad node at LEB 16:512360
> Call Trace:
> [<8002057c>] dump_stack+0x8/0x34
> [<80187028>] ubifs_read_node+0x3ac/0x404
> [<801b2aa0>] ubifs_tnc_read_node+0x1c0/0x240
> [<8018b5b4>] tnc_read_node_nm+0x88/0x28c
> [<8018cf44>] ubifs_tnc_next_ent+0x1cc/0x300
> [<8017ef58>] ubifs_readdir+0x210/0x674
> [<800bf38c>] vfs_readdir+0xd0/0xfc
> [<800bf520>] sys_getdents+0x68/0xfc
> [<800227b0>] stack_done+0x20/0x3c
> UBIFS error (pid 434): ubifs_readdir: cannot find next direntry, error -22
> # dmesg
> ff ff ff                          ........................
> Call Trace:
> [<8002057c>] dump_stack+0x8/0x34
> [<80187028>] ubifs_read_node+0x3ac/0x404
> [<801b2aa0>] ubifs_tnc_read_node+0x1c0/0x240
> [<8018b5b4>] tnc_read_node_nm+0x88/0x28c
> [<8018e298>] ubifs_tnc_locate+0x1e0/0x22c
> [<8018e32c>] ubifs_tnc_lookup_nm+0x48/0x2a0
> [<8017fe90>] ubifs_lookup+0xf0/0x358
> [<800b71fc>] do_lookup+0x1b0/0x1fc
> [<800b95ec>] __link_path_walk+0x850/0x19a0
> [<800ba914>] link_path_walk+0x1d8/0x3ac
> [<800bb0c8>] do_path_lookup+0x188/0x6dc
> [<800bc0f4>] __user_walk_fd+0x54/0x88
> [<800a9fec>] sys_faccessat+0xe0/0x198
> [<800227b0>] stack_done+0x20/0x3c
> UBIFS error (pid 368): ubifs_read_node: bad node type (255 but expected 2)
> UBIFS error (pid 368): ubifs_read_node: bad node at LEB 16:512360
> Not a node, first 24 bytes:<7>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
> ........................
> 5.when I select the UBIFS_FS_DEBUG_CHKS = y,the file system is ok.But
> it is very slow.

Well, the error is that ubifs tries to read a directory entry,
but finds empty space there. It might be related to the way you
join you NAND chips.

Could you try to reproduce this error on a simpler setup? E.g., 
if you do not have multiple chips joined into one, or on nandsim?

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ubifs corrupt
  2009-05-05  5:02 ` Artem Bityutskiy
@ 2009-05-06 10:29   ` jerry
  2009-05-07  5:15     ` Artem Bityutskiy
  0 siblings, 1 reply; 7+ messages in thread
From: jerry @ 2009-05-06 10:29 UTC (permalink / raw)
  To: dedekind; +Cc: linux-mtd

2009/5/5 Artem Bityutskiy <dedekind@infradead.org>:
> On Tue, 2009-04-28 at 09:51 +0800, jerry wrote:
>> > Do you have this patch?
>> >
>> >        http://git.infradead.org/ubifs-2.6.git?a=commitdiff;h=de0975781a1a8bc92e07eb7681d10ef9bb5e6df9
>> >
>> 1.I have  this patch:
>>      http://git.infradead.org/ubifs-2.6.git?a=commitdiff;h=de0975781a1a8bc92e07eb7681d10ef9bb5e6df9
>> 2.The ubifs is updated to 2.6.28.
>> 3. kernel version is 2.6.24.
>> 4.The information:
>> UBIFS error (pid 434): ubifs_read_node: bad node type (255 but expected 2)
>> UBIFS error (pid 434): ubifs_read_node: bad node at LEB 16:512360
>> Call Trace:
>> [<8002057c>] dump_stack+0x8/0x34
>> [<80187028>] ubifs_read_node+0x3ac/0x404
>> [<801b2aa0>] ubifs_tnc_read_node+0x1c0/0x240
>> [<8018b5b4>] tnc_read_node_nm+0x88/0x28c
>> [<8018cf44>] ubifs_tnc_next_ent+0x1cc/0x300
>> [<8017ef58>] ubifs_readdir+0x210/0x674
>> [<800bf38c>] vfs_readdir+0xd0/0xfc
>> [<800bf424>] sys_getdents64+0x6c/0x100
>> [<800227b0>] stack_done+0x20/0x3c
>> UBIFS error (pid 434): ubifs_readdir: cannot find next direntry, error -22
>> UBIFS error (pid 434): ubifs_read_node: bad node type (255 but expected 2)
>> UBIFS error (pid 434): ubifs_read_node: bad node at LEB 16:512360
>> Call Trace:
>> [<8002057c>] dump_stack+0x8/0x34
>> [<80187028>] ubifs_read_node+0x3ac/0x404
>> [<801b2aa0>] ubifs_tnc_read_node+0x1c0/0x240
>> [<8018b5b4>] tnc_read_node_nm+0x88/0x28c
>> [<8018cf44>] ubifs_tnc_next_ent+0x1cc/0x300
>> [<8017ef58>] ubifs_readdir+0x210/0x674
>> [<800bf38c>] vfs_readdir+0xd0/0xfc
>> [<800bf520>] sys_getdents+0x68/0xfc
>> [<800227b0>] stack_done+0x20/0x3c
>> UBIFS error (pid 434): ubifs_readdir: cannot find next direntry, error -22
>> # dmesg
>> ff ff ff                          ........................
>> Call Trace:
>> [<8002057c>] dump_stack+0x8/0x34
>> [<80187028>] ubifs_read_node+0x3ac/0x404
>> [<801b2aa0>] ubifs_tnc_read_node+0x1c0/0x240
>> [<8018b5b4>] tnc_read_node_nm+0x88/0x28c
>> [<8018e298>] ubifs_tnc_locate+0x1e0/0x22c
>> [<8018e32c>] ubifs_tnc_lookup_nm+0x48/0x2a0
>> [<8017fe90>] ubifs_lookup+0xf0/0x358
>> [<800b71fc>] do_lookup+0x1b0/0x1fc
>> [<800b95ec>] __link_path_walk+0x850/0x19a0
>> [<800ba914>] link_path_walk+0x1d8/0x3ac
>> [<800bb0c8>] do_path_lookup+0x188/0x6dc
>> [<800bc0f4>] __user_walk_fd+0x54/0x88
>> [<800a9fec>] sys_faccessat+0xe0/0x198
>> [<800227b0>] stack_done+0x20/0x3c
>> UBIFS error (pid 368): ubifs_read_node: bad node type (255 but expected 2)
>> UBIFS error (pid 368): ubifs_read_node: bad node at LEB 16:512360
>> Not a node, first 24 bytes:<7>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
>> ........................
>> 5.when I select the UBIFS_FS_DEBUG_CHKS = y,the file system is ok.But
>> it is very slow.
>
> Well, the error is that ubifs tries to read a directory entry,
> but finds empty space there. It might be related to the way you
> join you NAND chips.
>
> Could you try to reproduce this error on a simpler setup? E.g.,
> if you do not have multiple chips joined into one, or on nandsim?
>
> --
> Best regards,
> Artem Bityutskiy (Битюцкий Артём)
>
>
Ok, I will test  one nandflash(K9GAG08U0M).Thank you for your help,I
will report the result as soon as I can.
If the error has happened,ubifs oughts to recover from it.
when I select the UBIFS_FS_DEBUG_CHKS = y,the ubifs file system is
recovered.I think it is recovered only in memory. Why it is not saved
on the nandflash?
Thank you for your help again!

Best regards,
Jerry

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ubifs corrupt
  2009-05-06 10:29   ` jerry
@ 2009-05-07  5:15     ` Artem Bityutskiy
  0 siblings, 0 replies; 7+ messages in thread
From: Artem Bityutskiy @ 2009-05-07  5:15 UTC (permalink / raw)
  To: jerry; +Cc: linux-mtd

On Wed, 2009-05-06 at 18:29 +0800, jerry wrote:
> > Well, the error is that ubifs tries to read a directory entry,
> > but finds empty space there. It might be related to the way you
> > join you NAND chips.
> >
> > Could you try to reproduce this error on a simpler setup? E.g.,
> > if you do not have multiple chips joined into one, or on nandsim?
> >
> > --
> > Best regards,
> > Artem Bityutskiy (Битюцкий Артём)
> >
> >
> Ok, I will test  one nandflash(K9GAG08U0M).Thank you for your help,I
> will report the result as soon as I can.
> If the error has happened,ubifs oughts to recover from it.
> when I select the UBIFS_FS_DEBUG_CHKS = y,the ubifs file system is
> recovered.I think it is recovered only in memory. Why it is not saved
> on the nandflash?

Hmm, this sounds like it is more likely UBIFS bug...

UBIFS_FS_DEBUG_CHKS just enables additional self-checks. It
is not designed for recovery. What you see is some side effect.
UBIFS should recover without UBIFS_FS_DEBUG_CHKS.

We do not have setup with that large eraseblocks. And we are
very busy now.

But if you want this problem to be fixed, the best you could do
is to find an easy way to reproduce the problem. Could you try
to simulate a similar flash with nandsim somehow? And if
you can reproduce this on your host with nandsim, this means
we can reproduce this here, which means we can try to fix
this.

E.g., you could join several nandsim partitions similar way
you joined your real chips.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ubifs corrupt
  2009-04-14  8:05 jerry
  2009-04-14  8:32 ` Adrian Hunter
@ 2009-04-14  9:02 ` Artem Bityutskiy
  1 sibling, 0 replies; 7+ messages in thread
From: Artem Bityutskiy @ 2009-04-14  9:02 UTC (permalink / raw)
  To: jerry; +Cc: linux-mtd

Hi!

On Tue, 2009-04-14 at 16:05 +0800, jerry wrote:
> I'm getting some problem with UBIFS when the power is switched off abruptly
>  during a write to flash(nandflash 2k/page). In the next boot the contents of
>  the file is not found and prints the following information.
> 
> UBIFS error (pid 358): ubifs_check_node: bad magic 0xffffffff,
> expected 0x6101831
> UBIFS error (pid 358): ubifs_check_node: bad node at LEB 27:251264
> UBIFS error (pid 358): ubifs_read_node: expected node type 2
> UBIFS error (pid 358): ubifs_check_node: bad magic 0xffffffff,
> expected 0x6101831
> UBIFS error (pid 358): ubifs_check_node: bad node at LEB 27:251264
> UBIFS error (pid 358): ubifs_read_node: expected node type 2
> problem renaming the file /Settings/qpe.conf.new to /Settings/qpe.conf
> UBIFS error (pid 358): ubifs_check_node: bad magic 0xffffffff,
> expected 0x6101831
> UBIFS error (pid 358): ubifs_check_node: bad node at LEB 27:251264
> UBIFS error (pid 358): ubifs_read_node: expected node type 2
> 
> I think the qpe.conf is writting when the power is off and The problem
> is reproducable.
> 
> Please could you tell me if this is a known issue.
> 
> Thanks for your help and time!

Could you please, check what Adrian pointed. And if this does
not help, could you please send a bug report as described here:
http://www.linux-mtd.infradead.org/doc/ubifs.html#L_how_send_bugreport

We are usually especially interested in items 1, 3, 4.

Thanks!

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ubifs corrupt
  2009-04-14  8:05 jerry
@ 2009-04-14  8:32 ` Adrian Hunter
  2009-04-14  9:02 ` Artem Bityutskiy
  1 sibling, 0 replies; 7+ messages in thread
From: Adrian Hunter @ 2009-04-14  8:32 UTC (permalink / raw)
  To: jerry; +Cc: linux-mtd

jerry wrote:
> Hi Artem,
> 
> I'm getting some problem with UBIFS when the power is switched off abruptly
>  during a write to flash(nandflash 2k/page). In the next boot the contents of
>  the file is not found and prints the following information.
> 
> UBIFS error (pid 358): ubifs_check_node: bad magic 0xffffffff,
> expected 0x6101831
> UBIFS error (pid 358): ubifs_check_node: bad node at LEB 27:251264
> UBIFS error (pid 358): ubifs_read_node: expected node type 2
> UBIFS error (pid 358): ubifs_check_node: bad magic 0xffffffff,
> expected 0x6101831
> UBIFS error (pid 358): ubifs_check_node: bad node at LEB 27:251264
> UBIFS error (pid 358): ubifs_read_node: expected node type 2
> problem renaming the file /Settings/qpe.conf.new to /Settings/qpe.conf
> UBIFS error (pid 358): ubifs_check_node: bad magic 0xffffffff,
> expected 0x6101831
> UBIFS error (pid 358): ubifs_check_node: bad node at LEB 27:251264
> UBIFS error (pid 358): ubifs_read_node: expected node type 2
> 
> I think the qpe.conf is writting when the power is off and The problem
> is reproducable.
> 
> Please could you tell me if this is a known issue.

Do you have this patch?

	http://git.infradead.org/ubifs-2.6.git?a=commitdiff;h=de0975781a1a8bc92e07eb7681d10ef9bb5e6df9

^ permalink raw reply	[flat|nested] 7+ messages in thread

* ubifs corrupt
@ 2009-04-14  8:05 jerry
  2009-04-14  8:32 ` Adrian Hunter
  2009-04-14  9:02 ` Artem Bityutskiy
  0 siblings, 2 replies; 7+ messages in thread
From: jerry @ 2009-04-14  8:05 UTC (permalink / raw)
  To: linux-mtd

Hi Artem,

I'm getting some problem with UBIFS when the power is switched off abruptly
 during a write to flash(nandflash 2k/page). In the next boot the contents of
 the file is not found and prints the following information.

UBIFS error (pid 358): ubifs_check_node: bad magic 0xffffffff,
expected 0x6101831
UBIFS error (pid 358): ubifs_check_node: bad node at LEB 27:251264
UBIFS error (pid 358): ubifs_read_node: expected node type 2
UBIFS error (pid 358): ubifs_check_node: bad magic 0xffffffff,
expected 0x6101831
UBIFS error (pid 358): ubifs_check_node: bad node at LEB 27:251264
UBIFS error (pid 358): ubifs_read_node: expected node type 2
problem renaming the file /Settings/qpe.conf.new to /Settings/qpe.conf
UBIFS error (pid 358): ubifs_check_node: bad magic 0xffffffff,
expected 0x6101831
UBIFS error (pid 358): ubifs_check_node: bad node at LEB 27:251264
UBIFS error (pid 358): ubifs_read_node: expected node type 2

I think the qpe.conf is writting when the power is off and The problem
is reproducable.

Please could you tell me if this is a known issue.

Thanks for your help and time!

Regards,

Jerry

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-05-07  5:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-28  1:51 ubifs corrupt jerry
2009-05-05  5:02 ` Artem Bityutskiy
2009-05-06 10:29   ` jerry
2009-05-07  5:15     ` Artem Bityutskiy
  -- strict thread matches above, loose matches on Subject: below --
2009-04-14  8:05 jerry
2009-04-14  8:32 ` Adrian Hunter
2009-04-14  9:02 ` Artem Bityutskiy

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.