Modify

Opened 4 years ago

Last modified 21 months ago

#17346 new defect

WRT54GL sudden reboots and low memory

Reported by: anonymous Owned by: developers
Priority: highest Milestone: Bugs Paradise
Component: base system Version: Barrier Breaker 14.07
Keywords: Cc:

Description

http://downloads.openwrt.org/barrier_breaker/14.07-rc2/brcm47xx/legacy/
I was just testing this version.

The following problem occured.
Free memory is a low as 80 K at best.
netifd is consuming 12% of the available memory.

opkg install ...:
"Killed", Timeouts, sudden reboots.

Changes to /etc/config/* don't survive the reboot.

I already tried mtd erase rootfs_data and nvram and firstboot respectively - problems persist - the router is unusable with the current snapshot.

Why does netifd consume so much memory?

Attachments (0)

Change History (18)

comment:1 Changed 4 years ago by anonymous

Observations:
I can create files in /etc/config/, e.g. with dd
/etc/passwd seems to be reset after a reboot, too.
/overlay is always empty. Creating files there is possible, but they don't appear in the root, even after remounting.

mount says:
overlayfs:/tmp/root on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/tmp/root)

shouldn't that read:
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)

Current mt:
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /tmp/root type tmpfs (rw,noatime,mode=755)
overlayfs:/tmp/root on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/tmp/root)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)

proposed mt:
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock5 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)

comment:2 Changed 4 years ago by anonymous

mount_root exits with error code 255
It seems, that the firstboot script is rerun every time, since the jffs2 is always unmountable:

first the preceeding partition is probably miss-positioned:
[ 0.640000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only

second:
[ 30.110000] jffs2: Too few erase blocks (4)

The same error occurs on mounting mtdblock5 manually.

comment:3 Changed 4 years ago by anonymous

rc1 seems unaffected

comment:4 Changed 4 years ago by anonymous

With rc2 on a wrt54gl 1.1, changes to the filesystem are not persistent through reboots for me either. I guess the image may be too big. Do we really need USB build in kernel on a device without USB in factory condition?
Ram and oom kills is also a problem absolutely :( I tried to install zram to see if it could improve the situation a bit but its not even possible to run opkg without reboot. Total mem has also lowered from 136?? if i remember correctly in 10.03.1 to 12996 in 14.07.

comment:5 Changed 4 years ago by anonymous

I doubt, that we even need netifd. This device may work well (or much butter) with only (ancient) startup scripts. The same applies for other devices with only 16 mb RAM, some atheros based ubnt2, ubnt5 among them.
OpenWRT is getting bigger and memory hungry - why is that?

comment:6 Changed 4 years ago by anonymous

As for zram:

insmod zram
kmod: failed to insert /lib/modules/3.10.44/zram.ko

dmesg:
[ 132.690000] zram: Unknown symbol lzo1x_decompress_safe (err 0)
[ 132.690000] zram: Unknown symbol lzo1x_1_compress (err 0)

comment:7 Changed 4 years ago by anonymous

ImageBuilder: missing file feeds.conf.default

comment:8 Changed 4 years ago by anonymous

I managed to install zram at last, saw comment 6's error message too at install but zram worked anyway when started init.d script. Comment 6, did you install all dependencies? There where a few... I downloaded the packages by hand and run opkg install on the files one by one manually. The dependency checking seems to oom kill it if you run opkg install zram-swap.
Seemed to work, this effort was gone anyway at next reboot :(

comment:9 Changed 4 years ago by anonymous

I didn't succeed until I used the ImageBuilder. Unnecessary to say, that the image got quite big.
I am now compiling the whole image with more busybox-components, hoping that that will save space.
I just hope, that the script doesn't package a full-scale "ip" over the busybox-ip tool.

for comment6: I did opkg update, opkg install kmod-zram zram-swap.
The router rebooted during that process (watchdog?).
Manual installation failed due to low memory. Deactivating various services and rebooting did not help.

zram should be in the image and should be activated as a default. It seems to prevent the sudden reboot problem and even luci is much more reactive than ever since netifd started to unnecessarily waste ressources ;-).

Proposal:
1) use buybox-ip instead of iproute2-ip
2) activated kmod-zram and zram-swap on ALL release candidate builds.

comment:10 Changed 4 years ago by anonymous

How can I define that BUSYBOX_CONFIG_IP=y REPLACES iproute2?

comment:11 Changed 3 years ago by anonymous

block-mount dependencies regarding zram-swap do not apply.

comment:12 Changed 3 years ago by anonymous

Various compilation errors e.g. asterisk18.

comment:13 Changed 3 years ago by anonymous

/scripts/feed update -a
/scripts/feed install -a

missing folder "dl".

comment:14 Changed 3 years ago by slachta

I would not recommend to use Barrier Breaker on such old device. Linksys WRT54GL is 12 years old device and it does not offer appropriate parameters for running current release of OpenWrt. Even if you can run OpenWrt on it, usability of this device would be quite poor due to small RAM and Flash size.

See wiki page for WRT54GL.

comment:15 Changed 3 years ago by slachta

  • Milestone changed from Barrier Breaker 14.07 to Bugs Paradise

comment:16 Changed 3 years ago by anonymous

OpenWRT is the only aftermarket firmware.
There is no reason, why that device should be abandoned.

Design flaws (it's inevitable to use netifd even on those devices) in newer OpenWRT can be compensated by using zram-swap. The performance is still sufficient. (reboots gone).

You are right, the design of this device and some buffalos is (even older that) 12 years, but these are robust devices.

You probably forget, that wireless communities all over europe still have plenty installations involving WRT54GL and similar.

While some of the routers get replaced time after time, there are many old routers out there, that may mutate to a bigger security hazard if not updated soon.

comment:17 Changed 3 years ago by anonymous

32MB RAM is minimum for recent drivers. The 16MB RAM devices cant get supported any more. Check if your device have 32MB RAM.

https://en.wikipedia.org/wiki/Linksys_WRT54G_series

If you would like to get supported 16MB RAM devices, just send some upstream patches that reduce the RAM usage.

comment:18 Changed 21 months ago by anonymous

opkg install ...

Do not use opkg, use image builder.

I have DIR-300 A1 (16mb ram) with openwrt 8.09 installed, but I can't upgrade it with sysupgrade. I've killed all procs except dropbear, uploaded image (3.4 mb) to /tmp/ and obtained 1.1 mb ram. After "sysupgrade -v openwrt-ath25-combined.squashfs.img" router just hangs and reboots itself.

Is it possible to make sysupgrade to eat less memory? I hate soldering smd components absolutely, especially ram chips.

Thank you.

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.