Hello,
After migration from OpenVZ to VZ7 net-snmp start hang up after a while (too many open files).
CT-1146 /# rpm -q net-snmp
net-snmp-5.5-57.el6.1.x86_64
CT-1146 /#
CT-1146 /# lsof | grep -i snmp | wc -l
1071
Like this
snmpd 13199 root 1017r REG 0,39 0 4026532061 /proc/partitions
snmpd 13199 root 1018r REG 0,39 0 4026532061 /proc/partitions
snmpd 13199 root 1019r REG 0,39 0 4026532061 /proc/partitions
snmpd 13199 root 1020r REG 0,39 0 4026532061 /proc/partitions
snmpd 13199 root 1021r REG 0,39 0 4026532061 /proc/partitions
snmpd 13199 root 1022r REG 0,39 0 4026532061 /proc/partitions
CT-1146 /# cat /proc/partitions
major minor #blocks name
182 526832 24772608 ploop32927
182 526833 24770560 ploop32927p1
CT-1146 /# ls -lh /proc/partitions
-r--r--r-- 1 root root 0 вер 21 13:38 /proc/partitions
CT-1146 /#
After restart working fine untill reach open file limit.
Forgot log
CT-1146 /# tail /var/log/messages
Sep 23 12:26:50 voip snmpd[13199]: /proc/stat: Too many open files
Sep 23 12:26:51 voip snmpd[13199]: could not create socket
Sep 23 12:26:51 voip snmpd[13199]: cannot open /proc/net/dev ...
Sep 23 12:26:55 voip snmpd[13199]: /proc/partitions: Too many open files
Sep 23 12:26:55 voip snmpd[13199]: /proc/stat: Too many open files
Sep 23 12:27:00 voip snmpd[13199]: /proc/partitions: Too many open files
Sep 23 12:27:00 voip snmpd[13199]: /proc/stat: Too many open files
Sep 23 12:27:05 voip snmpd[13199]: /proc/partitions: Too many open files
Sep 23 12:27:05 voip snmpd[13199]: /proc/stat: Too many open files
Sep 23 12:27:06 voip snmpd[13199]: cannot open /proc/net/dev ...
Have a look at bug 2219 https://sourceforge.net/p/net-snmp/bugs/2219/
It looks as if the RedHat folks have not picked that up, although I am stumped as to why it does not use /proc/diskstats to get those statistics?
Hmm, you right, I've checked source code (from src.rpm) and fclose is absent.
Ok, you can close this bug and I'll open new one for RedHat folks
Last edit: Valentyn 2016-09-23
@Valentyn - any news on that? As I'm also struggeling with this Problem now ... :-/
thx
Andreas Schnederle-Wagner
btw) as I didn't found a Ticket from you with RedHat - I proposed the Patch to them --> https://bugzilla.redhat.com/show_bug.cgi?id=1494255
Also in case someone could use it ... I compiled patched RPMs for Centos 6 x64 - based on 5.5.60 SRPMs:
https://www.futureweb.at/userdata/6348/uploads/rpm/net-snmp-5.5-61.el6.x86_64.rpm;
https://www.futureweb.at/userdata/6348/uploads/rpm/net-snmp-debuginfo-5.5-61.el6.x86_64.rpm;
https://www.futureweb.at/userdata/6348/uploads/rpm/net-snmp-devel-5.5-61.el6.x86_64.rpm;
https://www.futureweb.at/userdata/6348/uploads/rpm/net-snmp-libs-5.5-61.el6.x86_64.rpm;
https://www.futureweb.at/userdata/6348/uploads/rpm/net-snmp-perl-5.5-61.el6.x86_64.rpm;
https://www.futureweb.at/userdata/6348/uploads/rpm/net-snmp-python-5.5-61.el6.x86_64.rpm;
https://www.futureweb.at/userdata/6348/uploads/rpm/net-snmp-utils-5.5-61.el6.x86_64.rpm;
Last edit: randome 2017-09-22