[bug report] erofs-utils: Compression with -Eall-fragments segfaults on 1.8.2

Gao Xiang hsiangkao at linux.alibaba.com
Sun Oct 13 01:42:14 AEDT 2024



On 2024/10/12 20:10, David Michael wrote:
> On Sat, Oct 12, 2024 at 12:35 AM Gao Xiang <hsiangkao at linux.alibaba.com> wrote:
>> On 2024/10/12 10:05, Gao Xiang wrote:
>>> Hi David,
>>>
>>> On 2024/10/12 04:22, David Michael wrote:
>>>> Hi,
>>>>
>>>> Version 1.8.2 has a reproducible segfault with "-E all-fragments"
>>>> (testing on Fedora 40).  When compressing the install image, it
>>>> consistently hangs on a firmware file:
>>>>
>>>>> sudo dnf -y install erofs-utils
>>>>> wget https://dl.fedoraproject.org/pub/fedora/linux/releases/40/Everything/x86_64/os/images/install.img
>>>>> sudo mount install.img /mnt
>>>>> sudo mkfs.erofs -z zstd -E all-fragments erofs.img /mnt
>>>>
>>>> If you isolate just that firmware directory instead of the whole
>>>> image, it will segfault:
>>>>
>>>>> mkfs.erofs -z zstd -E all-fragments erofs.img /mnt/usr/lib/firmware/nvidia/ga102/gsp
>>>>
>>>> It happens with all compressors I've tried, but adding "dedupe" works
>>>> around it.  Is there any change I should test?  Let me know if you
>>>> need additional information.
>>>
>>> Thanks for the report, I will look into that.
>>
>> I've submited a fix for this,
>> https://lore.kernel.org/r/20241012035213.3729725-1-hsiangkao@linux.alibaba.com
> 
> Thanks, this does fix the issue for me.  I'll apply it to the Fedora
> package unless you want me to wait for another tag.

I guess I won't tag a new version for this (but I suspect it
will need another 1.8.3 in the future), so feel free to apply
directly :-)

Thanks,
Gao Xiang

> 
> David



More information about the Linux-erofs mailing list