linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* About Segmentation fault of mkfs.erofs in AOSP
@ 2020-12-01 11:23 Yue Hu
  2020-12-01 11:42 ` Gao Xiang
  0 siblings, 1 reply; 6+ messages in thread
From: Yue Hu @ 2020-12-01 11:23 UTC (permalink / raw)
  To: bluce.lee, hsiangkao, hsiangkao; +Cc: huyue2, linux-erofs

hi guys,

I'm trying using erofs for super.img(dynamic partition) under Android 10. But i have met an issue below when building images:

```log
EROFS: write_uncompressed_block() Line[140] Writing 3517 uncompressed data to block 63950
EROFS: erofs_mkfs_build_tree() Line[1011] add file /tmp/merge_target_files_jnIVhM/output/VENDOR/etc/xtwifi.conf (nid 8185600, type 1)
EROFS: erofs_mkfs_build_tree() Line[1011] add file /tmp/merge_target_files_jnIVhM/output/VENDOR/etc (nid 1790208, type 2)
out/host/linux-x86/bin/mkerofsimage.sh: line 79: 188014 Segmentation fault      (core dumped) $MAKE_EROFS_CMD
```

Have you met this kind of issue? I'm trying to debug the problem, looks like memory related.

BTW: i'm using latest erofs-utils in AOSP master branch (https://android.googlesource.com/platform/external/erofs-utils/).

Thx.

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

* Re: About Segmentation fault of mkfs.erofs in AOSP
  2020-12-01 11:23 About Segmentation fault of mkfs.erofs in AOSP Yue Hu
@ 2020-12-01 11:42 ` Gao Xiang
  2020-12-01 11:48   ` Yue Hu
  0 siblings, 1 reply; 6+ messages in thread
From: Gao Xiang @ 2020-12-01 11:42 UTC (permalink / raw)
  To: Yue Hu; +Cc: huyue2, linux-erofs

Hi Yue,

On Tue, Dec 01, 2020 at 07:23:09PM +0800, Yue Hu wrote:
> hi guys,
> 
> I'm trying using erofs for super.img(dynamic partition) under Android 10. But i have met an issue below when building images:
> 
> ```log
> EROFS: write_uncompressed_block() Line[140] Writing 3517 uncompressed data to block 63950
> EROFS: erofs_mkfs_build_tree() Line[1011] add file /tmp/merge_target_files_jnIVhM/output/VENDOR/etc/xtwifi.conf (nid 8185600, type 1)
> EROFS: erofs_mkfs_build_tree() Line[1011] add file /tmp/merge_target_files_jnIVhM/output/VENDOR/etc (nid 1790208, type 2)
> out/host/linux-x86/bin/mkerofsimage.sh: line 79: 188014 Segmentation fault      (core dumped) $MAKE_EROFS_CMD
> ```
> 
> Have you met this kind of issue? I'm trying to debug the problem, looks like memory related.
> 
> BTW: i'm using latest erofs-utils in AOSP master branch (https://android.googlesource.com/platform/external/erofs-utils/).

Which lz4 version is used? it would be better to use lz4 1.9.3
(or 1.9.2 with some unexpected CR issues.)
For more details, please see README.

If the expected lz4 version is used, could you kindly leave gdb
backtrace message here as well? 

Thanks,
Gao Xiang

> 
> Thx.
> 


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

* Re: About Segmentation fault of mkfs.erofs in AOSP
  2020-12-01 11:42 ` Gao Xiang
@ 2020-12-01 11:48   ` Yue Hu
  2020-12-01 11:51     ` Gao Xiang
  0 siblings, 1 reply; 6+ messages in thread
From: Yue Hu @ 2020-12-01 11:48 UTC (permalink / raw)
  To: Gao Xiang; +Cc: huyue2, linux-erofs

On Tue, 1 Dec 2020 19:42:53 +0800
Gao Xiang <hsiangkao@redhat.com> wrote:

