[tkined] memory leaks with snmpd

From: Davide Minervini (honda@sodalia.it)
Date: Wed Jan 19 2000 - 17:52:25 MET

     I've been using a very simplified version of the SNMP agent of
Sveinar Rasmussen (just the snmpd script without its customised mibs).
The snmpd script works perfectly.

The only problem I found (maybe I am wrong) is that under stress
conditions it seems to have memory leaks.
I have made a simple mib file with the following entries:

sn_Ping_Entry ::= SEQUENCE {
    SN_TimeIndex Integer32,
    SN_TimeStamp DisplayString,
    SN_Protocol INTEGER,
    SN_Response_Time Integer32,
    SN_Fwd_Response_Time Integer32,
    SN_Bwd_Response_Time Integer32,
    SN_Failure Integer32

Adding about 100 entries of this table with the command setMIB for each
MIB var in the entry, deleting all of them with unsetMIB and adding the
same 100 entries again, I have found (using the Unix command 'top') an
increase in the memory allocation of about 50 K.

Is there something more to do than doing 'unset mibVals(mib_var)' inside
the unsetMIB procedure to free all the memory allocated with the command
'$s instance $mib_var mibVals(mib_var) $mibVals(mib_var)' in the setMIB
one ???

<NB Here I use mib_var instead of arrayX,arrayY as in the script just to
simplify the discussion....>

It should be enough because the mib instance life (mib_var) should be
bound to the Tcl variable mibVals(mib_var).

If that's right and enough is there some known memory leaks involved
with the command 'snmp# instance label varName [default]' so that
unsetting the varName not all the memory gets freed ????

Thanks to anyone who can give me some help.
Hope one day to be of some help as well.


!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.

This archive was generated by hypermail 2b29 : Mon Jan 08 2001 - 15:27:32 MET