[pylucene-dev] Segmentation fault in Linux when using thread

Andi Vajda vajda at osafoundation.org
Thu Dec 30 19:27:17 PST 2004


Yes, this is a known bug, bug 2291.
With a 2.6 kernel, the process gets killed really fast when using threads.

> What can you do when you got segmentation fault?
Bring up GDB and try to figure it out.

Also, the QueryParser seems to be causing problems, at least on Windows.
For the test_PyLuceneThread.py unit test, using TermQuery(Term("field", word)) 
should eliminate QueryParser possibly related weirdness.

Scanning the gcc java mailing list I saw something having to do with threads 
on Linux with a 2.6 kernel but I couldn't get it to crash or die with a pure 
java gcj-compiled program using lots of threads, only with PyLucene.

So, the bad news is: PyLucene threading is broken on Linux, at least with a 
2.6 kernel and I have no idea why. Help would be much appreciated.

Andi..

On Thu, 30 Dec 2004, aurora wrote:

> I ran into many issues when using thread in Linux.
>
> The test_PyLuceneThread.py test case seems to stuck in deadlock in this line:
>
>                query = QueryParser.parse(word, "field", StandardAnalyzer())
>
> If I make the number low, like 3 thread x 5 searches, that works OK. I
> have added some delay to make sure there is some interleaving happens.
> But when I make the number higher, like 3 thread x 20 searches, it
> starts to lock up.
>
> All other test cases are passed.
>
> My application fare a lot worse. Any thread wrapped in PyLuceneThread
> causes Segmentation fault as soon as it starts. If I just use
> threading.Thread it will start but will throw Segmentation fault on
> the first Lucene call. Putting the same code in the main thread will
> work without problem.
>
> What can you do when you got segmentation fault?
>
> These are the software I use
>
> Python 2.3.4
> PyLucene 0.9.2
> Redhat 9.0
> _______________________________________________
> pylucene-dev mailing list
> pylucene-dev at osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
>


More information about the pylucene-dev mailing list