> Hi Yue,
> 
> On Tue, Dec 01, 2020 at 07:23:09PM +0800, Yue Hu wrote:
> > hi guys,
> > 
> > I'm trying using erofs for super.img(dynamic partition) under Android 10. But i have met an issue below when building images:
> > 
> > ```log
> > EROFS: write_uncompressed_block() Line[140] Writing 3517 uncompressed data to block 63950
> > EROFS: erofs_mkfs_build_tree() Line[1011] add file /tmp/merge_target_files_jnIVhM/output/VENDOR/etc/xtwifi.conf (nid 8185600, type 1)
> > EROFS: erofs_mkfs_build_tree() Line[1011] add file /tmp/merge_target_files_jnIVhM/output/VENDOR/etc (nid 1790208, type 2)
> > out/host/linux-x86/bin/mkerofsimage.sh: line 79: 188014 Segmentation fault      (core dumped) $MAKE_EROFS_CMD
> > ```
> > 
> > Have you met this kind of issue? I'm trying to debug the problem, looks like memory related.
> > 
> > BTW: i'm using latest erofs-utils in AOSP master branch (https://android.googlesource.com/platform/external/erofs-utils/).  
> 
> Which lz4 version is used? it would be better to use lz4 1.9.3
> (or 1.9.2 with some unexpected CR issues.)

Hi Xiang,

ok, let me check.

> For more details, please see README.
> 
> If the expected lz4 version is used, could you kindly leave gdb
> backtrace message here as well? 

Trying to get the bt for the case.

Thx.

> 
> Thanks,
> Gao Xiang
> 
> > 
> > Thx.
> >   
> 


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

* Re: About Segmentation fault of mkfs.erofs in AOSP
  2020-12-01 11:48   ` Yue Hu
@ 2020-12-01 11:51     ` Gao Xiang
  2020-12-02  9:59       ` Yue Hu
  0 siblings, 1 reply; 6+ messages in thread
From: Gao Xiang @ 2020-12-01 11:51 UTC (permalink / raw)
  To: Yue Hu; +Cc: huyue2, linux-erofs

On Tue, Dec 01, 2020 at 07:48:43PM +0800, Yue Hu wrote:
> On Tue, 1 Dec 2020 19:42:53 +0800
> Gao Xiang <hsiangkao@redhat.com> wrote:
> 
> > Hi Yue,
> > 
> > On Tue, Dec 01, 2020 at 07:23:09PM +0800, Yue Hu wrote:
> > > hi guys,
> > > 
> > > I'm trying using erofs for super.img(dynamic partition) under Android 10. But i have met an issue below when building images:
> > > 
> > > ```log
> > > EROFS: write_uncompressed_block() Line[140] Writing 3517 uncompressed data to block 63950
> > > EROFS: erofs_mkfs_build_tree() Line[1011] add file /tmp/merge_target_files_jnIVhM/output/VENDOR/etc/xtwifi.conf (nid 8185600, type 1)
> > > EROFS: erofs_mkfs_build_tree() Line[1011] add file /tmp/merge_target_files_jnIVhM/output/VENDOR/etc (nid 1790208, type 2)
> > > out/host/linux-x86/bin/mkerofsimage.sh: line 79: 188014 Segmentation fault      (core dumped) $MAKE_EROFS_CMD
> > > ```
> > > 
> > > Have you met this kind of issue? I'm trying to debug the problem, looks like memory related.
> > > 
> > > BTW: i'm using latest erofs-utils in AOSP master branch (https://android.googlesource.com/platform/external/erofs-utils/).  
> > 
> > Which lz4 version is used? it would be better to use lz4 1.9.3
> > (or 1.9.2 with some unexpected CR issues.)
> 
> Hi Xiang,
> 
> ok, let me check.

At least, lz4 1.8.3 ~ 1.9.1 are buggy, for more details, see:
https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/tree/README?h=dev#n107

> 
> > For more details, please see README.
> > 
> > If the expected lz4 version is used, could you kindly leave gdb
> > backtrace message here as well? 
> 
> Trying to get the bt for the case.

Yeah, bt will fall into lz4 internal functions if the lz4
version is too low.

Thanks,
Gao Xiang

> 
> Thx.
> 
> > 
> > Thanks,
> > Gao Xiang
> > 
> > > 
> > > Thx.
> > >   
> > 
> 


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

* Re: About Segmentation fault of mkfs.erofs in AOSP
  2020-12-01 11:51     ` Gao Xiang
@ 2020-12-02  9:59       ` Yue Hu
  2020-12-02 10:41         ` Gao Xiang
  0 siblings, 1 reply; 6+ messages in thread
From: Yue Hu @ 2020-12-02  9:59 UTC (permalink / raw)
  To: Gao Xiang; +Cc: huyue2, linux-erofs, zhangwen

On Tue, 1 Dec 2020 19:51:58 +0800
Gao Xiang <hsiangkao@redhat.com> wrote:

> On Tue, Dec 01, 2020 at 07:48:43PM +0800, Yue Hu wrote:
> > On Tue, 1 Dec 2020 19:42:53 +0800
> > Gao Xiang <hsiangkao@redhat.com> wrote:
> >   
> > > Hi Yue,
> > > 
> > > On Tue, Dec 01, 2020 at 07:23:09PM +0800, Yue Hu wrote:  
> > > > hi guys,
> > > > 
> > > > I'm trying using erofs for super.img(dynamic partition) under Android 10. But i have met an issue below when building images:
> > > > 
> > > > ```log
> > > > EROFS: write_uncompressed_block() Line[140] Writing 3517 uncompressed data to block 63950
> > > > EROFS: erofs_mkfs_build_tree() Line[1011] add file /tmp/merge_target_files_jnIVhM/output/VENDOR/etc/xtwifi.conf (nid 8185600, type 1)
> > > > EROFS: erofs_mkfs_build_tree() Line[1011] add file /tmp/merge_target_files_jnIVhM/output/VENDOR/etc (nid 1790208, type 2)
> > > > out/host/linux-x86/bin/mkerofsimage.sh: line 79: 188014 Segmentation fault      (core dumped) $MAKE_EROFS_CMD
> > > > ```
> > > > 
> > > > Have you met this kind of issue? I'm trying to debug the problem, looks like memory related.
> > > > 
> > > > BTW: i'm using latest erofs-utils in AOSP master branch (https://android.googlesource.com/platform/external/erofs-utils/).    
> > > 
> > > Which lz4 version is used? it would be better to use lz4 1.9.3
> > > (or 1.9.2 with some unexpected CR issues.)  
> > 
> > Hi Xiang,
> > 
> > ok, let me check.  
> 
> At least, lz4 1.8.3 ~ 1.9.1 are buggy, for more details, see:
> https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/tree/README?h=dev#n107
> 

wow, working fine when i upgrade lz4 version from 1.8.3 to 1.9.3 bypass vndk error.

And seems canned fs config processing has minor issue. I will double check and submit patch if possible.

Thank you!

> >   
> > > For more details, please see README.
> > > 
> > > If the expected lz4 version is used, could you kindly leave gdb
> > > backtrace message here as well?   
> > 
> > Trying to get the bt for the case.  
> 
> Yeah, bt will fall into lz4 internal functions if the lz4
> version is too low.
> 
> Thanks,
> Gao Xiang
> 
> > 
> > Thx.
> >   
> > > 
> > > Thanks,
> > > Gao Xiang
> > >   
> > > > 
> > > > Thx.
> > > >     
> > >   
> >   
> 


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

* Re: About Segmentation fault of mkfs.erofs in AOSP
  2020-12-02  9:59       ` Yue Hu
@ 2020-12-02 10:41         ` Gao Xiang
  0 siblings, 0 replies; 6+ messages in thread
From: Gao Xiang @ 2020-12-02 10:41 UTC (permalink / raw)
  To: Yue Hu; +Cc: huyue2, linux-erofs, zhangwen

On Wed, Dec 02, 2020 at 05:59:29PM +0800, Yue Hu wrote:
> On Tue, 1 Dec 2020 19:51:58 +0800
> Gao Xiang <hsiangkao@redhat.com> wrote:
> 
> > > Gao Xiang <hsiangkao@redhat.com> wrote:
> > >   

...

> > > > 
> > > > Which lz4 version is used? it would be better to use lz4 1.9.3
> > > > (or 1.9.2 with some unexpected CR issues.)  
> > > 
> > > Hi Xiang,
> > > 
> > > ok, let me check.  
> > 
> > At least, lz4 1.8.3 ~ 1.9.1 are buggy, for more details, see:
> > https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/tree/README?h=dev#n107
> > 
> 
> wow, working fine when i upgrade lz4 version from 1.8.3 to 1.9.3 bypass vndk error.
> 

Thanks for the feedback, I'm now working on add unique testcases to
intercept such broken lz4 versions as well, the WIP branch is
https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/log/?h=experimental-test

> And seems canned fs config processing has minor issue. I will double check and submit patch if possible.

Comments, patches, evaluation are always welcome :)
(btw, I'm about to release erofs-utils v1.2 this month...)

Thanks,
Gao Xiang

> 
> Thank you!
> 
> > >   


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

end of thread, other threads:[~2020-12-02 10:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 11:23 About Segmentation fault of mkfs.erofs in AOSP Yue Hu
2020-12-01 11:42 ` Gao Xiang
2020-12-01 11:48   ` Yue Hu
2020-12-01 11:51     ` Gao Xiang
2020-12-02  9:59       ` Yue Hu
2020-12-02 10:41         ` Gao Xiang

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).