openwrt / luci

LuCI - OpenWrt Configuration Interface
Apache License 2.0
6.23k stars 2.49k forks source link

Processes list shows not all processes [luci-mod-status] #4500

Closed rugk closed 3 years ago

rugk commented 3 years ago

After upgrading from OpenWrt 19.07.3 to OpenWrt 19.07.4 I've noticed a bug in the "status -> processes" list.

It does not show me all processes, because e.g. I could not find dnscrypt-proxy2. Running ps on the command line I could see

I did not notice this bug in OpenWrt 19.07.3.

Here is an example inconsistency:

CLI:

  540 root      1064 S    /sbin/logd -S 64
  571 root      1964 S    /sbin/rpcd -s /var/run/ubus.sock -t 30
  594 root      787m S    /usr/sbin/dnscrypt-proxy -config /etc/dnscrypt-proxy2/dnscrypt-proxy.toml
  733 root      1556 S    /sbin/netifd
  772 root      1248 S    /usr/sbin/odhcpd

GUI: image

Note: Actually dnscrypt-proxy may be the only process not listed for some reason. :thinking:

hnyman commented 3 years ago

It is because it consumes so huge amount on memory (787 MB) that busybox shows it differently "787m":

  571 root      1964 S    /sbin/rpcd -s /var/run/ubus.sock -t 30
  594 root      787m S    /usr/sbin/dnscrypt-proxy -config /etc/dnscrypt-proxy2/dnscrypt-proxy.toml

That fails to match the regex used for parsing. This has already been reported for in master by #4425 and fixed with 4f2ecd8 That has also been backported to 19.07 with commit 8aceafe456 done 19 days ago, a week after 19.07.4 was released :-(

If you want to apply that simple 2-characted fix manually, just edit /usr/lib/lua/luci/sys.lua in the live router. Look at the commits above for reference.