Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 572206

Summary: SNMPD unresponsive because of too many open files
Product: Red Hat Enterprise Linux 5 Reporter: Klaus Detsch <Klaus.Detsch>
Component: net-snmpAssignee: Jan Safranek <jsafrane>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: low    
Version: 5.3   
Target Milestone: rc   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-11 14:16:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Klaus Detsch 2010-03-10 14:48:07 UTC
Description of problem:

The snmpd stops after some time because of too many open files.

----from logfile ----

Feb 28 22:30:22 eul0300622 snmpd[21717]: Connection from UDP: [10.198.77.1]:39686 REFUSED
Feb 28 22:30:24 eul0300622 snmpd[21717]: warning: cannot open /etc/hosts.allow: Too many open files
Feb 28 22:30:24 eul0300622 snmpd[21717]: warning: cannot open /etc/hosts.deny: Too many open files
Feb 28 22:30:24 eul0300622 snmpd[21717]: Connection from UDP: [10.198.77.1]:39686 REFUSED
Feb 28 22:30:24 eul0300622 snmpd[21717]: warning: cannot open /etc/hosts.allow: Too many open files
Feb 28 22:30:24 eul0300622 snmpd[21717]: warning: cannot open /etc/hosts.deny: Too many open files
Feb 28 22:30:24 eul0300622 snmpd[21717]: Connection from UDP: [10.198.77.1]:39686 REFUSED
Feb 28 22:30:27 eul0300622 snmpd[21717]: /proc/stat: Too many open files
Feb 28 22:30:32 eul0300622 snmpd[21717]: /proc/stat: Too many open files
Feb 28 22:30:32 eul0300622 snmpd[21717]: could not open /proc/net/arp
Feb 28 22:30:32 eul0300622 snmpd[21717]: Unable to create netlink socket
Feb 28 22:30:37 eul0300622 snmpd[21717]: /proc/stat: Too many open files

---- end ------------

The can be watched by doing e.g. "lsof -p <snmpdpid> | wc -l".

The number of open files increases over time. Disabeling IPv6 doesn't solve it, so i guess it is not the IPv6 from version 5.0.x

Version-Release number of selected component (if applicable):

net-snmp-libs-5.3.2.2-7.el5_4.2
net-snmp-5.3.2.2-7.el5_4.2
net-snmp-utils-5.3.2.2-7.el5_4.2

How reproducible:

Any time while running snmpd for longer then about 10 minutes.

Steps to Reproduce:

1. Start snmpd,
2. do a lsof -p <snmpdpid> | wc -l
3. wait about 10 minutes
4. do again a lsof -p <snmpdpid> | wc -l
  
Actual results:

Increasing number of open files finally in resulting to many open files and leaving snmpd unoperational.

Expected results:

Stable number of open files ( On our Red Hat EL 5 there are 54 filedescriptors counted..)

Additional info:

This happens as well on 32bit snmpd as on 64bit snmpd.

Comment 1 Jan Safranek 2010-03-11 14:16:46 UTC

*** This bug has been marked as a duplicate of bug 561875 ***