I've been trying to find a memory leak. The program is processing data retrieved over the net, uploading results to another site, and runs for days at a time with multiple copies running at once. There is no database. After a few days, the memory usage increases to a point then the program stops working. On cntrl-c it reports stuck at execCmEx() .. this may or may not be the source of the problem, only it is where it halts.
I have no experience with debugging tools so I added a function to log how much memory the program is using line by line. Discovered the memory jumps on strutils.find() .. it can be replicated to the same line each time, when done within my program, but when trying to create a test program that uses the same data and code section, it does not leak. So something else is involved. The memory leak is both consistent and inconsistent - consistent it will process about the same amount of data before crashing, but inconsistent in that the memory usage increases only rarely, like maybe by 50Mb every few hours in a single big jump, like a stair case. This suggests a problem in the data, but the data is very simple text and I checked it out when it jumped there is nothing unusual. Adding the memory debug statements caused it to move a little to a different nearby occurrence of strutils.find() Two questions: is there anything in strutils.find() that might conceivably cause a memory leak? What method would you use to figure out where memory is leaking for something like this that is so intermittent and long-term (I have zero experience with debuggers so any practical pointers appreciated).
