squashfs attempt to access beyond end of dev

Help
Lplate
2005-04-14
2013-05-29
  • Lplate

    Lplate - 2005-04-14

    Hi,

    I am trying to use squashfs 2.1on an ARM-based board with kernel 2.4.24 and blkmem. From the debug messages, the device was mounted successfully but problem started after the kernel  mounted / resulting in kernel "unable to open an initial console" and "Kernel panic: no init found".

    The following is a paritial listing of the debug messages.

    Thank you

    mount_root[789]:  rom0
    sys_mount[835] /dev/root /root squashfs
    sys_mount[853] do_mount(a3a000, /root, a39000, 8001, 0)
    SQUASHFS: Entered squashfs_read_superblock
    SQUASHFS: Block @ 0x0, uncompressed size 63
    SQUASHFS: Found valid superblock on Blkmem(31,0)
    SQUASHFS: Inodes are compressed
    SQUASHFS: Data is compressed
    SQUASHFS: Check data is not present in the filesystem
    SQUASHFS: Filesystem size 1712068 bytes
    SQUASHFS: Block size 1024
    SQUASHFS: Number of inodes 267
    SQUASHFS: Number of fragments 7
    SQUASHFS: Number of uids 1
    SQUASHFS: Number of gids 1
    SQUASHFS: sBlk->inode_table_start 1a0060
    SQUASHFS: sBlk->directory_table_start 1a1925
    SQUASHFS: sBlk->fragment_table_start 1a1fb8
    SQUASHFS: sBlk->uid_start 1a1fbc
    SQUASHFS: Block @ 0x1a1fbc, uncompressed size 8
    SQUASHFS: Block @ 0x1a1fb8, uncompressed size 4
    SQUASHFS: Entered squashfs_iget
    SQUASHFS: Entered squashfs_get_cached_block [1a0db4:1afc]
    SQUASHFS: Block @ 0x1a0db4, compressed size 2927
    SQUASHFS: Read cache block [1a0db4:1afc]
    SQUASHFS: Entered squashfs_get_cached_block [1a0db4:1afc]
    SQUASHFS: Directory inode d54:1afc, start_block 0, offset 987
    SQUASHFS: Leaving squashfs_read_super
    sys_mount[859] do_mount() completed!
    VFS: Mounted root (squashfs filesystem) readonly.
    sys_mount[835] . / <NULL>
    sys_mount[853] do_mount(a39000, /, 0, 2000, 0)
    sys_mount[859] do_mount() completed!
    SQUASHFS: Entered squashfs_lookup [1a1925:987] for dev 0 1a1925
    SQUASHFS: Entered get_dir_index_using_name, i_count 0
    SQUASHFS: Entered squashfs_get_cached_block [1a1925:987]
    SQUASHFS: Block @ 0x1a1925, compressed size 22514
    attempt to access beyond end of device
    1f:00: rw=0, want=[1672,1673], limit=1672
    attempt to access beyond end of device
    1f:00: rw=0, want=[1673,1674], limit=1672
    attempt to access beyond end of device
    1f:00: rw=0, want=[1674,1675], limit=1672
    attempt to access beyond end of device
    1f:00: rw=0, want=[1675,1676], limit=1672
    attempt to access beyond end of device
    1f:00: rw=0, want=[1676,1677], limit=1672

     
    • Phillip Lougher

      Phillip Lougher - 2005-04-16

      There is definately something wrong here.  The following line from the debug ouput is wrong...

      SQUASHFS: Block @ 0x1a1925, compressed size 22514

      Compressed metadata blocks should never be larger than 8192 bytes.  From the debug output I cannot tell why the size has been read incorrectly, but this is what is causing the attempt to access beyond the end of the block device.

      The next stage from here is to try to ascertain why the block length is incorrect.  There are numerous possibilities:

      1.  The Squashfs filesystem is corrupted - unlikely
      2.  The read from flash (block device is mtd?) has read incorrect data  - possible
      3.  The read of the two byte block size is wrong - most likely because everything else has worked up to this point.

      To eliminate point 1, try and mount the image on the development machine via loopback.  This should work.

      Determination of points 2 and 3 are rather more difficult.    The first observation here is that this is the first bug I've received of this nature; reading Squashfs filesystems off flash (MTD block device) work, and it works on ARM processors.  This implies there maybe something unusual about your target system.

      I now get you ask you the standard questions.  What architecture, what ARM variant (i.e. is it ARM7, ARM9, MMU-less and using ucLinux), what kernel, what GCC etc.

      Ultimately, I'll have to send you a special version of Squashfs with lots and lots of debug messages to try and narrow down what's going wrong.  To do this, it is probably better if this is discussion is moved over to email, and should you email me directly about this.  My email is in the README and the source files...

      Phillip

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks