-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Corrupted squashfs
when running mksquashfs
with zstd
compression.
#306
Comments
squashfs
when thesquashfs
when running mksquashfs
with zstd
compression.
The error messages do not support your conclusion.
This error message is generated by Unsquashfs, and not Mksquashfs.
This error message is generated by the kernel, and not Mksquashfs. It is also completely unrelated to zstd compression issues because the superblock is not compressed. What your error messages do show is that you have a corrupted Squashfs file. What your error messages do not show is that it is Mksquashfs that corrupted them. Before blaming Mksquashfs and filing a bug report here, you need to know and show that it is Mksquashfs at fault. At the moment the most likely explanation is you have either
What you should do before I do anything more here is:
If the checksums don't match, then the issue is not with Mksquashfs. Marking as invalid because so far there is no evidence the issue lies with Mksquashfs. |
It looks like you're updating or regenerating a Squashfs file by running Unsquashfs on it, and then running Mksquashfs on it. My gut feeling here is that the Mksquashfs is over-writing the Squashfs file while the Unsquashfs is extracting it, or afterwards trying to mount it, e.g.
This is basically the same as doing:
You can't read and output to the same Squashfs file simultaneously. |
Thank you for your answer. We are only see this error for We never run We create the SquashFS files with
Does this help at all? Let me know if you have any more questions. Thank you. |
If you only get the issue with zstd, then you should be raising the issue with the developers of zstd (Facebook). They will know if there's any bugs or incompatibilities with the versions of the zstd libraries used by Mksquashfs and the kernel.
Zstd compression error 2, means "Zstd decompression failed: Restored data doesn't match checksum"
No, that just says the data was corrupt, it doesn't say why. Whether it is a bug in zstd or not, the next step is to test the latest development version (by cloning the repository and compiling from source). You may be hitting a bug already fixed. If that doesn't fix the problem, then you should do one, two or all of the following:
The problem with these kinds of bugs is it is almost impossible to find them without a reproducer that can be used to investigate the problem. Without that it is like looking for a needle in a haystack. |
Hi! We have been using
mksquashfs
withzstd
compression, and after a few iterations of compression + we see a corruption in squashfs file. The error message is:Looking at the kernel logs, we see:
Interestingly, this only happens after a few iterations of running mksquashfs and then using the file. And creating another squashfs file from the mounted squashfs file. This only happens for zstd and not any other compression algorithm. Would you know what could be causing this problem? Thank you!
squashfs-tools version:
4.6
zstd
version:1.5.5
uncompressed cache size: 2.5 Gb
compressed cache size: 536Mb
The text was updated successfully, but these errors were encountered: