snmpd process from net-snmp gets bigger and bigger while it is requested.
Especially when using SNMPv3, SHA and AES.
On some servers process was using more than 500MB of memory, had to restart it to come back to the usual 10MB.
But process then grows again.
Could you look at this please ?
Thank you very much !
# uname -r
# cat /etc/centos-release
CentOS Linux release 7.7.1908 (Core)
# yum list installed | grep snmp
net-snmp.x86_64 1:5.7.2-43.el7 @base
net-snmp-agent-libs.x86_64 1:5.7.2-43.el7 @base
net-snmp-libs.x86_64 1:5.7.2-43.el7 @base
net-snmp-perl.x86_64 1:5.7.2-43.el7 @base
net-snmp-utils.x86_64 1:5.7.2-43.el7 @base
Initial report : https://bugs.centos.org/view.php?id=16927
Some kind related to bug #1779609.
Bug #1779609 is about sth else, but I'll try to take a look at it.
Do you have any reproducer (e.g. content of /etc/snmp/snmpd.conf, used commands for running snmp queries and so on)?
Thank you Josef for your answer.
Here's the daemon config :
# grep -vE '^#.*|^$' /etc/snmp/snmpd.conf
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
extend-sh testcmd echo OK
# grep -vE '^#.*|^$' /var/lib/net-snmp/snmpd.conf
usmUser 1 3 0x80001f8880cf894745b6369a5c00000000 "r" "r" NULL .18.104.22.168.22.214.171.124.1.3 0x4cd9dcb044a50668ebb54f73e81cf10ce41e77b1 .126.96.36.199.188.8.131.52.2.4 0x4cd9dcb044a50668ebb54f73e81cf10c 0x
ifXTable .1 14:0 18:0x $
ifXTable .2 14:0 18:0x $
Command used to create the above user :
createUser r SHA "MyNicePassword" AES "MyNicePassword"
I request the following OID every minute :
And the following ones on a 3 minutes basis :
.184.108.40.206.4.1.2021.4.3 / .220.127.116.11.4.1.2021.4.4
I don't know if it's related to a particular OID, or if it's a SNMP v3 / SHA / AES issue.
I would go for a SNMP v3 / SHA / AES issue, because using the exact same configuration with SNMP v2 does not trigger the issue.
May perhaps help, note that using the exact same configuration (OID, SNMP v3 / SHA / AES) on Debian 9/10 does not trigger the issue.
Feel free if needed, thank you !
I can confirm this issue. I see the memory usage (memory_rss) grow with every request that is handled bij net-snmpd.
It doesn't matter if I use the standard SNMP-OID's or use "extend" or "extend-sh".
When downgrading to net-snmpd 5.7.2-37 this behaviour stops.
If you need additional info to debug just let me know!
After some investigation, I have good news.
This issue has been fixed in version net-snmp-5.7.2-45, which will be available in RHEL-7.8 release, that should be released in Q1 2020.
Only obstacle for me is, I don't know exactly, how long does it take to propagate RHEL-7.8 repositories to CentOS, but it's not aim of this bug report.
Due of fix availablility, I am closing this bug report as NEXTRELEASE.
Really good news, thank you very much Josef.