Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
As you may know the Dreambox satellite receiver box uses squashfs to store the root filesystem. To look at updated firmwares, I can loop mount the firmware to some directory on the dreambox. To save the files or testdrive the firmware I want to copy that directory tree to some other place. However most of the times this fails with syslog messages like:
Jun 4 22:25:06 dream user.warn kernel: cp: page allocation failure. order:4, mode:0xd0
Jun 4 22:25:06 dream user.warn kernel: Call trace: [c003b3b4] [c003b400] [c003eb9c] [c003f2e8]
[c003efc8] [c00a0eb8] [c00a4384] [c003e28c] [c003e654] [c003e83c] [c003724c] [c0039a10]
[c0039b74] [c0054b04] [c0054da0]
Jun 4 22:25:06 dream user.err kernel: SQUASHFS error: Failed to allocate fragment cache block
Jun 4 22:25:06 dream user.err kernel: SQUASHFS error: Unable to read page, block 14cffc, size 380
Is this a know bug/problem? Or any way to fix this?
forgot to mention:
this is on linux 2.6.9 with squasfh2.1-r2
This isn't a known SquashFS problem, but I know what's causing it :-)
Simply put the kernel is running out of memory... Specifically the kernel is running out of order 4 blocks (64K blocks). This is a (sort of) known problem, there are only a limited number of blocks of a specific size which the kernel can allocate, and if all of these are already allocated, then further allocations will fail.
There are a couple of solutions to this problem:
1. Find out why all the blocks are allocated. This may be because you've got a lot of kernel modules using memory- this includes mounted filesystems (including other SquashFS filesystems). Try unmounting some filesystems or removing some modules that may be using order 4 memory
2. Mount the SquashFS filesystem on another system, preferably a non-embedded Linux system that has more physical memory
3. If you've got access to the kernel source and can recompile the kernel, you could reduce the size of the fragment cache. If you can do this, email me (phillip at lougher.demon.co.uk), and I'll tell you what to do.
In the long term, I may have to allocate memory using a different method that doesn't have this problem. Of course this is the first time I've had a report this problem exists.