All of lore.kernel.org
 help / color / mirror / Atom feed
* ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22
@ 2022-04-14 16:45 Scott Zhang
  2022-04-14 17:24 ` Miquel Raynal
  0 siblings, 1 reply; 11+ messages in thread
From: Scott Zhang @ 2022-04-14 16:45 UTC (permalink / raw)
  To: linux-mtd

Hello. Everyone.
     I encountered a strange problem about ubifs. My embed linux runs
well normally. But after about 3-4 days, developing php application,
copying files etc.. the /opt partition when read, the system become
very slow. After check dmesg
the output contains full of debug logs as below.

[17588.040000] UBIFS error (ubi0:0 pid 15691): do_readpage: cannot
read page 15 of inode 396, error -22
[17590.080000] UBIFS error (ubi0:0 pid 15695): ubifs_decompress:
cannot decompress 2293 bytes, compressor lzo, error -22
[17590.090000] UBIFS error (ubi0:0 pid 15695): do_readpage: bad data
node (block 15, inode 396)
lots of hex dump, seems normal data

Based on my understanding of ubi and ubi fs. The bottomest nand driver
has the ecc correction, then ubi has crc32 to verify data write and
read. Then when data come to ubifs, the data should be always correct.
Anything wrong will be reported firstly by ubi below or mtd nand
driver below.
So the msg shows above confuse me. Why did decompress fail for passed
crc32 data?
Is there anyway to simple drop the block 15, inode 396 so no warning
anymore. Even so many logs dumped ,the system continues runs , but
ramdomly hangs. Maybe no hang, the linux run led continues blink,
network led blink, the ping ip is not react.
Because I port the nand driver myself, and port everything to make
nand working. So Is there a possibility I make ecc checksum wrong,
then get this wierd problem?

I googled first, and only see related discuss on 2011 but can't see it help.
https://linux-mtd.infradead.narkive.com/c65SedYp/ubifs-decompress-cannot-decompress

Thanks.
Scott Zhang

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

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

* Re: ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22
  2022-04-14 16:45 ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22 Scott Zhang
@ 2022-04-14 17:24 ` Miquel Raynal
  2022-04-15  4:38   ` Scott Zhang
  0 siblings, 1 reply; 11+ messages in thread
From: Miquel Raynal @ 2022-04-14 17:24 UTC (permalink / raw)
  To: Scott Zhang; +Cc: linux-mtd

Hi Scott,

macromarship@gmail.com wrote on Fri, 15 Apr 2022 00:45:23 +0800:

> Hello. Everyone.
>      I encountered a strange problem about ubifs. My embed linux runs
> well normally. But after about 3-4 days, developing php application,
> copying files etc.. the /opt partition when read, the system become
> very slow. After check dmesg
> the output contains full of debug logs as below.
> 
> [17588.040000] UBIFS error (ubi0:0 pid 15691): do_readpage: cannot
> read page 15 of inode 396, error -22
> [17590.080000] UBIFS error (ubi0:0 pid 15695): ubifs_decompress:
> cannot decompress 2293 bytes, compressor lzo, error -22
> [17590.090000] UBIFS error (ubi0:0 pid 15695): do_readpage: bad data
> node (block 15, inode 396)
> lots of hex dump, seems normal data
> 
> Based on my understanding of ubi and ubi fs. The bottomest nand driver
> has the ecc correction, then ubi has crc32 to verify data write and
> read. Then when data come to ubifs, the data should be always correct.
> Anything wrong will be reported firstly by ubi below or mtd nand
> driver below.
> So the msg shows above confuse me. Why did decompress fail for passed
> crc32 data?
> Is there anyway to simple drop the block 15, inode 396 so no warning
> anymore. Even so many logs dumped ,the system continues runs , but
> ramdomly hangs. Maybe no hang, the linux run led continues blink,
> network led blink, the ping ip is not react.
> Because I port the nand driver myself, and port everything to make
> nand working. So Is there a possibility I make ecc checksum wrong,
> then get this wierd problem?
> 
> I googled first, and only see related discuss on 2011 but can't see it help.
> https://linux-mtd.infradead.narkive.com/c65SedYp/ubifs-decompress-cannot-decompress

Hello Scott, if you are unsure about your NAND implementation you can
run all the nand/ubi tests available in the mtd-utils test suite (also
available as a Buildroot package):
https://git.infradead.org/mtd-utils.git

Thanks,
Miquèl

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

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

* Re: ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22
  2022-04-14 17:24 ` Miquel Raynal
@ 2022-04-15  4:38   ` Scott Zhang
  2022-04-15  8:29     ` Miquel Raynal
  0 siblings, 1 reply; 11+ messages in thread
From: Scott Zhang @ 2022-04-15  4:38 UTC (permalink / raw)
  To: Miquel Raynal; +Cc: linux-mtd

Hi. Miquèl.
Yes. I tried nandbiterrs, the result is below. Looks ecc is not working .

[root@jgcx: ~]#./nandbiterrs /dev/mtd2 -i
incremental biterrors test
Successfully corrected 0 bit errors per subpage
Inserted biterror @ 0/5
Failed to recover 1 bitflips
Read error after 1 bit errors per page

By checking the nand driver whichi is nuc980_nand.c

https://github.com/OpenNuvoton/NUC980-linux-4.4.y/blob/master/drivers/mtd/nand/nuc980_nand.c


* Enable HW ECC : unused on most chips
*/
void nuc980_nand_enable_hwecc(struct mtd_info *mtd, int mode)
{
ENTER();
#ifdef NUC980_NAND_DEBUG
{
char * ptr=REG_SMRA0;
int i=0;
if( mode == NAND_ECC_READ )
printk("[R]=\n");
else
printk("[W]=\n");

for(i=0; i<mtd->oobsize; i++)
{
printk("%X ", *(ptr+i) );
if ( i % 32 == 31)
printk("\n");
}
printk("\n");
}
#endif
LEAVE();
}


I guess the nuc980 driver doesn't support ecc correction.



On Fri, Apr 15, 2022 at 1:24 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> Hi Scott,
>
> macromarship@gmail.com wrote on Fri, 15 Apr 2022 00:45:23 +0800:
>
> > Hello. Everyone.
> >      I encountered a strange problem about ubifs. My embed linux runs
> > well normally. But after about 3-4 days, developing php application,
> > copying files etc.. the /opt partition when read, the system become
> > very slow. After check dmesg
> > the output contains full of debug logs as below.
> >
> > [17588.040000] UBIFS error (ubi0:0 pid 15691): do_readpage: cannot
> > read page 15 of inode 396, error -22
> > [17590.080000] UBIFS error (ubi0:0 pid 15695): ubifs_decompress:
> > cannot decompress 2293 bytes, compressor lzo, error -22
> > [17590.090000] UBIFS error (ubi0:0 pid 15695): do_readpage: bad data
> > node (block 15, inode 396)
> > lots of hex dump, seems normal data
> >
> > Based on my understanding of ubi and ubi fs. The bottomest nand driver
> > has the ecc correction, then ubi has crc32 to verify data write and
> > read. Then when data come to ubifs, the data should be always correct.
> > Anything wrong will be reported firstly by ubi below or mtd nand
> > driver below.
> > So the msg shows above confuse me. Why did decompress fail for passed
> > crc32 data?
> > Is there anyway to simple drop the block 15, inode 396 so no warning
> > anymore. Even so many logs dumped ,the system continues runs , but
> > ramdomly hangs. Maybe no hang, the linux run led continues blink,
> > network led blink, the ping ip is not react.
> > Because I port the nand driver myself, and port everything to make
> > nand working. So Is there a possibility I make ecc checksum wrong,
> > then get this wierd problem?
> >
> > I googled first, and only see related discuss on 2011 but can't see it help.
> > https://linux-mtd.infradead.narkive.com/c65SedYp/ubifs-decompress-cannot-decompress
>
> Hello Scott, if you are unsure about your NAND implementation you can
> run all the nand/ubi tests available in the mtd-utils test suite (also
> available as a Buildroot package):
> https://git.infradead.org/mtd-utils.git
>
> Thanks,
> Miquèl

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

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

* Re: ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22
  2022-04-15  4:38   ` Scott Zhang
@ 2022-04-15  8:29     ` Miquel Raynal
  2022-04-19  2:05       ` Scott Zhang
  0 siblings, 1 reply; 11+ messages in thread
From: Miquel Raynal @ 2022-04-15  8:29 UTC (permalink / raw)
  To: Scott Zhang; +Cc: linux-mtd

Hi Scott,

macromarship@gmail.com wrote on Fri, 15 Apr 2022 12:38:09 +0800:

> Hi. Miquèl.
> Yes. I tried nandbiterrs, the result is below. Looks ecc is not working .
> 
> [root@jgcx: ~]#./nandbiterrs /dev/mtd2 -i
> incremental biterrors test
> Successfully corrected 0 bit errors per subpage
> Inserted biterror @ 0/5
> Failed to recover 1 bitflips
> Read error after 1 bit errors per page
> 
> By checking the nand driver whichi is nuc980_nand.c
> 
> https://github.com/OpenNuvoton/NUC980-linux-4.4.y/blob/master/drivers/mtd/nand/nuc980_nand.c
> 
> 
> * Enable HW ECC : unused on most chips
> */
> void nuc980_nand_enable_hwecc(struct mtd_info *mtd, int mode)
> {
> ENTER();
> #ifdef NUC980_NAND_DEBUG
> {
> char * ptr=REG_SMRA0;
> int i=0;
> if( mode == NAND_ECC_READ )
> printk("[R]=\n");
> else
> printk("[W]=\n");
> 
> for(i=0; i<mtd->oobsize; i++)
> {
> printk("%X ", *(ptr+i) );
> if ( i % 32 == 31)
> printk("\n");
> }
> printk("\n");
> }
> #endif
> LEAVE();
> }
> 
> 
> I guess the nuc980 driver doesn't support ecc correction.

You cannot use NAND without proper ECC handling.

Thanks,
Miquèl

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

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

* Re: ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22
  2022-04-15  8:29     ` Miquel Raynal
