After re-reading your message I think I know what the problem is.

kernel: 2.4.24 (eeek -- its time to upgrade!)
gcj: gcj (GCC) 3.4.4 20041218 (prerelease) (Debian 3.4.3-6)
python: Python 2.3.4 (#2, Jan  5 2005, 08:24:51)
PyLucene: 0.9.6

You seem to be using python < 2.4, the finalizeObject() function in PyLucene.i is a noop for python < 2.4 which causes a leak of python objects that are wrapped by a java object, as is the case with a python StringReader, it gets wrapped by a java PythonReader instance. When the PythonReader instance is finalized by the libgcj garbage collector, the python reference count to the StringReader instance is decremented causing it to be freed when it reaches 0.


In python 2.3, I've had problems with deadlocks around the PyGILState_Ensure() function. Libgcj's gc runs the finalization in a separate finalizer thread so it has to grab the python GIL before it can decrement the ref count.

You can try to remove the conditional compiles in finalizeObject() in PyLucene.i, YMMV.

It is highly recommended to upgrade to python 2.4 in order to use PyLucene.

Andi..
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to