amtm amtm errors: grep memory exhausted and others

  • ATTENTION! You'll notice a Prefix dropdown when you create a thread. If your post applies to one of the topics listed, please use that Prefix for your post. When browsing the thread list you can use the Prefix to filter the view.
  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

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: 43
  • screenshot2.png
    screenshot2.png
    141.7 KB · Views: 44
  • screenshot3.png
    screenshot3.png
    97.6 KB · Views: 42

L&LD

Part of the Furniture
Does this issue continue if you reboot the router (via the GUI)?
 

mxoz

Occasional Visitor
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:

L&LD

Part of the Furniture
Did the USB drive die on you?
 

L&LD

Part of the Furniture
How do you know? :)
 

L&LD

Part of the Furniture
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?
 

mxoz

Occasional Visitor
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.
 

mxoz

Occasional Visitor
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?
 

Jack Yaz

Part of the Furniture
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
 

mxoz

Occasional Visitor
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.
 

mxoz

Occasional Visitor
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).
 

Jack Yaz

Part of the Furniture
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?
 

mxoz

Occasional Visitor
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..
 

ColinTaylor

Part of the Furniture
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.
 

Jack Yaz

Part of the Furniture
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
 

mxoz

Occasional Visitor
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

Sign Up For SNBForums Daily Digest

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