[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]
Greg A. Woods woods@weird.com
Fri, 14 Feb 2003 11:08:42 -0800 (PST)
[ On Thursday, February 13, 2003 at 19:13:44 (-0800), Bryan Stansell wrote: ] > Subject: Re: Memory leak or stored info > > i'm going to focus on looking at the memory leaks and see if i can't > track some of this down. if anyone else happens to notice something, > let me know. On NetBSD I'm still seeing major memory leaks, albeit still with my hacks for using "chat" to login to a terminal server. $ console -V console: conserver.com version 7.2.0 console: initial master server `console' console: default escape sequence `^Ec' console: on port 2000 (referenced as `2000') console: built with `./configure --verbose --sysconfdir=/etc --with-libwrap --with-port=2000 --with-base=2001' $ ps -laxc | fgrep conserver UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND 0 238 1 20 2 0 160 168 select Is ?? 0:18.63 conserver 0 14047 238 0 2 0 220 176 select I ?? 0:04.58 conserver $ ps -laxc | fgrep conserver UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND 0 238 1 0 2 0 160 168 select Ss ?? 0:20.01 conserver 0 14047 238 0 2 0 320 176 select S ?? 0:13.84 conserver Note the growth from 220KB to 320KB. That's after running: i=1 while [ $i -lt 100 ] ; do (echo AT^M; sleep 2) | console -f callerid; ((i++)) done Note that "callerid" is an RS-232 connected Caller-ID box which responds to AT\r with "OK" just like a modem. There's never any invocation of my "chat" code on this particular conserver instance (callerid is also the only defined console connetion it services). Also note that during this time there was another client connected, thus the need for the '-f'. (I have Netsaint connecting to both ports every five minutes or so, but without doing anything and just checking that the TCP connect works, and there's no leak from that.) Some day soon I may be able to try merging up to the latest release and re-compiling with ElectricFence and/or vmalloc and/or dmalloc. Vmalloc in particular would allow me to see what kind of memory is leaking and where it might have been allocated. -- Greg A. Woods +1 416 218-0098; <g.a.woods@ieee.org>; <woods@robohack.ca> Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>