[tkined] Memory issus in Tcl

From: Matthew Krenzer (krenzer@wayport.net)
Date: Wed Aug 30 2000 - 21:42:59 MET DST

I'm using the Feb 21 2000 version of Tnm w/ tcl8.3.2 on a linux system
w/ kernel 2.0.38. We are having a very
strange memory leak, and I'm hoping someone out here might be able to
help us out.

We are using TNM allong with tclhttpd 3.0.3, so it is a long running
process. We set up a job that performs several async snmp requests on
several different switches every 30 seconds. The snmp values returned
are then formated for viewing through the web server.

In general, the memory usage is fairly constant (slightly increasing),
except that every few hours there is a huge increase in the memory
usage. Over one weekend we went from using about 10M to over 50M of
memory. I have scoured my code looking for anything that could be
guilty of this, but I have met with little sucess.
Hr. Memory
1 10220
2 12080 <- big jump
3 12284
4 12392
5 12412
6 12776
7 13724 <- Big jump
8 13960
9 13964
10 14196
11 14224
12 14312
13 15424 <- Big jump
14 15588
15 15696
16 15696
17 16720 <- Big jump
18 16720
19 17744 <- Big jump

Dose anyone have any clue as to what might cause this? Is there any
thing I might be doing in TCL that could cause these results? TCL is
suposed to handle memory management for me, right? As long as I'm not
doing something like creating variable with a timestamp in the name, I
shouldn't really be getting a leak like this, right? That leaves me
with only the hope that something might be found in the libraries I'm
using - like TNM. Are there known issues with using TCL in long
running proccess that I should know about? We have about 6 TCL books
here at our disposal and only one of them even mentions the word
'memory' in the index.

I use the following Tnm commands: snmp, mib, job, icmp, and dns. We
also use the Thread library, TclX, and, as said above, tclhttpd.

As for the question of if we are doing anything with a period of one
or two hours, the answer is no. The only periodic jobs (in the
program) are run every 30 seconds and 5 minuts. Either of those
should show a constant increase in memory usage in the table above.
But that dosn't happen. Is there anything else going on behind the

I have written several little scripts to test for memory leaks in
several of the libraries, but to avail. We have searched and searched
with no luck. Any insight would be great. Thank you.


!! 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:52 MET