[pylucene-dev] PyLucene/JCC segfaults
Andi Vajda
vajda at osafoundation.org
Fri Sep 28 08:27:44 PDT 2007
On Fri, 28 Sep 2007, Jarek Zgoda wrote:
> If I try updating an index, the PyLucene segfaults. The same code worked
> for PyLucene/GCJ, the only modifications are related to initVM and
> attachCurrentThread, needed when using new PyLucene (the thread class is
> now usual threading.Thread). JVM wrote some trace file, but I just don't
> understand it (my knowledge of Java is very basic).
>
> How do I debug such problem?
If you're not getting any stacktrace from Python or Java, to debug a hard
crash, first build PyLucene with debug symbols: make DEBUG=1 compile install.
Then run the process in gdb.
I don't know how complicated your PyLucene code is, but there are differences
between PyLucene with GCJ and PyLucene with JCC in how the Lucene APIs are
wrapped. I had to change quite a few tests and samples. You might have to
make changes to your code as well. Some of these differences are listed in
the top README file.
Also, you could be running out of memory. The defaults are not that large. If
you're indexing lots of data, you might have to start with larger Java memory
limits. These are controlled with parameters to the initVM() function
described in jcc's README file.
Andi..
More information about the pylucene-dev
mailing list