Sorry to reopen this thread here as FriendlyARM NanoPi R2S router running OpenWrt 22.03.7 keeps crashing after approx. 20 days after implementing all the suggested measures: improved heat dissipation, installed irqbalance and lowered scaling_max_freq.
How to tackle this issue now it looks like it's not temperature related?
This looks more like a memory leak - would explain why things run fine for a couple of weeks...
Thermal's aren't a suspect here, as the OPP's will just cause the Rockchip to slow down to shed heat.
The R2S is an odd duck to run as a primary gateway/router as the NIC's are a bit goofy - the "WAN" port is hosted on the Rockchip with a realtek PHY, and the "LAN" port is basically a USB3 to ethernet chip.
Have you considered something like a GL-Inet Brume2? Much better for your purposes here
1 Like
Thank you for your reply. Memory leak sounds reasonable. Any idea how to examine that?
And thanks for suggesting a successor but it feels a bit early and lazy to give up already.
Perhaps updating to the latest available OpenWrt firmware would resolve any outstanding issues. You are 2 major releases behind!
1 Like
Yes. That is probably a good start.
Crashes occur with both v22.03.7 and v23.05.3 while v22.03.3 was the last firmware without crashes. But you never know.
If a memory leak is the cause Tor is most likely the culprit. It fills tmpfs with diff-cache files and huge cached-descriptors files as described here.
Tor would be certainly a good first guess...
I would suggest getting on to 24.10, and then sort things out from there. If there are issues to be fixed, 24.10 is going to be the place where fixes would go into Master/Snapshot in any event.
1 Like
v24.10.0 up and running now.
After two days of memory usage creeping up I decided to restart Tor:
That was at 20:24. As this didn't sort the desired effect I stopped Tor, deleted everything in /tmp/lib/tor and started it again. That was at 20:28.
Is this what a memory leak looks like?
Memory over the last day:
and since boot, two days ago:
What about this? Processes ordered by memory usage:
Tor uses 33% and obfs4proxy (used by tor) consumes 122%. Sounds like a lot, doesn't it?
MaxMemInQueues in /etc/tor/torrc successfully controls memory usage. But tmpfs is insufficient for all the files Tor tries to store. At least on this router. And there is no mechanism to control this.
IMHO this is a OpenWrt port problem.
Is it an idea to add how to install a Tor bridge / relay here compiling all info including this Tor Relay Guide?