On Mon, 26 Jan 2009, Christian Heimes wrote:

> JCC and PyLucene are causing a segfault on a busy machine several times
> a day. Using a debug build of Python and PyLucene I was able to narrow
> the cause of the bug down. So far I've examined six core dumps. The seg
> fault is always caused by the deallocation of an IndexSearcher instance.
>
> #7  <signal handler called>
> #8  0xb162fb05 in JNIEnv_::DeleteGlobalRef (this=0x0, gref=0x95bf2e0)
>    at /opt/vlsdbg/lib/jdk1.6/include/jni.h:830
> #9  0xb162f1bf in JCCEnv::deleteGlobalRef (this=0xb20a6d78,
> obj=0x95bf2e0, id=30740434)
>    at build/_lucene/JCCEnv.cpp:204
> #10 0xb139fa20 in JObject::operator= (this=0x51c8cc08, o...@0x68dfd0a4)
>    at JCC-2.1-py2.5-linux-i686.egg/jcc/sources/JObject.h:75
> #11 0xb160dbe9 in t_JObject_dealloc (self=0x51c8cbf8) at
> build/_lucene/JObject.cpp:100
> #12 0xb7ea7aaf in _Py_Dealloc (op=0x51c8cbf8) at Objects/object.c:1933

Looking at your stacktrace, it would seem that JNIEnv is NULL (this=0x0).
I recently fixed a bug in JCC with a NULL JNIEnv caused by a line of code 
being emitted too late in an extension method. You would hit this bug if you 
wrote Python extensions of some Lucene Java classes as is possible with JCC.

If you could send me a more complete stacktrace, up to the method in your 
code or PyLucene, and its corresponding source code I could confirm this.

You could also try out the fix I did (which fixed the bug I had) by getting 
the latest JCC sources from PyLucene's new home at Apache:
     http://svn.apache.org/repos/asf/lucene/pylucene/trunk/
and rebuilding your libraries. This was a bug in the C++ code generator.

Please, let me know if this fixes your problem as well.
Thanks !

Andi..

>
> (gdb) print op->ob_type->tp_name
> $4 = 0xb1647152 "IndexSearcher"
>
> Python: 2.5.2
> JCC: 2.1
> PyLucene: 2.4.0.2
> Java: Sun Java 1.6.0 update10
> gcc version 4.1.2 20070115 (SUSE Linux)
>
> Christian
> _______________________________________________
> pylucene-dev mailing list
> pylucene-dev@osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
>
_______________________________________________
pylucene-dev mailing list
pylucene-dev@osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to