Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

memory Leak in net-snmp-5.7.3

186 views
Skip to first unread message

Soubhagya Panigrahi

unread,
Apr 29, 2016, 3:25:23 AM4/29/16
to
Hi Team,

I am facing one memory leak issue while doing a continuous query for more than 12 hours within a interval of 5 seconds.

Used Net-snmp version : 5.7.3
This is the valgrind report.

==20640== 32 bytes in 1 blocks are definitely lost in loss record 2,210 of 5,253
==20640==    at 0x4C266B0: calloc (in /usr/lib64/valgrind/
==20640==    by 0x5789BDE: netsnmp_container_get_binary_array (in /sw/linuxapps/usr/lib64/libnetsnmp.so.30.0.3)
==20640==    by 0x57892B8: netsnmp_container_find (in /sw/linuxapps/usr/lib64/libnetsnmp.so.30.0.3)
==20640==    by 0x46FD01: _ifXTable_container_init (ifXTable_interface.c:1972)
==20640==    by 0x46FD01: _ifXTable_initialize_interface (ifXTable_interface.c:189)
==20640==    by 0x42EA14: init_subagent (cwoAoStatsTable_subagent.c:280)
==20640==    by 0x42EFD2: main (cwoAoStatsTable_subagent.c:583)
==20640==
==20640== 32 bytes in 1 blocks are definitely lost in loss record 2,211 of 5,253
==20640==    at 0x4C266B0: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==20640==    by 0x5789BDE: netsnmp_container_get_binary_array (in /sw/linuxapps/usr/lib64/libnetsnmp.so.30.0.3)
==20640==    by 0x57892B8: netsnmp_container_find (in /sw/linuxapps/usr/lib64/libnetsnmp.so.30.0.3)
==20640==    by 0x460B69: _hrStorageTable_container_init (hrStorageTable_interface.c:1680)
==20640==    by 0x460B69: _hrStorageTable_initialize_interface (hrStorageTable_interface.c:194)
==20640==    by 0x42EA1E: init_subagent (cwoAoStatsTable_subagent.c:284)
==20640==    by 0x42EFD2: main (cwoAoStatsTable_subagent.c:583)
==20640==
==20640== 32 bytes in 1 blocks are definitely lost in loss record 2,212 of 5,253
==20640==    at 0x4C266B0: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==20640==    by 0x5789BDE: netsnmp_container_get_binary_array (in /sw/linuxapps/usr/lib64/libnetsnmp.so.30.0.3)
==20640==    by 0x57892B8: netsnmp_container_find (in /sw/linuxapps/usr/lib64/libnetsnmp.so.30.0.3)
==20640==    by 0x4690B9: _ifTable_container_init (ifTable_interface.c:1931)
==20640==    by 0x4690B9: _ifTable_initialize_interface (ifTable_interface.c:192)
==20640==    by 0x42EA49: init_subagent (cwoAoStatsTable_subagent.c:300)
==20640==    by 0x42EFD2: main (cwoAoStatsTable_subagent.c:583)



What I can see inside : netsnmp_container_get_binary_array()

    memory is being allocated in both the places which is returned to a structure pointer and finally same varibale returned to a fucntion called netsnmp_container_init_list() as varibale "container".
   
    This container varible is freed only on the case of shutdown(for both shutdown_agent() and snmp_shutdown() ).
        So do we need to have a different free which will solve my problem or am i just bugging arround with the code. ?

It would be great if anyone can help me to get, if any existing patch available for this kind of memory leak issue ? or any pointer which can help me to get rid of this memory leak.

Hoping for a favorable reply.

Thanks in advance.
--
Regards
Soubhagya

grant....@live.com

unread,
Oct 30, 2017, 5:06:35 PM10/30/17
to
Any luck with this? I'm having the same issue.
0 new messages