[mythtv] memory leak in MainServer::FillStatusXML

George Nassas gnassas at mac.com
Fri Jun 17 22:32:17 UTC 2005


The past week or so I've been going batty trying to track down a memory 
leak that appears after you request either xml or html server status. 
It's not very hard to observe, on your server machine run this:

	while :; do wget --quiet -O /dev/null http://127.0.0.1:6544/xml; done

and watch the backend's vsz increase by a meg every few seconds. It's 
about the same if you remove the xml bit.

I've commented out various parts of FillStatusXML and FillProgramInfo 
hoping to find the line or section at fault but it's not so simple. 
There doesn't appear to be an unmanaged pointer anywhere nor am I 
hitting the server too hard for garbage collection to occur. Once the 
virtual size goes up it never comes down. I'm wondering if Qt or the 
malloc code is going awry in some complicated way. Or, maybe there's an 
obvious problem that I can't see because I've been staring at 
mainserver.cpp for too long.

That's why I'm tossing this out to the list: do you also see the leak? 
If not, what setup are you running? I've observed this on three 
different systems, two running stock .18 and one with cvs from about a 
week ago. All are debian sarge more or less stable with whatever 
testing and unstable packages are required to get myth running.

In real life I don't hit the server repeatedly like that. My 
application is a status thingie that polls a few times a minute so it 
takes a couple of hours to bring the server down.

- George



More information about the mythtv-dev mailing list