[pylucene-dev] finalizing the deadly embrace
vajda at osafoundation.org
Mon Jan 21 11:19:01 PST 2008
On Mon, 21 Jan 2008, anurag uniyal wrote:
> This still fails *here* after removing __del__
> I did rebuild JCC thats why now custom analyzer/parser works without
> test_PythonDirectory.py is also passing.
When run with -loop ?
> src : trunk rev 381
> lucene.VERSION = 2.2.0-613493
> Python 2.4.3
> Ubuntu 6.06.1 LTS
> java 1.5.0_06-b05
Ok, I have such a system available to me, I'm going to give your test a try
Still, could you in the meantime try to find out what is leaking ?
If Java is running out of memory, one way to track down what is causing it
is to look at the global refs PyLucene keeps to Java objects.
First, after each test cycle, print out the size of env._dumpRefs().
env is the return value from initVM()
if that size is growing, next thing is to get the classes of these objects:
refs = sorted(env._dumpRefs(classes=True).items(),
key=lambda x: x, reverse=True)
This would print out the classes of the 5 most important Java object leaks
via global refs and their counts. (the code above is used in
test/test_Sort.py, for example).
More information about the pylucene-dev