@ 2022-04-19  2:05       ` Scott Zhang
  2022-04-19  7:33         ` Miquel Raynal
  0 siblings, 1 reply; 11+ messages in thread
From: Scott Zhang @ 2022-04-19  2:05 UTC (permalink / raw)
  To: Miquel Raynal; +Cc: linux-mtd

Dear Miquel:
     I have fixed the nuc980 nand driver, now the nandbiterrors works.

# ./nandbiterrs /dev/mtd3 -i
incremental biterrors test
Successfully corrected 0 bit errors per subpage
Inserted biterror @ 0/5
Read reported 1 corrected bit errors
Successfully corrected 1 bit errors per subpage
Inserted biterror @ 0/2
Read reported 2 corrected bit errors
Successfully corrected 2 bit errors per subpage
Inserted biterror @ 0/0
Read reported 3 corrected bit errors
Successfully corrected 3 bit errors per subpage
Inserted biterror @ 1/7
Read reported 4 corrected bit errors
Successfully corrected 4 bit errors per subpage
Inserted biterror @ 1/5
Read reported 5 corrected bit errors
Successfully corrected 5 bit errors per subpage
Inserted biterror @ 1/2
Read reported 6 corrected bit errors
Successfully corrected 6 bit errors per subpage
Inserted biterror @ 1/0
Read reported 7 corrected bit errors
Successfully corrected 7 bit errors per subpage
Inserted biterror @ 2/6
Read reported 8 corrected bit errors
Successfully corrected 8 bit errors per subpage
Inserted biterror @ 2/5
Failed to recover 1 bitflips
Read error after 9 bit errors per page

But I noticed the lzo decompress error is still there.
I did  following actions to test.
/dev/mtd3 is mounted on /opt using ubifs.
tar zcvf /root/opt.tar.gz /opt  (done without error)
format /opt.
tar zxvf /root/opt.tar.gz -C /

