Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 89357

Summary: mksquashfs generates invalid squashfs images when squashing very large directories
Product: Gentoo Linux Reporter: postmodern <brodigan>
Component: Current packagesAssignee: Gentoo LiveCD Package Maintainers <livecd>
Status: VERIFIED NEEDINFO    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description postmodern 2005-04-16 15:37:08 UTC
After squashing a gentoo system (without /usr/portage) I found that my squashfs images could not be read via mount or mksquashfs for appending new data. I found this in my kernel logs.

Apr 16 15:28:09 [kernel] SQUASHFS error: zlib_fs returned unexpected result 0xfffffffd

Keep in mind in squashing the data into a loopback device to a very large file (more space then mksquashfs needs to write compressed data and inode tables). This bug has only recently appeared, all past squashings of this gentoo system have worked out perfectly.

Reproducible: Sometimes
Steps to Reproduce:
1. mksquashfs /path/to/gentoo/ /dev/loop0 -info -noappend -no-duplicates -check_data -e tmp/ proc/ sys/ usr/portage/ var/tmp/portage/
2. mount -t squashfs /dev/loop0 /mnt/cdrom

Actual Results:  
mount: wrong fs type, bad option, bad superblock on /dev/mapper/livecd-image,
       or too many mounted file systems


Expected Results:  
A working squashfs image.

Gentoo Base System version 1.4.16
Portage 2.0.51.19 (default-linux/amd64/2004.3, gcc-3.4.3,
glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.11-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3400+
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb  7 2005, 03:24:22)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-pipe -O3 -march=k8"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-pipe -O3 -march=k8"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aac acpi alsa berkdb bitmap-fonts cdr crypt curl dvd encode esd fam
flac font-server fortran gif gpm gstreamer gtk gtk2 imlib ipv6 java jp2 jpeg lzw
lzw-tiff mad motif mozilla mp3 multilib ncurses network nls ogg oggvorbis opengl
pam perl png python readline samba sdl softmmu speex spell sqlite ssl tcpd
theora tiff truetype truetype-fonts type1-fonts usb userlocales vorbis xml xml2
xpm xrandr xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2005-04-18 07:03:43 UTC
What if you use a lower revision kernel?  Have you updated your kernel recently?  Basically, are you sure it isn't the kernel, but is the mksquashfs application?
Comment 2 postmodern 2005-04-18 13:14:45 UTC
I've been using -r6 for a while now and this bug just recently appeared.
Comment 3 postmodern 2005-05-04 15:54:11 UTC
I narrowed the issue down to when I go over some amount of files or total bytes inputed into mksquashfs it generates an invalid squashfs image.
Comment 4 Chris Gianelloni (RETIRED) gentoo-dev 2005-05-04 18:07:40 UTC
What's the largest file you've done?

I've been doing 700MB images and it's been working fine, so I'd like to try to narrow this down and report it upstream.
Comment 5 postmodern 2005-05-04 20:01:20 UTC
I was making working squashfs images with 1.2-1.4Gb system directories. The problem popped up around 1.8Gb.
Comment 6 Chris Gianelloni (RETIRED) gentoo-dev 2005-07-22 06:31:10 UTC
I just added squashfs-tools 2.2 into portage.  Can you see if this resolves your
problem, please?
Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2005-09-09 05:57:12 UTC
There's a 2.2 and a 2.2_p2 ebuild in portage.  Please respond if these don't
resolve the issue.
Comment 8 postmodern 2005-09-09 06:11:45 UTC
I tested them, they work perfectly.