What's new

amtm amtm errors: grep memory exhausted and others

  • 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!

mxoz

Occasional Visitor
Hi,

I recently got RT-AX58U, installed Asuswrt-Merlin, then installed Diversion, uiDivStats, Skynet. All the time following various instructions from this forum (mainly posts from L&LD).
Everything was working fine for a couple of days. Today I run amtm and got "grep: memory exhausted" errors as in screenshot1. If I then run, for example, upgrade command it shows different errors as in screenshot2 (though those hosts are in practice reachable). If I run, for example, "dc" command it again prints me another errors as in screenshot3. Any ideas what might be the problem?
 

Attachments

  • screenshot1.png
    screenshot1.png
    305.5 KB · Views: 153
  • screenshot2.png
    screenshot2.png
    141.7 KB · Views: 141
  • screenshot3.png
    screenshot3.png
    97.6 KB · Views: 146
Does this issue continue if you reboot the router (via the GUI)?
 
Simply running grep in terminal with any option also produces segfault:

Code:
# grep --version
Segmentation fault

or another reproducer:

Code:
# grep "THEME" /opt/share/diversion/.conf/diversion.conf
grep: memory exhausted
 
Last edited:
Did the USB drive die on you?
 
How do you know? :)
 
What brand/model and capacity is it?

What file format are you using? Are you using a swap file or a swap partition?

Have you 'restored' any scripts/files/settings from a backup since you created it?
 
What brand/model and capacity is it?

What file format are you using? Are you using a swap file or a swap partition?

Have you 'restored' any scripts/files/settings from a backup since you created it?

Verbatim Store 'n' Go, 16GB.

ext4, swap file (I followed amtm and Diversion guidelines to create it).

Didn't restore anything so far.
 
I assume it is not amtm's issue per se as even a simple grep commands fail. I am curious what devs working on apps on Asuswrt-Merlin can say about this behaviour. @RMerlin , @thelonelycoder , @Jack Yaz have you seen such weird behaviour of grep? is there something in OS which may cause it? USB? Any troubleshooting advice?
 
I assume it is not amtm's issue per se as even a simple grep commands fail. I am curious what devs working on apps on Asuswrt-Merlin can say about this behaviour. @RMerlin , @thelonelycoder , @Jack Yaz have you seen such weird behaviour of grep? is there something in OS which may cause it? USB? Any troubleshooting advice?
interesting is the screenshot of amtm saying it's adding the missing swap entry. please post output of:
Code:
free -m
 
interesting is the screenshot of amtm saying it's adding the missing swap entry. please post output of:
Code:
free -m

Code:
# free -m
             total       used       free     shared    buffers     cached
Mem:        512260     479904      32356       2336      55092      49776
-/+ buffers/cache:     375036     137224
Swap:      2097148        704    2096444

This is after 24h of uptime.
Just after reboot it usually shows 160MB free.
 
I also noticed that Diversion stats have not been updated since yesterday and "ps" shows tens and tens of "{uiDivStats} /bin/sh /jffs/scripts/uiDivStats querylog" commands and tens and tens of "sleep 1" commands. (not sure what is the cause and what is the effect here).
 
I also noticed that Diversion stats have not been updated since yesterday and "ps" shows tens and tens of "{uiDivStats} /bin/sh /jffs/scripts/uiDivStats querylog" commands and tens and tens of "sleep 1" commands. (not sure what is the cause and what is the effect here).
can you share the output of
Code:
ps | grep -i uiDivStats
please?
 
can you share the output of
Code:
ps | grep -i uiDivStats
please?

I can't, because grep gives segfault.

I didn't find how to temporarily disable uiDivStats, so I had to uninstall it for now (as CPU usage was too high and growing as well as uiDivStats processes). Now CPU usage is back to normal. Anyway, I assume it is all results of some fault in the system, which also causes "grep" to fail..
 
It's trying to use Entware's grep. My guess (based on nothing at all) is that some of the Entware stuff isn't compatible with the RT-AX58U.
 
It's trying to use Entware's grep. My guess (based on nothing at all) is that some of the Entware stuff isn't compatible with the RT-AX58U.
that was my thought too

Code:
ps | /bin/grep -i uiDivStats

FWIW I'm building in a stale querylog process killer into the next version of uiDivStats
 
It's trying to use Entware's grep. My guess (based on nothing at all) is that some of the Entware stuff isn't compatible with the RT-AX58U.

Are there two different "grep"s? I found one in /opt/bin and another one in /tmp/mnt/usb/entware/bin, but they have at least the same size.
Curious what could be so special in AX58U wrt compatibility. There are other users of AX58U and I haven't seen such problems reported by them (at least in this forum).
Not sure how to troubleshoot it further.. If there would be gdb at least..
 

Similar threads

Latest threads

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!
Top