[OpenWrt-Devel] OpenWRT 19.07.2 SQM memory leak
Ilya Kuznetsov
comrade.noshit at gmail.com
Mon Apr 27 09:06:17 EDT 2020
I found a huge memory leak when SQM shaper is engaged on my MT7620N-powered router. It regards IPv6 operation only though.
How to test:
1. Obvious part: sqm-scripts package has to be installed, /etc/config/sqm has to be configured with shaper and cake or fq_codel qdisc enabled.
2. Your connection has to support IPv6 because memory starts leaking only with IPv6 TCP transfers (I have tested downlink, not sure about uplink).
3. You need to ssh to your router and monitor system resources with top -d 1 (for better resolution).
4. Now it's time to engage some huge file download straight to /dev/null. Debian 10 image will do. Run wget -6 https://caesar.ftp.acc.umu.se/debian-cd/current/amd64/iso-cd/debian-10.3.0-amd64-netinst.iso -O /dev/null.
5. Watch your router memory drains to zero. Notice that ksoftirqd process is suspiciously active (about 19% CPU, it's quite untypical).
6. Try wget with -4 flag to confirm that only IPv6 operation is affected.
What I figured at the moment:
1. UDP transmission are not affected. Torrents work just fine with IPv6 peers, no leaks.
2. Utility doesn't matter. I tried curl, few browsers, no difference.
3. It is related to shaper because if you set it to zero in configuration, effectively disabling it, leak stops.
4. IPv4 downloads doesn't cause the leak.
5. Kernel doesn't show what process misbehaves with memory.
I have no knowledge of what exactly causes the leak apart from it having something to do with shaper function. I don't have any means of using a debugger on the router since it's quite restricted on resources.
P.S. My WAN connection is a USB LTE modem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200427/0c86c349/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list