Then when I run php program which is in opt. I saw dmesg
[  118.850000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
decompress 2293 bytes, compressor lzo, error -22
[  118.860000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
node (block 15, inode 396)
[  118.870000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
page 15 of inode 396, error -22
[  118.880000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
decompress 2293 bytes, compressor lzo, error -22
[  118.900000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
node (block 15, inode 396)
[  118.900000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
page 15 of inode 396, error -22
[  118.920000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
decompress 2293 bytes, compressor lzo, error -22
[  118.930000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
node (block 15, inode 396)
[  118.940000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
page 15 of inode 396, error -22

I removed the ubifs_dump_node call to avoid many dump text. The
problem is when I run php program, lots of above logs dumped.
But I don't see any effect of the above logs. the program seems running.
Is there a possibility the underlying nand driver data is ok, but the
lzo compress/decompress code has bugs ?  I am running linux-5.4.y
cloned from kernel.org.

On Fri, Apr 15, 2022 at 4:29 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> Hi Scott,
>
> macromarship@gmail.com wrote on Fri, 15 Apr 2022 12:38:09 +0800:
>
> > Hi. Miquèl.
> > Yes. I tried nandbiterrs, the result is below. Looks ecc is not working .
> >
> > [root@jgcx: ~]#./nandbiterrs /dev/mtd2 -i
> > incremental biterrors test
> > Successfully corrected 0 bit errors per subpage
> > Inserted biterror @ 0/5
> > Failed to recover 1 bitflips
> > Read error after 1 bit errors per page
> >
> > By checking the nand driver whichi is nuc980_nand.c
> >
> > https://github.com/OpenNuvoton/NUC980-linux-4.4.y/blob/master/drivers/mtd/nand/nuc980_nand.c
> >
> >
> > * Enable HW ECC : unused on most chips
> > */
> > void nuc980_nand_enable_hwecc(struct mtd_info *mtd, int mode)
> > {
> > ENTER();
> > #ifdef NUC980_NAND_DEBUG
> > {
> > char * ptr=REG_SMRA0;
> > int i=0;
> > if( mode == NAND_ECC_READ )
> > printk("[R]=\n");
> > else
> > printk("[W]=\n");
> >
> > for(i=0; i<mtd->oobsize; i++)
> > {
> > printk("%X ", *(ptr+i) );
> > if ( i % 32 == 31)
> > printk("\n");
> > }
> > printk("\n");
> > }
> > #endif
> > LEAVE();
> > }
> >
> >
> > I guess the nuc980 driver doesn't support ecc correction.
>
> You cannot use NAND without proper ECC handling.
>
> Thanks,
> Miquèl

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

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

* Re: ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22
  2022-04-19  2:05       ` Scott Zhang
@ 2022-04-19  7:33         ` Miquel Raynal
  2022-04-19  7:44           ` Richard Weinberger
  0 siblings, 1 reply; 11+ messages in thread
From: Miquel Raynal @ 2022-04-19  7:33 UTC (permalink / raw)
  To: Scott Zhang; +Cc: linux-mtd, Richard Weinberger

Hi Scott,

+Richard

macromarship@gmail.com wrote on Tue, 19 Apr 2022 10:05:49 +0800:

> Dear Miquel:
>      I have fixed the nuc980 nand driver, now the nandbiterrors works.
> 
> # ./nandbiterrs /dev/mtd3 -i
> incremental biterrors test
> Successfully corrected 0 bit errors per subpage
> Inserted biterror @ 0/5
> Read reported 1 corrected bit errors
> Successfully corrected 1 bit errors per subpage
> Inserted biterror @ 0/2
> Read reported 2 corrected bit errors
> Successfully corrected 2 bit errors per subpage
> Inserted biterror @ 0/0
> Read reported 3 corrected bit errors
> Successfully corrected 3 bit errors per subpage
> Inserted biterror @ 1/7
> Read reported 4 corrected bit errors
> Successfully corrected 4 bit errors per subpage
> Inserted biterror @ 1/5
> Read reported 5 corrected bit errors
> Successfully corrected 5 bit errors per subpage
> Inserted biterror @ 1/2
> Read reported 6 corrected bit errors
> Successfully corrected 6 bit errors per subpage
> Inserted biterror @ 1/0
> Read reported 7 corrected bit errors
> Successfully corrected 7 bit errors per subpage
> Inserted biterror @ 2/6
> Read reported 8 corrected bit errors
> Successfully corrected 8 bit errors per subpage
> Inserted biterror @ 2/5
> Failed to recover 1 bitflips
> Read error after 9 bit errors per page

Did you run the various nand tests besides nandbiterrs? If they all
pass then maybe Richard will be more helpful than I am...

> 
> But I noticed the lzo decompress error is still there.
> I did  following actions to test.
> /dev/mtd3 is mounted on /opt using ubifs.
> tar zcvf /root/opt.tar.gz /opt  (done without error)
> format /opt.
> tar zxvf /root/opt.tar.gz -C /
> 
> Then when I run php program which is in opt. I saw dmesg
> [  118.850000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
> decompress 2293 bytes, compressor lzo, error -22
> [  118.860000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
> node (block 15, inode 396)
> [  118.870000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
> page 15 of inode 396, error -22
> [  118.880000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
> decompress 2293 bytes, compressor lzo, error -22
> [  118.900000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
> node (block 15, inode 396)
> [  118.900000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
> page 15 of inode 396, error -22
> [  118.920000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
> decompress 2293 bytes, compressor lzo, error -22
> [  118.930000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
> node (block 15, inode 396)
> [  118.940000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
> page 15 of inode 396, error -22
> 
> I removed the ubifs_dump_node call to avoid many dump text. The
> problem is when I run php program, lots of above logs dumped.
> But I don't see any effect of the above logs. the program seems running.
> Is there a possibility the underlying nand driver data is ok, but the
> lzo compress/decompress code has bugs ?  I am running linux-5.4.y
> cloned from kernel.org.
> 
> On Fri, Apr 15, 2022 at 4:29 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> >
> > Hi Scott,
> >
> > macromarship@gmail.com wrote on Fri, 15 Apr 2022 12:38:09 +0800:
> >  
> > > Hi. Miquèl.
> > > Yes. I tried nandbiterrs, the result is below. Looks ecc is not working .
> > >
> > > [root@jgcx: ~]#./nandbiterrs /dev/mtd2 -i
> > > incremental biterrors test
> > > Successfully corrected 0 bit errors per subpage
> > > Inserted biterror @ 0/5
> > > Failed to recover 1 bitflips
> > > Read error after 1 bit errors per page
> > >
> > > By checking the nand driver whichi is nuc980_nand.c
> > >
> > > https://github.com/OpenNuvoton/NUC980-linux-4.4.y/blob/master/drivers/mtd/nand/nuc980_nand.c
> > >
> > >
> > > * Enable HW ECC : unused on most chips
> > > */
> > > void nuc980_nand_enable_hwecc(struct mtd_info *mtd, int mode)
> > > {
> > > ENTER();
> > > #ifdef NUC980_NAND_DEBUG
> > > {
> > > char * ptr=REG_SMRA0;
> > > int i=0;
> > > if( mode == NAND_ECC_READ )
> > > printk("[R]=\n");
> > > else
> > > printk("[W]=\n");
> > >
> > > for(i=0; i<mtd->oobsize; i++)
> > > {
> > > printk("%X ", *(ptr+i) );
> > > if ( i % 32 == 31)
> > > printk("\n");
> > > }
> > > printk("\n");
> > > }
> > > #endif
> > > LEAVE();
> > > }
> > >
> > >
> > > I guess the nuc980 driver doesn't support ecc correction.  
> >
> > You cannot use NAND without proper ECC handling.
> >
> > Thanks,
> > Miquèl  


Thanks,
Miquèl

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

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

* Re: ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22
  2022-04-19  7:33         ` Miquel Raynal
@ 2022-04-19  7:44           ` Richard Weinberger
  2022-04-19  9:03             ` Scott Zhang
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Weinberger @ 2022-04-19  7:44 UTC (permalink / raw)
  To: Miquel Raynal; +Cc: Scott Zhang, linux-mtd, Richard Weinberger

----- Ursprüngliche Mail -----
> Did you run the various nand tests besides nandbiterrs? If they all
> pass then maybe Richard will be more helpful than I am...

[...]
 
>> 
>> But I noticed the lzo decompress error is still there.
>> I did  following actions to test.
>> /dev/mtd3 is mounted on /opt using ubifs.
>> tar zcvf /root/opt.tar.gz /opt  (done without error)
>> format /opt.
>> tar zxvf /root/opt.tar.gz -C /

How did you create ubifs?

Does your nand driver pass ubi tests?

>> Then when I run php program which is in opt. I saw dmesg
>> [  118.850000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
>> decompress 2293 bytes, compressor lzo, error -22
>> [  118.860000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
>> node (block 15, inode 396)
>> [  118.870000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
>> page 15 of inode 396, error -22
>> [  118.880000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
>> decompress 2293 bytes, compressor lzo, error -22
>> [  118.900000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
>> node (block 15, inode 396)
>> [  118.900000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
>> page 15 of inode 396, error -22
>> [  118.920000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
>> decompress 2293 bytes, compressor lzo, error -22
>> [  118.930000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
>> node (block 15, inode 396)
>> [  118.940000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
>> page 15 of inode 396, error -22
>> 
>> I removed the ubifs_dump_node call to avoid many dump text. The
>> problem is when I run php program, lots of above logs dumped.
>> But I don't see any effect of the above logs. the program seems running.
>> Is there a possibility the underlying nand driver data is ok, but the
>> lzo compress/decompress code has bugs ?  I am running linux-5.4.y
>> cloned from kernel.org.

Does the problem only happen with lzo?

Please re-test with no compressor enabled (compr=none) and also mount with
the chk_data_crc mount option.

Thanks,
//richard

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

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

* Re: ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22
  2022-04-19  7:44           ` Richard Weinberger
@ 2022-04-19  9:03             ` Scott Zhang
  2022-04-19  9:11               ` Scott Zhang
  0 siblings, 1 reply; 11+ messages in thread
From: Scott Zhang @ 2022-04-19  9:03 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: Miquel Raynal, linux-mtd, Richard Weinberger

Thanks.

I will do more tests.

I created ubifs by using buildroot with default options.
My nand drivers only pass biterrors test at the moment.
I am using default buildroot ubifs.img so I didn't test with others yet.

I will let you know after I finish the test.

On Tue, Apr 19, 2022 at 3:44 PM Richard Weinberger <richard@nod.at> wrote:
>
> ----- Ursprüngliche Mail -----
> > Did you run the various nand tests besides nandbiterrs? If they all
> > pass then maybe Richard will be more helpful than I am...
>
> [...]
>
> >>
> >> But I noticed the lzo decompress error is still there.
> >> I did  following actions to test.
> >> /dev/mtd3 is mounted on /opt using ubifs.
> >> tar zcvf /root/opt.tar.gz /opt  (done without error)
> >> format /opt.
> >> tar zxvf /root/opt.tar.gz -C /
>
> How did you create ubifs?
>
> Does your nand driver pass ubi tests?
>
> >> Then when I run php program which is in opt. I saw dmesg
> >> [  118.850000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
> >> decompress 2293 bytes, compressor lzo, error -22
> >> [  118.860000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
> >> node (block 15, inode 396)
> >> [  118.870000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
> >> page 15 of inode 396, error -22
> >> [  118.880000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
> >> decompress 2293 bytes, compressor lzo, error -22
> >> [  118.900000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
> >> node (block 15, inode 396)
> >> [  118.900000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
> >> page 15 of inode 396, error -22
> >> [  118.920000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
> >> decompress 2293 bytes, compressor lzo, error -22
> >> [  118.930000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
> >> node (block 15, inode 396)
> >> [  118.940000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
> >> page 15 of inode 396, error -22
> >>
> >> I removed the ubifs_dump_node call to avoid many dump text. The
> >> problem is when I run php program, lots of above logs dumped.
> >> But I don't see any effect of the above logs. the program seems running.
> >> Is there a possibility the underlying nand driver data is ok, but the
> >> lzo compress/decompress code has bugs ?  I am running linux-5.4.y
> >> cloned from kernel.org.
>
> Does the problem only happen with lzo?
>
> Please re-test with no compressor enabled (compr=none) and also mount with
> the chk_data_crc mount option.
>
> Thanks,
> //richard

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

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

* Re: ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22
  2022-04-19  9:03             ` Scott Zhang
@ 2022-04-19  9:11               ` Scott Zhang
  2022-04-20  3:00                 ` Scott Zhang
  0 siblings, 1 reply; 11+ messages in thread
From: Scott Zhang @ 2022-04-19  9:11 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: Miquel Raynal, linux-mtd, Richard Weinberger

the lzo error is not always. It didn't happen on root partition yet.
On opt, only when few files are being read, dmesg would complain lzo
decompress. I don't know how this happen for first time. Only  when
this happens, it sticks there, I don't see any side effect, seams
everything continues working.

On Tue, Apr 19, 2022 at 5:03 PM Scott Zhang <macromarship@gmail.com> wrote:
>
> Thanks.
>
> I will do more tests.
>
> I created ubifs by using buildroot with default options.
> My nand drivers only pass biterrors test at the moment.
> I am using default buildroot ubifs.img so I didn't test with others yet.
>
> I will let you know after I finish the test.
>
> On Tue, Apr 19, 2022 at 3:44 PM Richard Weinberger <richard@nod.at> wrote:
> >
> > ----- Ursprüngliche Mail -----
> > > Did you run the various nand tests besides nandbiterrs? If they all
> > > pass then maybe Richard will be more helpful than I am...
> >
> > [...]
> >
> > >>
> > >> But I noticed the lzo decompress error is still there.
> > >> I did  following actions to test.
> > >> /dev/mtd3 is mounted on /opt using ubifs.
> > >> tar zcvf /root/opt.tar.gz /opt  (done without error)
> > >> format /opt.
> > >> tar zxvf /root/opt.tar.gz -C /
> >
> > How did you create ubifs?
> >
> > Does your nand driver pass ubi tests?
> >
> > >> Then when I run php program which is in opt. I saw dmesg
> > >> [  118.850000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
> > >> decompress 2293 bytes, compressor lzo, error -22
> > >> [  118.860000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
> > >> node (block 15, inode 396)
> > >> [  118.870000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
> > >> page 15 of inode 396, error -22
> > >> [  118.880000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
> > >> decompress 2293 bytes, compressor lzo, error -22
> > >> [  118.900000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
> > >> node (block 15, inode 396)
> > >> [  118.900000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
> > >> page 15 of inode 396, error -22
> > >> [  118.920000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
> > >> decompress 2293 bytes, compressor lzo, error -22
> > >> [  118.930000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
> > >> node (block 15, inode 396)
> > >> [  118.940000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
> > >> page 15 of inode 396, error -22
> > >>
> > >> I removed the ubifs_dump_node call to avoid many dump text. The
> > >> problem is when I run php program, lots of above logs dumped.
> > >> But I don't see any effect of the above logs. the program seems running.
> > >> Is there a possibility the underlying nand driver data is ok, but the
> > >> lzo compress/decompress code has bugs ?  I am running linux-5.4.y
> > >> cloned from kernel.org.
> >
> > Does the problem only happen with lzo?
> >
> > Please re-test with no compressor enabled (compr=none) and also mount with
> > the chk_data_crc mount option.
> >
> > Thanks,
> > //richard

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

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

* Re: ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22
  2022-04-19  9:11               ` Scott Zhang
@ 2022-04-20  3:00                 ` Scott Zhang
  2022-04-20  6:26                   ` Richard Weinberger
  0 siblings, 1 reply; 11+ messages in thread
From: Scott Zhang @ 2022-04-20  3:00 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: Miquel Raynal, linux-mtd, Richard Weinberger

I tried all the tests. Looks all passed.

[root@303mini /root]
# ./flash_speed /dev/mtd3
scanning for bad eraseblocks
scanned 1 eraseblocks, 0 are bad
testing eraseblock read speed
eraseblock read speed is 25600 KiB/s
testing page read speed
page read speed is 32000 KiB/s
testing 2 page read speed
2 page read speed is 32000 KiB/s
Testing 2x multi-block erase speed
2x multi-block erase speed is 0 KiB/s
Testing 4x multi-block erase speed
4x multi-block erase speed is 0 KiB/s
Testing 8x multi-block erase speed
8x multi-block erase speed is 0 KiB/s
Testing 16x multi-block erase speed
16x multi-block erase speed is 0 KiB/s
Testing 32x multi-block erase speed
32x multi-block erase speed is 0 KiB/s
Testing 64x multi-block erase speed
64x multi-block erase speed is 0 KiB/s
finished

[root@303mini /root]
# ./flash_stress /dev/mtd3
scanning for bad eraseblocks
scanned 848 eraseblocks, 4 are bad
doing operations
0 operations done
1024 operations done
2048 operations done
3072 operations done
4096 operations done
5120 operations done
6144 operations done
7168 operations done
8192 operations done
9216 operations done
finished, 10000 operations done

[root@303mini /root]
# ./flash_torture /dev/mtd3
libmtd: run torture test for PEB 0
libmtd: PEB 0 passed torture test, do not mark it a bad
Torture test iterations done: 1

[root@303mini /root]
# ./flash_torture /dev/mtd3
libmtd: run torture test for PEB 0
libmtd: PEB 0 passed torture test, do not mark it a bad
Torture test iterations done: 1

[root@303mini /root]
# ./flash_readtest /dev/mtd3
testing page read
Thu Jan  1 00:09:29 UTC 1970:connection timeout and reboot eth0's negotiation
Skipping bad block 844
Skipping bad block 845
Skipping bad block 846
Skipping bad block 847

[root@303mini /root]
# ./nandpagetest /dev/mtd3
ignoring bad erase block 844
ignoring bad erase block 845
ignoring bad erase block 846
ignoring bad erase block 847
erasing all blocks
erased 848 eraseblocks
writing all blocks
written up to eraseblock 0
written up to eraseblock 256
written up to eraseblock 512
written up to eraseblock 768
written 848 eraseblocks
verifying all eraseblocks
verified up to eraseblock 0
verified up to eraseblock 256
verified up to eraseblock 512
verified up to eraseblock 768
verified 848 eraseblocks
crosstest
reading page at block 0, page 0
reading page at block 843, page 63
reading page at block 0, page 0
verifying pages read at block 0 match
crosstest ok
erasecrosstest
erasing block 0
writing 1st page of block 0
reading 1st page of block 0
verifying 1st page of block 0
erasing block 0
writing 1st page of block 0
erasing block 843
reading 1st page of block 0
verifying 1st page of block 0
erasecrosstest ok
erasetest
erasing block 0
writing 1st page of block 0
erasing block 0
reading 1st page of block 0
verifying 1st page of block 0 is all 0xff
erasetest ok

[root@303mini /root]
# ./nandsubpagetest /dev/mtd3
ignoring bad erase block 844
ignoring bad erase block 845
ignoring bad erase block 846
ignoring bad erase block 847
erasing good eraseblocks
verifying all eraseblocks for 0xff
verified 848 eraseblocks
writing first 2 sub-pages on PEB 0
writing first 2 sub-pages on PEB 1
writing first 2 sub-pages on PEB 2
writing first 2 sub-pages on PEB 3
writing first 2 sub-pages on PEB 4
writing first 2 sub-pages on PEB 5
writing first 2 sub-pages on PEB 6
writing first 2 sub-pages on PEB 7
writing first 2 sub-pages on PEB 8
writing first 2 sub-pages on PEB 9
writing first 2 sub-pages on PEB 10
writing first 2 sub-pages on PEB 11
writing first 2 sub-pages on PEB 12
writing first 2 sub-pages on PEB 13
writing first 2 sub-pages on PEB 14
writing first 2 sub-pages on PEB 15
writing first 2 sub-pages on PEB 16
writing first 2 sub-pages on PEB 17
writing first 2 sub-pages on PEB 18
writing first 2 sub-pages on PEB 19
.....

erifying exponential offset & size writes on PEB 840
verifying exponential offset & size writes on PEB 841
verifying exponential offset & size writes on PEB 842
verifying exponential offset & size writes on PEB 843
erasing good eraseblocks
verifying all eraseblocks for 0xff
verified 848 eraseblocks

On Tue, Apr 19, 2022 at 5:11 PM Scott Zhang <macromarship@gmail.com> wrote:
>
> the lzo error is not always. It didn't happen on root partition yet.
> On opt, only when few files are being read, dmesg would complain lzo
> decompress. I don't know how this happen for first time. Only  when
> this happens, it sticks there, I don't see any side effect, seams
> everything continues working.
>
> On Tue, Apr 19, 2022 at 5:03 PM Scott Zhang <macromarship@gmail.com> wrote:
> >
> > Thanks.
> >
> > I will do more tests.
> >
> > I created ubifs by using buildroot with default options.
> > My nand drivers only pass biterrors test at the moment.
> > I am using default buildroot ubifs.img so I didn't test with others yet.
> >
> > I will let you know after I finish the test.
> >
> > On Tue, Apr 19, 2022 at 3:44 PM Richard Weinberger <richard@nod.at> wrote:
> > >
> > > ----- Ursprüngliche Mail -----
> > > > Did you run the various nand tests besides nandbiterrs? If they all
> > > > pass then maybe Richard will be more helpful than I am...
> > >
> > > [...]
> > >
> > > >>
> > > >> But I noticed the lzo decompress error is still there.
> > > >> I did  following actions to test.
> > > >> /dev/mtd3 is mounted on /opt using ubifs.
> > > >> tar zcvf /root/opt.tar.gz /opt  (done without error)
> > > >> format /opt.
> > > >> tar zxvf /root/opt.tar.gz -C /
> > >
> > > How did you create ubifs?
> > >
> > > Does your nand driver pass ubi tests?
> > >
> > > >> Then when I run php program which is in opt. I saw dmesg
> > > >> [  118.850000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
> > > >> decompress 2293 bytes, compressor lzo, error -22
> > > >> [  118.860000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
> > > >> node (block 15, inode 396)
> > > >> [  118.870000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
> > > >> page 15 of inode 396, error -22
> > > >> [  118.880000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
> > > >> decompress 2293 bytes, compressor lzo, error -22
> > > >> [  118.900000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
> > > >> node (block 15, inode 396)
> > > >> [  118.900000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
> > > >> page 15 of inode 396, error -22
> > > >> [  118.920000] UBIFS error (ubi0:0 pid 1526): ubifs_decompress: cannot
> > > >> decompress 2293 bytes, compressor lzo, error -22
> > > >> [  118.930000] UBIFS error (ubi0:0 pid 1526): do_readpage: bad data
> > > >> node (block 15, inode 396)
> > > >> [  118.940000] UBIFS error (ubi0:0 pid 1526): do_readpage: cannot read
> > > >> page 15 of inode 396, error -22
> > > >>
> > > >> I removed the ubifs_dump_node call to avoid many dump text. The
> > > >> problem is when I run php program, lots of above logs dumped.
> > > >> But I don't see any effect of the above logs. the program seems running.
> > > >> Is there a possibility the underlying nand driver data is ok, but the
> > > >> lzo compress/decompress code has bugs ?  I am running linux-5.4.y
> > > >> cloned from kernel.org.
> > >
> > > Does the problem only happen with lzo?
> > >
> > > Please re-test with no compressor enabled (compr=none) and also mount with
> > > the chk_data_crc mount option.
> > >
> > > Thanks,
> > > //richard

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

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

* Re: ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22
  2022-04-20  3:00                 ` Scott Zhang
@ 2022-04-20  6:26                   ` Richard Weinberger
  0 siblings, 0 replies; 11+ messages in thread
From: Richard Weinberger @ 2022-04-20  6:26 UTC (permalink / raw)
  To: Scott Zhang; +Cc: Miquel Raynal, linux-mtd, Richard Weinberger

----- Ursprüngliche Mail -----
> I tried all the tests. Looks all passed.

Also UBI tests? e.g. io_paral?
  
Maybe the pre-generated UBIFS is the problem.
How to you flash the UBI image?
Please make sure to skip 0xFF pages if using nandwrite.

Thanks,
//richard

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

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

end of thread, other threads:[~2022-04-20  6:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-14 16:45 ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22 Scott Zhang
2022-04-14 17:24 ` Miquel Raynal
2022-04-15  4:38   ` Scott Zhang
2022-04-15  8:29     ` Miquel Raynal
2022-04-19  2:05       ` Scott Zhang
2022-04-19  7:33         ` Miquel Raynal
2022-04-19  7:44           ` Richard Weinberger
2022-04-19  9:03             ` Scott Zhang
2022-04-19  9:11               ` Scott Zhang
2022-04-20  3:00                 ` Scott Zhang
2022-04-20  6:26                   ` Richard Weinberger

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.