Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 736580 - snmpd memory leak when AgentX subagent disconnects while processing a request
snmpd memory leak when AgentX subagent disconnects while processing a request
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: net-snmp (Show other bugs)
6.2
All Linux
medium Severity medium
: rc
: ---
Assigned To: Jan Safranek
Dalibor Pospíšil
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-08 03:24 EDT by Karel Srot
Modified: 2012-06-20 03:21 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In the previous update, we fixed snmpd crashing when an AgentX subagent disconnected in the middle of processing a requests. The fix was imperfect and left a small memory leak. In this update, this memory leak is fixed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 03:21:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
valgrind output (96.67 KB, text/plain)
2011-09-08 03:24 EDT, Karel Srot
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0876 normal SHIPPED_LIVE Moderate: net-snmp security and bug fix update 2012-06-19 15:28:47 EDT

  None (edit)
Description Karel Srot 2011-09-08 03:24:26 EDT
Created attachment 522051 [details]
valgrind output

Description of problem:

Qa found out that if the AgentX subagent disconnects while processing  a
request, the request then leaks a bit of memory in the master snmpd (approx 44
bytes per such request).

Valgrind report:
==8326==    at 0x4A04A28: calloc (vg_replace_malloc.c:467)
==8326==    by 0x4C33E6A: netsnmp_create_delegated_cache (agent_handler.c:713)
==8326==    by 0x4C36BC9: agentx_master_handler (master.c:591)
==8326==    by 0x4C3642E: netsnmp_call_handlers (agent_handler.c:440)
==8326==    by 0x4C26710: handle_var_requests (snmp_agent.c:2611)
==8326==    by 0x4C28395: handle_pdu (snmp_agent.c:3407)
==8326==    by 0x4C2A7EF: netsnmp_handle_request (snmp_agent.c:3203)
==8326==    by 0x4C2B2A9: handle_snmp_packet (snmp_agent.c:1929)
==8326==    by 0x6AD6867: _sess_process_packet (snmp_api.c:5604)
==8326==    by 0x6AD71FF: _sess_read (snmp_api.c:6043)
==8326==    by 0x6AD8048: snmp_sess_read2 (snmp_api.c:6075)
==8326==    by 0x6AD810A: snmp_read2 (snmp_api.c:5667)

I assume the AgentX subagents disconnect very rarely and this memory leak
happens only in very exceptional case, so I left the leak there for now, while
working on it upstream. Please reopen the bug if you'r AgentX disconnects often
so the leak might matter.

valgrind output attached.

related to bug 729738
Comment 3 Jan Safranek 2012-02-07 08:58:48 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
In the previous update, we fixed snmpd crashing when an AgentX subagent disconnected in the middle of processing a requests. The fix was imperfect and left a small memory leak. In this update, this memory leak is fixed.
Comment 8 errata-xmlrpc 2012-06-20 03:21:36 EDT
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.

http://rhn.redhat.com/errata/RHSA-2012-0876.html

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