#16651: NAND space getting lost on RB450
--------------------------+-------------------------------------
Reporter: leonardogyn | Owner: developers
Type: defect | Status: new
Priority: high | Milestone: Barrier Breaker 14.07
Component: base system | Version: Trunk
Resolution: | Keywords: yaffs2 nand routerboard
--------------------------+-------------------------------------
Comment (by leonardogyn):
Well, as it seems i'm the only one that noticed and is worried about this,
i have done a little more testings on this.
As i have some different OpenWRT builds running on different RB450s,
specially some old builts, i tried to search on my production RB450s which
of them were being affected by this problem.
I have also searched, through OpenWRT repository browser, in which
releases the yaffs suffered changes, mostly for being updated with the
official trees. I could easily find that information on:
https://dev.openwrt.org/log/trunk/target/linux/generic-2.6/files/fs/yaffs2?rev=21951
https://dev.openwrt.org/log/trunk/target/linux/generic/files/fs/yaffs2?rev=42156
So, it seems that yaffs code was updated, to reflect the most available
code, on r11378 and right after, on r11427, those were reverted. I'll not
worry with this here, as i only started using OpenWRT after this moment.
And that was a long time ago, 6 years.
On r21952 it was updated just to change path names, no real change on the
codes, so nothing to worry.
On r34012 and r34013 yaffs code was updated to reflect the most recent
code, that was 22 months ago.
And last, on r39084 it was updated again, that was 8 months ago.
Watching my production RB450s, i found that my oldest running OpenWRT
builds, r20727, were NOT affected. I noticed, however, that my r33743
builts ARE being AFFECTED by the problem of the dissapearing space.
With all those informations, i grabbed 4 revisions for compiling and
testing on my lab: r20727 (very old, i know), r33743, r34010 and r34013.
Despite the fact 34010 and 34013 are very close revisions, yaffs code was
updated between them, so i wanna try both.
Tests were done in a simple way. OpenWRT was compiled with default
options, just changing the minimal to adjust my target platform (AR71xx,
Mikrotik based, no wifi). The generated initramfs image was netbooted and
then the rootfs/kernel images were installed on NAND using wget2nand. The
stress write tests were done exactly the same way as previously posted:
{{{
i=1; while [ $i -lt 105 ]; do echo "run # $i"; rm -f /teste; dd
if=/dev/urandom of=/teste bs=1M count=6; rm -f /teste; df | head -2;
i=$(($i + 1)); done
}}}
Tests posted below were done on the exact same RB450 board who has no NAND
block marked bad, that means, certainly not related to the common fact
that NAND chips can have bad blocks and work just fine with those. The
NAND chipset is:
{{{
root@OpenWrt:/# dmesg | grep -i nand
[ 0.710000] NAND flash driver for RouterBoard 4xx series version 0.2.0
[ 0.720000] NAND device: Manufacturer ID: 0xad, Chip ID: 0x76 (Hynix
NAND 64MiB 3,3V 8-bit)
}}}
The results:
r20727 - NOT affected
{{{
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
KAMIKAZE (bleeding edge, r20727) ------------------
* 10 oz Vodka Shake well with ice and strain
* 10 oz Triple sec mixture into 10 shot glasses.
* 10 oz lime juice Salute!
---------------------------------------------------
root@OpenWrt:/# df | grep root
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 61440 3100 58340 5% /
run # 1
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 61440 3100 58340 5% /
[ ...100 runs later ... ]
run # 100
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 61440 3100 58340 5% /
[ ... reboot and df ... ]
root@OpenWrt:~# uptime
00:00:56 up 0 min, load average: 0.14, 0.05, 0.01
root@OpenWrt:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 61440 3100 58340 5% /
}}}
r33743 - AFFECTED
{{{
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
BARRIER BREAKER (Bleeding Edge, r33743)
-----------------------------------------------------
* 1/2 oz Galliano Pour all ingredients into
* 4 oz cold Coffee an irish coffee mug filled
* 1 1/2 oz Dark Rum with crushed ice. Stir.
* 2 tsp. Creme de Cacao
-----------------------------------------------------
root@OpenWrt:/# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 59392 4704 54688 8% /
run # 1
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 59392 4704 54688 8% /
[ ...100 runs later ... ]
run # 100
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 59392 4704 54688 8% /
[ ... reboot and df ... ]
root@OpenWrt:/# uptime
00:00:32 up 0 min, load average: 0.55, 0.12, 0.04
root@OpenWrt:/# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 59392 46368 13024 78% /
}}}
r34010 - (before 22 months ago yaffs code update) AFFECTED
{{{
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
BARRIER BREAKER (Bleeding Edge, r34010)
-----------------------------------------------------
* 1/2 oz Galliano Pour all ingredients into
* 4 oz cold Coffee an irish coffee mug filled
* 1 1/2 oz Dark Rum with crushed ice. Stir.
* 2 tsp. Creme de Cacao
-----------------------------------------------------
root@OpenWrt:/# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 59392 4996 54396 8% /
run # 1
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 59392 4996 54396 8% /
[ ...100 runs later ... ]
run # 100
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 59392 4996 54396 8% /
[ ... reboot and df ... ]
root@OpenWrt:/# uptime
00:00:40 up 0 min, load average: 0.54, 0.14, 0.04
root@OpenWrt:/# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 59392 46412 12980 78% /
}}}
r34013 (after 22 months ago yaffs code update) - AFFECTED
{{{
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
BARRIER BREAKER (Bleeding Edge, r34013)
-----------------------------------------------------
* 1/2 oz Galliano Pour all ingredients into
* 4 oz cold Coffee an irish coffee mug filled
* 1 1/2 oz Dark Rum with crushed ice. Stir.
* 2 tsp. Creme de Cacao
-----------------------------------------------------
root@OpenWrt:/# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 59392 4916 54476 8% /
run # 1
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 59392 4916 54476 8% /
[ ...100 runs later ... ]
run # 100
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 59392 4916 54476 8% /
[ ... reboot and df ... ]
root@OpenWrt:/# uptime
00:00:44 up 0 min, load average: 0.66, 0.17, 0.05
root@OpenWrt:/# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 59392 45868 13524 77% /
}}}
So, despite the fact i was actually believing that we were talking on a
yaffs bug, the fact that r20727 is NOT affected and r33734 being AFFTECTED
made me think again, as those revisions share the exact same yaffs code
(different paths, but exact same code).
After that findings, i really dont know if i can blaim yaffs alone for
that.
And as my initial posts, r40867, which uses the latest yaffs merged on
OpenWRT tree, is still AFFECTED.
I know that's a lot of information, but i had to do that several tests to
try to find if yaffs was really the guilty on that. And, unfortunelly, it
seems it's not the guilty, at least not alone.
Hope these informations helps the dev team find what's happening and, as
always, i can help with further testings if needed.
--
Ticket URL: <https://dev.openwrt.org/ticket/16651#comment:6>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets