BIND 10 #1359: reference leak in python log wrapper
BIND 10 Development
do-not-reply at isc.org
Fri Oct 28 05:58:01 UTC 2011
#1359: reference leak in python log wrapper
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner:
Type: defect | Status: new
Priority: major | Milestone: Next-
Component: logging | Sprint-Proposed
Sensitive: 0 | Keywords:
Sub-Project: Core | Defect Severity: N/A
Estimated Difficulty: 0 | Feature Depending on Ticket:
Total Hours: 0 | Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
There seems to be (potential) reference leak in the C++ wrapper
for logging. For example, see this:
{{{
PyObject *midO(PySequence_GetItem(args, start - 1));
if (midO == NULL) {
return (NULL);
}
string mid(objectToStr(midO, false));
}}}
(`midO` isn't used anywhere else). `PySequence_GetItem` acquires
a new reference to the extracted object, but it's not decremented.
BTW, the apparent remaining leak I mentioned in #1028 seems to be
related to logging. I experimentally replaced logger methods with
fake empty functions, and then b10-xfrin uses much less amount of
memory. So I quickly looked at logging related code and found this one.
But I suspect this reference leak is not the reason in my test case
because the logged messagees always consist of the same set of strings
(but this won't be the case in general so we should still fix this),
and the python interpreter should keep the same string object for the
same string.
We may have leak in the C++ liblog or in log4cplus. According to
this link log4cplus seems to have memory leaks:
http://stackoverflow.com/questions/696321/best-logging-framework-for-
native-c
--
Ticket URL: <http://bind10.isc.org/ticket/1359>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list