This is a discussion on Memory leak in DISMAN-MIB support - SNMP ; This is a multi-part message in MIME format. --===============1312784264== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C68AC6.FD40264F" This is a multi-part message in MIME format. ------_=_NextPart_001_01C68AC6.FD40264F Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, When I compile and ran net-snmp-5.2.1 SNMP agent with purify option ...
This is a multi-part message in MIME format.
--===============1312784264==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C68AC6.FD40264F"
This is a multi-part message in MIME format.
------_=_NextPart_001_01C68AC6.FD40264F
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi,
When I compile and ran net-snmp-5.2.1 SNMP agent with purify
option in red hat. Memory was leaked in following places.
File: agent/mibgroup/disman/mteTriggerTable.c (1 byte of leak)
In create_mteTriggerTable_data() function
> line: StorageNew->mteTriggerThresholdObjects =3D strdup("");
File: agent/mibgroup/disman/mteTriggerTable.c (11 bytes of leak)
In parse_simple_monitor() function
> line: StorageNew->mteOwner =3D strdup("snmpd.conf");
File: agent/mibgroup/disman/mteTriggerTable.c (16 bytes of leak)
In create_mteTriggerTable_data() function
> line: StorageNew->mteTriggerValueID =3D calloc(1, sizeof(oid) *
sizeof(2));
File: agent/mibgroup/disman/mteTriggerTable.c (36 bytes of leak)
In create_mteTriggerTable_data() function
>line: memdup((unsigned char **)
&(StorageNew->mteTriggerDeltaDiscontinuityID),
(unsigned char *) sysUpTimeInstance,
sizeof(sysUpTimeInstance));
File: agent/mibgroup/disman/mteTriggerTable.c (400 bytes of leake )
In create_mteTriggerTable_data() function
>line: StorageNew =3D SNMP_MALLOC_STRUCT (mteTriggerTable_data);
Amount of leak:
If snmpd runs for 10 Minutes with out any get/set request passed to
agent following amount of leak observed.
1 byte ( 52 times ) : 52 bytes=09
11 bytes ( 2 times ) : 22 bytes
16 bytes ( 2 times ) : 32 bytes
36 bytes ( 2 times ) : 72 bytes
400 bytes ( 2 times) : 800 bytes
--------------------------------------------------
Total leak : 978 bytes
--------------------------------------------------
Is this memory leak is fixed in latest versions?
=20
Thanks and Regards,
Santhosh
------_=_NextPart_001_01C68AC6.FD40264F
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
charset=3Dus-ascii">
6.5.7638.1">
Memory leak in DISMAN-MIB support
Schoolbook">Hi,
LANG=3D"en-us"> FACE=3D"Century Schoolbook">When LANG=3D"en-us"> Schoolbook">I LANG=3D"en-us"> FACE=3D"Century Schoolbook">compile and r LANG=3D"en-us"> Schoolbook">a LANG=3D"en-us">n =
net-snmp-5.2.1 LANG=3D"en-us"> SNMP ag FACE=3D"Century Schoolbook">e Schoolbook">n Schoolbook">t LANG=3D"en-us"> with purify option =
in FACE=3D"Century Schoolbook">red hat. Schoolbook"> LANG=3D"en-us"> M LANG=3D"en-us"> Schoolbook">emory was leaked in following LANG=3D"en-us"> Schoolbook">places LANG=3D"en-us">. LANG=3D"en-us">
FACE=3D"Arial">File: agent/mibgroup/disman/mteTriggerTable.c (1 =
byte of leak FACE=3D"Arial">)
LANG=3D"en-us"> FACE=3D"Arial">In create_mteTriggerTable_data() =
function
LANG=3D"en-us"> FACE=3D"Arial">> line: =
StorageNew->mteTriggerThresholdObjects =3D =
strdup("");
FACE=3D"Arial">File: agent/mibgroup/disman/mteTriggerTable.c (11 =
bytes FACE=3D"Arial"> of leak)
LANG=3D"en-us"> FACE=3D"Arial">In parse_simple_monitor() function
LANG=3D"en-us"> FACE=3D"Arial">> line: StorageNew->mteOwner =3D =
strdup("snmpd.conf");
FACE=3D"Arial">File: =
agent/mibgroup/disman/mteTriggerTab FACE=3D"Arial">le.c (16 byte FACE=3D"Arial">s of =
leak)
LANG=3D"en-us"> FACE=3D"Arial">In create_mteTriggerTable_data() =
function
LANG=3D"en-us"> FACE=3D"Arial">> line: StorageNew->mteTriggerValueID =3D calloc(1, =
sizeof(oid) * sizeof(2));
FACE=3D"Arial">File: agent/mibgroup/disman/mteTriggerTable.c (36 =
bytes FACE=3D"Arial"> of leak)
LANG=3D"en-us"> FACE=3D"Arial">In create_mteTriggerTable_data() =
function
FACE=3D"Arial"> SIZE=3D2 FACE=3D"Arial">>line: memdup((unsigned char =
**)
FACE=3D"Arial"> &nbs=
p; =
&(StorageNew->mteTriggerDeltaDiscontinuityID),
LANG=3D"en-us"> FACE=3D"Arial"> &nbs=
p; (unsigned char *) sysUpTimeInstance, =
sizeof(sysUpTimeInstance));
FACE=3D"Arial">File: agent/mibgroup/disman/mteTriggerTable.c (400 =
bytes of leake )
LANG=3D"en-us"> FACE=3D"Arial">In create_mteTriggerTable_data() =
function
FACE=3D"Arial">>line: LANG=3D"en-us"> StorageNew =3D =
SNMP_MALLOC_STRUCT LANG=3D"en-us"> LANG=3D"en-us"> FACE=3D"Arial">(mteTriggerTable_data) FACE=3D"Arial">; LANG=3D"en-us">
FACE=3D"Arial">Amount of leak:
If =
snmpd runs for 10 Minutes with out any get/set request passed to agent =
following amount of leak observed.
LANG=3D"en-us"> =
FACE=3D"Arial">1 byte ( 52 times ) FACE=3D"Arial"> : 52 =
bytes
LANG=3D"en-us"> =
FACE=3D"Arial">11 bytes ( 2 times ) : 22 =
bytes
LANG=3D"en-us"> =
FACE=3D"Arial">16 bytes ( 2 times ) : 32 =
bytes
LANG=3D"en-us"> =
FACE=3D"Arial">36 bytes ( 2 times ) : 72 =
bytes
LANG=3D"en-us"> =
FACE=3D"Arial">400 bytes ( 2 times) : 800 =
bytes
LANG=3D"en-us"> =
FACE=3D"Arial">-------------------------------------------<=
SPAN LANG=3D"en-us"> FACE=3D"Arial">------- LANG=3D"en-us">
LANG=3D"en-us"> =
FACE=3D"Arial">Total =
leak &nb=
sp; : 978 FACE=3D"Arial"> bytes
LANG=3D"en-us"> =
FACE=3D"Arial">------------------------------------------- SIZE=3D2 FACE=3D"Arial">- LANG=3D"en-us">------
LANG=3D"en-us"> FACE=3D"Arial">Is this memory leak is fixed LANG=3D"en-us"> FACE=3D"Arial"> in latest versions LANG=3D"en-us"> FACE=3D"Arial">? LANG=3D"en-us">
Schoolbook"> LANG=3D"en-us">
LANG=3D"en-us"> Schoolbook">Thanks and Regards,
Schoolbook">Santhosh LANG=3D"en-us">
------_=_NextPart_001_01C68AC6.FD40264F--
--===============1312784264==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============1312784264==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
--===============1312784264==--