17.01.0-RC1 on WR1043NDv1

I just flashed it on my device and I have a huge problem with installing any package on it.

root@lede:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 2304      2304         0 100% /rom
tmpfs                    14088      1608     12480  11% /tmp
/dev/mtdblock3            4480       364      4116   8% /overlay
overlayfs:/overlay        4480       364      4116   8% /
tmpfs                      512         0       512   0% /dev

But when installing anything really on it the opkg fails silently without any error

root@lede:~# opkg install ntpdate
Installing ntpdate (4.2.8p9-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/packages/ntpdate_4.2.8p9-1_mips_24kc.ipk.
Installing libopenssl (1.0.2k-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/base/libopenssl_1.0.2k-1_mips_24kc.ipk.

When I force stop this with CTRL+C and run opkg update again I get this:

root@lede:~# opkg update
Downloading http://downloads.lede-project.org/releases/17.01.0-rc1/targets/ar71xx/generic/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/reboot_core.
Downloading http://downloads.lede-project.org/releases/17.01.0-rc1/targets/ar71xx/generic/packages/Packages.sig.
Signature check passed.
Downloading http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/base/Packages.gz.
Downloading http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/base/Packages.sig.
Signature check failed.
Remove wrong Signature file.
Downloading http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/luci/Packages.gz.
Downloading http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/luci/Packages.sig.
Signature check failed.
Remove wrong Signature file.
Downloading http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/packages/Packages.gz.
Downloading http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/packages/Packages.sig.
Signature check failed.
Remove wrong Signature file.
Downloading http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/routing/Packages.gz.
Downloading http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/routing/Packages.sig.
Signature check failed.
Remove wrong Signature file.
Downloading http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/telephony/Packages.gz.
Downloading http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/telephony/Packages.sig.
Signature check failed.
Remove wrong Signature file.
Collected errors:
 * xsystem: wget: vfork: Out of memory.
 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/base/Packages.gz, wget returned -1.
 * xsystem: wget: vfork: Out of memory.
 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/base/Packages.sig, wget returned -1.
 * xsystem: wget: vfork: Out of memory.
 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/luci/Packages.gz, wget returned -1.
 * xsystem: wget: vfork: Out of memory.
 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/luci/Packages.sig, wget returned -1.
 * xsystem: wget: vfork: Out of memory.
 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/packages/Packages.gz, wget returned -1.
 * xsystem: wget: vfork: Out of memory.
 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/packages/Packages.sig, wget returned -1.
 * xsystem: wget: vfork: Out of memory.
 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/routing/Packages.gz, wget returned -1.
 * xsystem: wget: vfork: Out of memory.
 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/routing/Packages.sig, wget returned -1.
 * xsystem: wget: vfork: Out of memory.
 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/telephony/Packages.gz, wget returned -1.
 * xsystem: wget: vfork: Out of memory.
 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.0-rc1/packages/mips_24kc/telephony/Packages.sig, wget returned -1.

Yet, df shows me this:

root@lede:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 2304      2304         0 100% /rom
tmpfs                    14088      1196     12892   8% /tmp
/dev/mtdblock3            4480       364      4116   8% /overlay
overlayfs:/overlay        4480       364      4116   8% /
tmpfs                      512         0       512   0% /dev

So what am I doing wrong here?

I get also this errors when doing sysupgrade:

Writing from <stdin> to firmware ...
Upgrade completed
Rebooting system...
umount: can't unmount /dev/pts: Resource busy
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource busy

The last errors seem harmless; I get them myself on a successful upgrade as well, so...

Opkg running out of memory is bad though, that means you don't have enough free RAM to complete the operation. Can you post the output of the free command on an idle setup?

There were a few commits to optimise opkg's memory usage a while ago. But 32 MB RAM with LuCI clearly leaves little headroom.

Plug in USB, set up SWAP, and set swappiness to 0 so that it only swaps to avoid OOM, maybe?

Ideally the issue gets solved instead of just worked around.

I found this commit as the most recent opkg memory related commit. The bug report has been reopened as well.

Could you test if running sysctl -w vm.min_free_kbytes=0 before running opkg helps? This is a temporary measure - after, you should reboot to get settings back to normal.

At this time I reverted to Chaos Calmer since I wasn't able to really install anything at all.
I will be waiting for new builds made by Obsy from eko.one.pl.
His builds are available without LuCI which, I hope will help with this issue.

Can you use ps to show the list of processes and the memory consumed?

Had the same issue on a WD1043NDv1.
Was not aware of this thread, therefore I only tested with swap enabled, didn t work.
Meantime I have installed Extroot solution via Image Builder.
There I have no issues so far.

On Chaos Calmer I didn't need extroot to operate my router. I installed a bunch of packages and run the router for weeks without issues, but now on LEDE I can't really do anything because of those memory issues. I don't use LuCI and the RC1 images have one. I'm still waiting for obsy to release his modification. He said he didn't have issues with LEDE on his WR1043NDv1 routers. I will test those modifications when available and update this thread accordingly.

My recent experience in setting up this router in 15.05.1 was:

  • free space left is limited, 1.2MB after 1st boot up. No usb spare in remote site so skipped extroot
  • Opkg failed if install package in a few lots - has to reset it, then install it all in one time
  • Ram is keep in low range - struggle between 1MB - 3MB free after installed OCServ and OpenVPN (Even disabled OCServ don't help much, still in this range)

Not trying LEDE yet, because it is in a remote site in other country

Good to know this issue has raised out, hope it will get fixed soon

Do use LuCI with his set-up?

With modified OpenWRT 15.05.1 by Obsy without LuCI I was able to boot it up and then install those packages in the first run:

kmod-usb-core kmod-usb2 kmod-usb-printer p910nd
ntpdate
dnscrypt-proxy-resolvers dnscrypt-proxy hostip iodine libsodium
dnsmasq-full
vnstat
sqm-scripts
ddns-scripts
miniupnpd
etherwake
openvpn-openssl openvpn-easy-rsa
samba36-server

After that I restarted the device and proceeded with configuration and then I added SWAP only.
With this config I got weeks, even months without random reboots or hangs. SWAP utilisation is very low. A few MB at most.

Yes

When it is running, it is stable.

I will probably use Image Generator to get an image if the owner have time to give it a try

Ok, so finally I got around to flashing LEDE on my WR1043NDv1.
On LuCI it's impossible to install most of the stuff. OPKG just hangs. Same thing without LuCI but setting up SWAP helps with that. Still on 15.05.1 I was able to install anything I wanted with the same amount of free RAM (I checked).

The routers hangs and crashes and the load is killing it. One time it was so bad that the LED had troubles with flickering I never saw this before on this unit. After a few seconds the device rebooted.

For some reason multiple times sysupgrade bricked my router. I had to use tftp to bring it back online. I noticed this happened to other people too, on other devices.

I do not recommend using LEDE on this device. The stability issues I came across where to big to be accepted.

Want to know:

  1. How much free space left for software on the 1st boot up?
  2. How much ram free on 1st boot up (when no other process added)?

Thanks

15.05.1 comes hardly recommended at this time either, unless you are keeping packages (and kernel) up to date. Between a rock and a hard place, like one says.

If you can do without LuCI, you could rip it out (with the image generator) and include your extra packages the same way. It's far from ideal, but you'll have more free space afterwards - installing onto the overlay (which is what opkg does) always requires more space than including the same packages in the firmware image.

I have switched all my 32 MB RAM devices to builds without LuCI, for what it's worth.

It's around 4MB for CC and 3,6MB for LEDE but free space isn't an issue for me. I'm capable of fitting all of my software on it. I don't use or need LuCI.

Around 6-9MB of free RAM for both CC and LEDE. Yet, on CC I'm able to install the same packages without an issue.and on LEDE opkg just hangs. I get that 32MB of RAM is quite qlow but if it worked before why doesn't it work now?

Is the commit mentioned by @Borromini getting into LEDE 17.01?

Like I said before I don't have a problem with storage space. I'm able to fit all of the packages I need. I also don't use or need LuCI. I haven't been using it for quite some time now.

Did anyone encountered an issue when after using sysupgrade when router would just get bricked? I don't think this is supposed to be happening.

If you really want to use a device with only 32 MB RAM and install additional packages, the best way to is compile a personal firmware with the needed packages pre-installed. Either by building from scratch with the buildroot or by using the imagegenerator to cook the firmware.

There is a reason, why a device with at least 8 MB flash and 64 MB RAM is recommended...

reverted to trunk on Saturday after opkg reports out of memory in Luci and through ssh/putty.
Current status on Saturday's trunk install: (v1.8 hardware)
Status
System
Hostname LEDE
Model TP-Link TL-WR1043N/ND v1
Firmware Version LEDE Reboot SNAPSHOT r3293-f791fb4 / LuCI Master (git-17.034.72963-f1820de)
Kernel Version 4.4.46
Local Time Mon Feb 6 17:45:44 2017
Uptime 24h 5m 58s
Load Average 0.65, 0.16, 0.05
Memory
Total Available
5252 kB / 27800 kB (18%)
Free
3508 kB / 27800 kB (12%)
Buffered
1744 kB / 27800 kB (6%)
Network
IPv4 WAN Status

I also cannot install any package:
xsystem: wget: vfork: Out of memory.
opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.0-rc1/...

Model
TP-Link TL-WR1043N/ND v1
Firmware Version
LEDE Reboot 17.01.0-rc1 r3042-ec095b5 r0+3043-68a04db / LuCI 472dc4b9e2ca71c114f5da70cb612c1089b8daa7 branch (git-17.025.85178-472dc4b)
Kernel Version
4.4.42
Local Time
Wed Feb 8 18:16:01 2017
Uptime
0h 28m 8s
Load Average
0.77, 0.34, 0.23

Status:
Total Available
10900 kB / 28176 kB (38%)
Free
9432 kB / 28176 kB (33%)
Buffered
1468 kB / 28176 kB (5%)

Never had any Problem on Chaos Calmer of OpenWrt :frowning:

I just ended up building my own version of LEDE with build-in all the packages I need.
I hope though they will fix it before the stable release.