On Fri, Aug 06, 2004 at 08:12:21AM -0400, Elizabeth Thomas wrote: > I've had a lot more success using purify when using the --disable-shared > option on both the tcl and aolserver configs (thanks to Zoran) (FWIW, I > also build tcl without the thread memory allocator so I can more > directly identify memory leaks. To do this, remove the > -DUSE_THREAD_ALLOC from the generated tcl Makefile and tclConfig.sh)
Thanks! I did that, and now Purify is working with AOLserver 4.0.7. Unfortunately, that didn't solve my memory leak problem. :( I have an AOLserver running some custom C and Tcl code. Until recently, it had been running fine for a long time, and would stay around 50 or 60 MB or so for at least a week. Now, after running for only 24 hours, the process goes up to around 900+ MB. The leak is quite linear, every time my code serves a request serves, the memory usage goes up by about the same amount for the first several hundred requests. I believe this leak is in my custom code somewhere, because I can make it go away simply by reverting back to an older CVS version of my code. I revert, blam-o, right back to the 60 MB memory usage that I expect. Thing is though, I can't seem to find what the heck I changed to cause this leak! And so far, Purify does NOT report any leaks at all! (The leak occurs with both AOLserver 3.3+ad13 and 4.0.7, but I have only run it under Purify with 4.0.7.) I figured that I must have somehow done something dumb in my code, yet, I didn't really change all that much, and after reviewing everything I changed (several times), I still haven't found anything suspicious. So, can anyone suggest what sorts of errors could cause a big memory leak which is NOT detected by Purify, and how I could check for them in AOLserver? Or any other ways to figure out WHAT exactly is making AOLserver steadily use more and more memory? Thanks! Btw, I am also using LD_PRELOAD with AOLserver. One oddity, is the first time I start up AOLserver, Purify immediately fails with this error: ld.so.1: rtslave: fatal: relocation error: file /web/aol4-src/nsmyproject/mt-safe.so: symbol ns_strtok: referenced symbol not found But if I first start up AOLserver WITHOUT using LD_PRELOAD (which works), and shut it down, I can then successfully start it up WITH LD_PRELOAD. Odd. (I guess the first time around, Purify must have written out some libraries that let it find the symbols it needs even when using LD_PRELOAD.) By AFAIK this has nothing to do with my problem above. -- Andrew Piskorski <[EMAIL PROTECTED]> http://www.piskorski.com/ -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
