--- forwarding ---

From: Edward N.Zalta <[EMAIL PROTECTED]>
Date: September 10, 2007 2:58:53 PM PDT
To: [email protected]
Subject: python2.4.3/PyLucene on FreeBSD crashes

We would like to install our PyLucene-based indexing/search scripts on our mirror site, which is running FreeBSD 6.1 on an i386 box. FreeBSD 6.1 came with gcc-3.4.4, but we upgraded it by compiling and installing gcc-3.4.6. Python2.4.3 successfully compiled/installed under gcc-3.4.6 and passed all its tests (excluding the ncurses test, since we didn't install that module). We then successfully compiled both PyLucene 2.0.0 and 2.0.0-8. Both install and load when Python invokes our scripts requiring PyLucene. But our script "indexer.py" crashes almost immediately after it starts to run (it reports "1693 entries found at /usr/local/stanford/htdocs/entries" and then dies with a segmentation fault). We have tried compiling PyLucene many different ways (adjusting its Makefile), all with the same result.
 Then gnu debugger gives the following information:

112> gdb python
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...

(gdb) run indexer.py
Starting program: /usr/local/bin/python indexer.py
warning: Unable to get location for thread creation breakpoint: generic error
[New LWP 100172]
[New Thread 0x814c000 (LWP 100139)]
1693 entries found at /usr/local/stanford/htdocs/entries

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x814c000 (LWP 100105)]
GC_register_finalizer_inner (obj=0x830b200, fn=0x28cda130 <call_finalizer>, cd=0x28adbc78, ofn=0x0, ocd=0x0, mp=0x28cdf09c <GC_null_finalize_mark_proc>)
   at /usr/local/src/gcc-3.4.6/boehm-gc/finalize.c:370
370             if (curr_fo -> fo_hidden_base == HIDE_POINTER(base)) {

(gdb) where
#0 GC_register_finalizer_inner (obj=0x830b200, fn=0x28cda130 <call_finalizer>, cd=0x28adbc78, ofn=0x0, ocd=0x0, mp=0x28cdf09c <GC_null_finalize_mark_proc>)
   at /usr/local/src/gcc-3.4.6/boehm-gc/finalize.c:370
#1 0x28cdf3ad in GC_register_finalizer_no_order (obj=0x830b200, fn=0x28cda130 <call_finalizer>, cd=0x28adbc78, ofn=0x0, ocd=0x0) at /usr/local/src/gcc-3.4.6/boehm-gc/finalize.c:510 #2 0x28cda169 in _Jv_RegisterFinalizer (object=0x830b200, meth=0x28adbc78 <_Jv_FinalizeObject(java::lang::Object*)>) at /usr/local/src/gcc-3.4.6/libjava/boehm.cc:443 #3 0x28aabe0d in _Jv_AllocObject (klass=0x28f0e120, size=120) at /usr/local/src/gcc-3.4.6/libjava/prims.cc:432 #4 0x28ada633 in _Jv_NewClass (name=0xf7cf4dff, superclass=0xf7cf4dff, loader=0xf7cf4dff) at Class.h:245 #5 0x28ada700 in _Jv_NewArrayClass (element=0x286de200, loader=0x0, array_vtable=0x0) at /usr/local/src/gcc-3.4.6/libjava/java/lang/natClassLoader.cc:592 #6 0x28aabfde in _Jv_NewObjectArray (count=1879, elementClass=0x286de200, init=0x0) at Class.h:359 #7 0x285395c6 in org::apache::lucene::index::DocumentWriter::sortPostingTable () from /usr/local/lib/python2.4/site-packages/_PyLucene.so #8 0x28538b4a in org::apache::lucene::index::DocumentWriter::addDocument () from /usr/local/lib/python2.4/site-packages/_PyLucene.so #9 0x28541e27 in org::apache::lucene::index::IndexWriter::addDocument () from /usr/local/lib/python2.4/site-packages/_PyLucene.so #10 0x28541da6 in org::apache::lucene::index::IndexWriter::addDocument () from /usr/local/lib/python2.4/site-packages/_PyLucene.so #11 0x286041f1 in j_indexwriter_addDocument () from /usr/local/lib/python2.4/site-packages/_PyLucene.so #12 0x080b75f1 in PyEval_EvalFrame (f=0x8195e0c) at ../Python-2.4.3/Python/ceval.c:3563 #13 0x080b7274 in PyEval_EvalFrame (f=0x81b380c) at ../Python-2.4.3/Python/ceval.c:3645 #14 0x080b7274 in PyEval_EvalFrame (f=0x819bc0c) at ../Python-2.4.3/Python/ceval.c:3645 #15 0x080b851e in PyEval_EvalCodeEx (co=0x82704a0, globals=0xf7cf4dff, locals=0x4, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python-2.4.3/Python/ceval.c:2736 #16 0x080b8686 in PyEval_EvalCode (co=0x82704a0, globals=0x816b824, locals=0x816b824) at ../Python-2.4.3/Python/ceval.c:484 #17 0x080dd1dc in PyRun_FileExFlags (fp=0x2832a2e0, filename=0xbfbfed1e "indexer.py", start=257, globals=0x816b824, locals=0x816b824, closeit=1, flags=0x82704a0)
   at ../Python-2.4.3/Python/pythonrun.c:1265
#18 0x080ddabe in PyRun_SimpleFileExFlags (fp=0x2832a2e0, filename=0xbfbfed1e "indexer.py", closeit=1, flags=0xbfbfeae8) at ../Python-2.4.3/Python/pythonrun.c:860 #19 0x080559a8 in Py_Main (argc=1, argv=0xbfbfec1c) at ../Python-2.4.3/Modules/main.c:493 #20 0x08054ff5 in main (argc=2, argv=0xbfbfec1c) at ../Python-2.4.3/Modules/python.c:23

Does anyone know what is happening here?
Does anyone have any success with Python/PyLucene on FreeBSD? We saw one post at

http://www.mail-archive.com/[email protected]/msg01365.html

but we haven't received a response to our email enquiry.

Thanks very much for any help you can give us.
Yours,
Ed
-------------------------------------------------------
Edward N. Zalta    http://mally.stanford.edu/zalta.html
Senior Research Scholar
CSLI/Cordura Hall              [EMAIL PROTECTED]
Stanford University                    ph. 650-723-0488
Stanford, CA 94305-4115                fx. 650-725-2166
-------------------------------------------------------
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to