Menu

#2756 Memory Leak in 5.7.3

linux
duplicate
None
5
2016-11-12
2016-11-11
No

On Linux x86-32 Valgrind reports a repeated mem leak (and I can see that in top as well) in net-snmp 5.7.3

Am using a proprietary MIB tool called TotalView which has all queries with request-id=0.

The Valgring log is below [last chunk is definitely lost].

I attached a pcap of the traffic and a log of net-snmp output with "-Dsnmp_agent".

Thanks, Vlad

==5276== 2,352 bytes in 4 blocks are possibly lost in loss record 63 of 69
==5276== at 0x402BE68: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==5276== by 0x40C7C1E: _copy_varlist (snmp_client.c:442)
==5276== by 0x40C7CD2: _clone_pdu (snmp_client.c:516)
==5276== by 0x4067C2B: init_agent_snmp_session (snmp_agent.c:1400)
==5276== by 0x406BF95: handle_snmp_packet (snmp_agent.c:1925)
==5276== by 0x40F5995: _sess_process_packet (snmp_api.c:5437)
==5276== by 0x40F6E1A: _sess_read (snmp_api.c:5872)
==5276== by 0x40F7619: snmp_sess_read2 (snmp_api.c:5904)
==5276== by 0x41B4532: (below main) (libc-start.c:226)
==5276==
==5276== 21,168 bytes in 36 blocks are possibly lost in loss record 66 of 69
==5276== at 0x402A5E6: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)

==5276== by 0x4069AC3: netsnmp_create_subtree_cache (snmp_agent.c:2388)
==5276== by 0x406B12C: handle_pdu (snmp_agent.c:3373)
==5276== by 0x406B457: netsnmp_handle_request (snmp_agent.c:3281)
==5276== by 0x406BE7B: handle_snmp_packet (snmp_agent.c:1987)
==5276== by 0x40F5995: _sess_process_packet (snmp_api.c:5437)
==5276== by 0x40F6E1A: _sess_read (snmp_api.c:5872)
==5276== by 0x40F7619: snmp_sess_read2 (snmp_api.c:5904)
==5276== by 0x41B4532: (below main) (libc-start.c:226)
==5276==
==5276== 1,136,598 (19,008 direct, 1,117,590 indirect) bytes in 132 blocks
are definitely lost in loss record 69 of 69

==5276== at 0x402BE68: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==5276== by 0x40C777E: _clone_pdu_header (snmp_client.c:355)
==5276== by 0x40C7CB7: _clone_pdu (snmp_client.c:556)
==5276== by 0x4067C2B: init_agent_snmp_session (snmp_agent.c:1400)
==5276== by 0x406BF95: handle_snmp_packet (snmp_agent.c:1925)
==5276== by 0x40F5995: _sess_process_packet (snmp_api.c:5437)
==5276== by 0x40F6E1A: _sess_read (snmp_api.c:5872)
==5276== by 0x40F7619: snmp_sess_read2 (snmp_api.c:5904)
==5276== by 0x41B4532: (below main) (libc-start.c:226)

2 Attachments

Discussion

  • Robert Story

    Robert Story - 2016-11-12
    • status: open --> duplicate
    • assigned_to: Robert Story
     
  • Robert Story

    Robert Story - 2016-11-12

    This is a duplicate of https://sourceforge.net/p/net-snmp/bugs/2387/. There is a fix in the 5-7-patches branch, commit 9bce2c951.

     

Log in to post a comment.