Possible memory leak configuration in beta version

It looks like in some rare configuration latest v5.0beta versions have
memory leak, as currently we are unable to repeat the issue, we would
like to ask for your help.

Thanks to guys that wrote to the support@mikrotik.com we were able to
determine that usual method of 2 supout.rif file comparison will not
help us. The only method that might reveal something more is to actually
find RouterOS feature that cause that memory leak, usually by disabling
it for some period of time and determining that leak is gone.

We would like to ask those that have this problem open up discussion and
find common configuration parts and post all details about memory leak
itself and tests you have done.

This problem is related only to latest 5.0beta.

we are having problems from ver5 beta3 to 6 on rb433 and x86 machines
the rb 433 will leak memory and then have 100% cpu usage and stop working
the x86 machines leaks out 750 meg memory in 70 minutes
the only way we could stop the memory leak on the x86 machines was to disable all our links
we will do some more tests and post the results

Uldis,
The simplest way to detect leak (imho), ask community about access to the problematic router.
I think that MT has special package that can quickly detect the leak.
As an idea you can create package that can show how many memory each process use.

we have now done some testing on x86
the memory leakes out fast when multi-cpu=on (740meg in 70 minutes)
leak is much slower when multicpu=off (740meg in 3 days)

Uldis,
after some more testing with our RB750s against 2x RB1000 SSTP server I think we can narrow the leak down to SSTP. The RB750 maintains 2 SSTP tunnels to the 2x RB1000. On the servers we have set the keep alive timeout to 20 and 40s to kinda simulate an unstable link. You can see the RB750 being disconnected regularly and trying to build a new tunnel again. With this setup, memory leaks away quite rapidly. Give it 2-3 days and only 3Mb is left of the 16.7Mb free memory after reboot.

After setting keep alive timeout on the server back to 60 seconds, the links are stable and the 750 does not try to reconnect every couple of minutes. After a run of about 5 hours, memory is still stable. To early to cheer, we’ll see how things are after a longer uptime.

BTW, memory reported in the title bar of Winbox does not match the free memory reported by a script and sent to a syslog server. Winbox says 16.1Mb, script reports 16784.

Hope this helps, tests carried out on 5.0 beta 7.

On over 100 RB4xx series routers as SSTP clients w/ proxy/hotspot/firewall/snmp/queues, there is no noticable memory leak. On 4 RB4xx w/ same config and OSPF, there is no noticeable memory leak. On my single RB1000 w/ OSPF and SSTP server, w/ firewall and even after getting rid of queues, there is a memory leak. I have a hunch that it has something to do with radius authentication. It seems that it leaks faster the more clients reconnect.

Uldis,
Uptime on the RB750s is now 1d and 19 hrs. Memory lost sofar is about 500k which is fairly minimal. Now that the clients do not reconnect all the time anymore, memory leak is down to a bare minimum. In contrast to roadracer96, we do not see memory leaking on the RB1000 running the SSTP server.

You guys should be able to reproduce this easily. On the server, set SSTP keep alive timeout to 20 seconds, that will force clients to reconnect regularly as they are being kicked out. Memory on the client will drop rapidly on each reconnect !

If you need config info or access to the client, let me know !

Thank you for information sstp memory leak is reproduced.

We are ready for new beta :wink:
When it can be expected?