What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

What is erp_monitor process and any way to restart / reset it ? (suspected slow memory leak)

FTC

Senior Member
Hi,

I am running my rt-ax88 for reliability test since two weeks ago already without a reset w/merlin 384.11_2 build. So far so good, but I am seeing that the 'available' memory for data (free+cache+buffers) is decreasing with an exact linear rate. At this rate the router will start swapping in 3 weeks from now. That is no really big deal, but I'd like to learn a little bit more about this so ...

Running the TOP command at an ssh session, I can see that there is one particular process that is growing its VSZ at the same continous linear rate, and it is named 'erp_monitor'... I suspect it is either increasing memory usage by storing cumulatively traffic statistics or web history or similar... or just a memory leak by not freeing a memory portion in some instances.. anyone knows what this process does and whether it can be stopped / restarted safely and how ? (i.e with which command arguments).
 
This is a power management daemon required by European regulations.
 
This is a power management daemon required by European regulations.

Thanks Eric, as you stated and looking at the source code it really looks like its only function is to put to sleep/standby or wakeup some functions while not in use or as scheduled or button press, by means of receiving signals. It also looks like the process can be killed without any more side effects (after all it will behave the same as if territory is set to a non european country). I may check/verify this later on and see whether the perceived mem leak gets corrected.
 
I see there's a missing free() call in erp_check_wl_auth_stat() which might explain it.
 
I see there's a missing free() call in erp_check_wl_auth_stat() which might explain it.

Great! I can see it now also, however in the source I am looking at, this function seems to only being called for the AC5300 (although I may be looking at an old fork - the one that results after googling for this function name), and I have an AX88, Assuming this is the case (that it applies also for the AX88) ... will you include the fix in next .12 alpha ? I will take note and verify if it fixes the leak.
 
.. Eric, nevermind my previous post. I just got to the merlin sources library and saw that you have already added the missing 'free(mac_list)' in the master branch.. however, I can also see that it is NOT added in erp_monitor.c of the the RTAX88 branch, which is the version that would invoke erp_check_wl_auth_stat() in my AX88 router (besides RTAC5300 and others)... Is this intentional ? will the branches be merged eventually ?

Many thanks in advance
 
Am running two AC68U's with the same steady memory use increase on 384.11_2. 17 days up time and the used RAM started at 47% and is now up to 80% and 83%.
 
Am running two AC68U's with the same steady memory use increase on 384.11_2. 17 days up time and the used RAM started at 47% and is now up to 80% and 83%.

Hi, if your router's region is the US, then this leak is not the one causing your memory usage increase. As Eric stated, this affects only the EU countries (plus UK).. you can see this by checking the nvram variable 'territory_code'. Looking at the code also it seems to affect only the 'AX' models plus the AC5300, so in principle this leak does not affect your 68s. To have more details, the leak is of aprox. 772 bytes every 10 seconds.
 
.. Eric, nevermind my previous post. I just got to the merlin sources library and saw that you have already added the missing 'free(mac_list)' in the master branch.. however, I can also see that it is NOT added in erp_monitor.c of the the RTAX88 branch, which is the version that would invoke erp_check_wl_auth_stat() in my AX88 router (besides RTAC5300 and others)... Is this intentional ? will the branches be merged eventually ?

Many thanks in advance

I don't merge master to the two branches with every commits, only when I need to build them. It will be merged at a later time.
 
A global memory usage increase does not necessarily imply there's a leak. The router writes to log files in RAM, the buffer gets used, etc... Memory fluctuation over time are perfectly normal. You have to look at the memory usage of a specific process to determine if there might be an issue (once again, it might also be perfectly normal).
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top