Red Hat Bugzilla – Bug 204274
apparent memory leak in setroubleshootd
Last modified: 2007-11-30 17:11:41 EST
Description of problem:
ps aux reports:
root 2424 2.1 52.6 1525452 407836 ? Ssl Aug27 11:42 /usr/bin/python
Disk light was on solid because system was thrashing - an 'su' to kill it took
over 2 minutes from hitting 'enter' to the Password: prompt. So no extensive
debugging was possible.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
A very likely cause of memory leaks is our current use of libxml2. Unlike most
python object memory references are not automatically freed in libxml2. Once a
document is created it must be explicitly freed with doc.freeDoc() and xpath
contexts must be freed with ctxt.xpathFreeContext(). We create quite a few
documents (DOM trees) and search contexts, but we never explicitly free them. We
need to add these calls.
*** Bug 205245 has been marked as a duplicate of this bug. ***
This should be fixed in the current code base, we now free all libxml2 documents
and xpath contexts.