Ticket #311 (new bug)

Opened 8 months ago

Last modified 8 months ago

BUG in FON OS

Reported by: hans@… Owned by:
Priority: critical Milestone: First Release
Component: fon-base-firmware Keywords: bug os
Cc:

Description

I think there is a major bug in the FON OS (maybe in Linux)

When I overwrite a file with cp or mv there will be space taken for the new file, but the space of the old file is not released.

This space will never become available again until a reboot is done. See test underneath.

Start: /dev/mtdblock4 1472 948 524 64% /jffs

Copying test to test1 takes 16 blocks of 1K e.g. 16Kb

After: /dev/mtdblock4 1472 964 508 65% /jffs

Again copying test to test1 e.g. overwriting test1 takes another 16 blocks

After: /dev/mtdblock4 1472 980 492 67% /jffs

Renaming test1 to test e.g. overwriting test will not free the space of test1

After: /dev/mtdblock4 1472 980 492 67% /jffs

So ending with the same files I lost 32Kb disk space. You just have to wait until it will hang or crash.

complete log:

root@Fonera:/www/cam1# ls -l -rw-r--r-- 1 root root 23261 Jul 7 09:38 motion.jpg -rw-r--r-- 1 root root 16208 Jul 7 10:26 test root@Fonera:/www/cam1# df Filesystem 1k-blocks Used Available Use% Mounted on rootfs 4096 4096 0 100% / /dev/root 4096 4096 0 100% /rom tmpfs 14956 340 14616 2% /tmp tmpfs 512 0 512 0% /dev /dev/mtdblock4 1472 948 524 64% /jffs mini_fo:/jffs 4096 4096 0 100% / root@Fonera:/www/cam1# cp test test1 root@Fonera:/www/cam1# df Filesystem 1k-blocks Used Available Use% Mounted on rootfs 4096 4096 0 100% / /dev/root 4096 4096 0 100% /rom tmpfs 14956 340 14616 2% /tmp tmpfs 512 0 512 0% /dev /dev/mtdblock4 1472 964 508 65% /jffs mini_fo:/jffs 4096 4096 0 100% / root@Fonera:/www/cam1# ls motion.jpg test test1 root@Fonera:/www/cam1# cp test test1 root@Fonera:/www/cam1# df Filesystem 1k-blocks Used Available Use% Mounted on rootfs 4096 4096 0 100% / /dev/root 4096 4096 0 100% /rom tmpfs 14956 340 14616 2% /tmp tmpfs 512 0 512 0% /dev /dev/mtdblock4 1472 980 492 67% /jffs mini_fo:/jffs 4096 4096 0 100% / root@Fonera:/www/cam1# ls motion.jpg test test1 root@Fonera:/www/cam1# mv test1 test root@Fonera:/www/cam1# df Filesystem 1k-blocks Used Available Use% Mounted on rootfs 4096 4096 0 100% / /dev/root 4096 4096 0 100% /rom tmpfs 14956 340 14616 2% /tmp tmpfs 512 0 512 0% /dev /dev/mtdblock4 1472 980 492 67% /jffs mini_fo:/jffs 4096 4096 0 100% / root@Fonera:/www/cam1# ls motion.jpg test root@Fonera:/www/cam1#

Change History

Changed 8 months ago by pm2036

OldMan? says: Looks like this only happens in the /www/ and underlying folders.

Note: See TracTickets for help on using tickets.