RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1188295 - net-snmp snmpd fork() overhead [fix available]
Summary: net-snmp snmpd fork() overhead [fix available]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: net-snmp
Version: 6.8
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jan Safranek
QA Contact: Dalibor Pospíšil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-02 14:42 UTC by Andy Fletcher
Modified: 2015-07-22 07:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: To improve security and to prevent file descriptor leaks, snmpd always closes all its filedescriptors when processing 'extend' or 'pass' configuration options. Doing so, it blindly closes all filedescriptors lower than current resource limit of opened files (ulimit -n, /proc/sys/fs/file-max). Consequence: When these limits are high, it may take some time to close these filedescriptors and snmpd thus slowly reacts to GET request in NET-SNMP-EXTEND-MIB::nsExtendOutput1Table. Fix: snmpd does not read resource limits from operating system, instead it finds out on its own which file descriptors it uses. Result: Requests in NET-SNMP-EXTEND-MIB::nsExtendOutput1Table are much faster.
Clone Of:
: 1252048 (view as bug list)
Environment:
Last Closed: 2015-07-22 07:23:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1385 0 normal SHIPPED_LIVE Moderate: net-snmp security and bug fix update 2015-07-20 18:07:39 UTC

Description Andy Fletcher 2015-02-02 14:42:22 UTC
Description of problem:

NB. This is not limited to RHEL6 (also affects RHEL5/7).

Due to the way snmpd handles file descriptors when forking scripts for 'pass' or 'extend', on systems with very large numbers of FD, this will consume CPU and take several seconds for each OID.

Please consider back porting the following fix:
https://sourceforge.net/p/net-snmp/code/ci/0e4bf5d3659c459128c0f98926b0db7296e9c49f/


Version-Release number of selected component (if applicable):
Observed on all releases, including 5.7


How reproducible:
Every time

Steps to Reproduce:
1. increase fs-max/nofile to large value (32626630 in test case)
2. configure snmp pass or extend in snmpd.conf
3. get/walk the OID

Actual results:
Several seconds of 100% CPU utilisation, SNMP response takes several seconds.
snmpwalk (for 'pass' that support this) time out.

Expected results:
Immediate response, minimal CPU utilisation


Additional info:
Please consider back porting the following fix:
https://sourceforge.net/p/net-snmp/code/ci/0e4bf5d3659c459128c0f98926b0db7296e9c49f/

Comment 8 errata-xmlrpc 2015-07-22 07:23:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1385.html


Note You need to log in before you can comment on or make changes to this bug.