[pylucene-dev] Re: question about PyLucene-2.0rc1-7

Andi Vajda vajda at osafoundation.org
Wed May 17 09:20:07 PDT 2006


On Wed, 17 May 2006, jian hu wrote:

>> It looks like line 9 is where the first call to PyLucene is made. Is the 
>> thread it's running in a PyLucene.PythonThread ?

> I run the code under apache-mpm-prefork,and the problem is
> the code working fine under mod_python with PyLucene-1.0.1
> but I run with PyLucene-2.0rc1-7 the execution hangs...
>
> Any ideas for how to make this work?

I have no idea how to make this work. You might want to ask the 
pylucene-dev at osafoundation.org mailing list as others have done this before.

Basically, to make this work, you must ensure that the thread PyLucene (or 
more precisely, any libgcj) code is running in is initialized by libgcj, ie, a 
an instance of PyLucene.PythonThread. This is a limitation of libgcj's garbage 
collector that may be lifted in the distant future: currently, it is not 
possible to tell libgcj's garbage collector about a thread after it was 
created, initialized and started and that causes any libgcj memory allocation 
operation to fail, hang or crash the process.

Once you've verified that this is the case, ie, that threading.currentThread() 
is an instance of PyLucene.PythonThread, if you still have a problem the bug 
is elsewhere.

Andi..


More information about the pylucene-dev mailing list