Bug ID 953723
Summary mksquashfs corrupts files
Classification openSUSE
Product openSUSE Distribution
Version 13.2
Hardware x86-64
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Basesystem
Assignee bnc-team-screening@forge.provo.novell.com
Reporter seife@novell.slipkontur.de
QA Contact qa-bugs@suse.de
CC duwe@suse.com, ms@suse.com
Found By ---
Blocker ---

IMPORTANT: I have seen this both on 13.2 and on a patched SLES12 installation
(no wonder, they have the same version of squashfs :-)

While working with KIWI (OEM image, deployed either via PXE or as an ISO), I
got spurious checksum errors when unpacking the image. A rebuild of the image
often fixed the issue.
Until yesterday, when there was no possibility to create a working image
anymore.
I was assuming something changed with my KIWI setup or a bug in kiwi.
I investigated the issue and it comes down to the following:

vbox-seife:~/oem # cat SLES_12_image1.x86_64-0.3.4.md5 
b6a50a9e4a509b40ee192ee977cc5b48   312192 8192
vbox-seife:~/oem # md5sum SLES_12_image1.x86_64-0.3.4.raw 
b6a50a9e4a509b40ee192ee977cc5b48  SLES_12_image1.x86_64-0.3.4.raw
vbox-seife:~/oem # mksquashfs SLES_12_image1.x86_64-0.3.4.raw
SLES_12_image1.x86_64-0.3.4.md5 /tmp/SLES_12_image1.x86_64-0.3.4.raw.squashfs
-no-progress
Parallel mksquashfs: Using 2 processors
Creating 4.0 filesystem on /tmp/SLES_12_image1.x86_64-0.3.4.raw.squashfs, block
size 131072.

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
        compressed data, compressed metadata, compressed fragments, compressed
xattrs
        duplicates are removed
Filesystem size 642142.91 Kbytes (627.09 Mbytes)
        25.71% of uncompressed filesystem size (2497612.67 Kbytes)
Inode table size 42177 bytes (41.19 Kbytes)
        53.94% of uncompressed inode table size (78188 bytes)
Directory table size 59 bytes (0.06 Kbytes)
        64.13% of uncompressed directory table size (92 bytes)
Number of duplicate files found 0
Number of inodes 3
Number of files 2
Number of fragments 2
Number of symbolic links  0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 1
Number of ids (unique uids + gids) 1
Number of uids 1
        root (0)
Number of gids 1
        root (0)
vbox-seife:~/oem # mount -t squashfs
/tmp/SLES_12_image1.x86_64-0.3.4.raw.squashfs /mnt/
vbox-seife:~/oem # md5sum /mnt/SLES_12_image1.x86_64-0.3.4.raw 
4f2653aea2424557a4341d1416d21389  /mnt/SLES_12_image1.x86_64-0.3.4.raw

So the file got altered when packing up with mksquashfs.

vbox-seife:~/oem # cmp -l /mnt/SLES_12_image1.x86_64-0.3.4.raw
SLES_12_image1.x86_64-0.3.4.raw |head -1
2557459969   0 110
vbox-seife:~/oem # dd if=SLES_12_image1.x86_64-0.3.4.raw
skip=$((2557459969/512))|hexdump -C
33+0 records in
33+0 records out
16896 bytes (17 kB) copied, 0.000102726 s, 164 MB/s
00000000  48 61 68 21 49 64 6f 6e  74 4e 65 65 64 45 46 49  |Hah!IdontNeedEFI|
00000010  f1 d9 c8 c6 e2 3f bd 48  89 b6 17 29 bc 94 dd 67  |.....?.H...)...g|
00000020  00 08 00 00 00 00 00 00  03 18 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00  6c 00 65 00 67 00 61 00  |........l.e.g.a.|
00000040  63 00 79 00 00 00 00 00  00 00 00 00 00 00 00 00  |c.y.............|
00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000080  28 73 2a c1 1f f8 d2 11  ba 4b 00 a0 c9 3e c9 3b  |(s*......K...>.;|
00000090  f6 f0 20 26 9a 16 1e 40  a7 03 f1 5a ea c8 80 90  |.. &...@...Z....|
000000a0  00 20 00 00 00 00 00 00  03 60 06 00 00 00 00 00  |. .......`......|
000000b0  00 00 00 00 00 00 00 00  55 00 45 00 46 00 49 00  |........U.E.F.I.|
000000c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000100  a2 a0 d0 eb e5 b9 33 44  87 c0 68 b6 b7 26 99 c7  |......3D..h..&..|
00000110  8b 4b b5 64 5c 86 ab 49  87 f5 13 a2 ba 7b 8f 98  |.K.d\..I.....{..|
00000120  00 68 06 00 00 00 00 00  03 c8 0f 00 00 00 00 00  |.h..............|
00000130  00 00 00 00 00 00 00 00  6c 00 78 00 62 00 6f 00  |........l.x.b.o.|
00000140  6f 00 74 00 00 00 00 00  00 00 00 00 00 00 00 00  |o.t.............|
00000150  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000180  a2 a0 d0 eb e5 b9 33 44  87 c0 68 b6 b7 26 99 c7  |......3D..h..&..|
00000190  b2 0b ef 75 36 86 a4 4f  8a 7c 42 20 08 af 33 28  |...u6..O.|B ..3(|
000001a0  00 d0 0f 00 00 00 00 00  80 37 4c 00 00 00 00 00  |.........7L.....|
000001b0  00 00 00 00 00 00 00 00  6c 00 78 00 6c 00 76 00  |........l.x.l.v.|
000001c0  6d 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |m...............|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00004000  45 46 49 20 50 41 52 54  00 00 01 00 5c 00 00 00  |EFI PART....\...|
00004010  82 ba 8f 32 00 00 00 00  ff 37 4c 00 00 00 00 00  |...2.....7L.....|
00004020  01 00 00 00 00 00 00 00  22 00 00 00 00 00 00 00  |........".......|
00004030  de 37 4c 00 00 00 00 00  8e 28 e4 1a a7 84 ae 48  |.7L......(.....H|
00004040  b2 d1 ff 8a 8b 14 2c 11  df 37 4c 00 00 00 00 00  |......,..7L.....|
00004050  80 00 00 00 80 00 00 00  3f cd f4 5d 00 00 00 00  |........?..]....|
00004060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00004200
vbox-seife:~/oem # dd if=/mnt/SLES_12_image1.x86_64-0.3.4.raw
skip=$((2557459969/512))|hexdump -C
33+0 records in
33+0 records out
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00004200
16896 bytes (17 kB) copied, 0.000606308 s, 27.9 MB/s

The last ~16.5kB are just zeroes.

I then looked at the upstream git and found this:
http://sourceforge.net/p/squashfs/code/ci/de03266983ceb62e5365aac84fcd3b2fd4d16e6f/

Note that this bug is present in at least 13.2 and SLES12, and looking at the
package I have no reason to believe it is not in Factory/Tumbleweed.


You are receiving this mail because: