On 31. aug. 2005, at 19.02, N. C. Deepak Ramesh wrote:

Hi,

> The error message that I get when the python process exits is as follows :
>
> "Fatal Error in GC : Collecting from unknown thread."
>
> If it is possible could someone confirm whether my assumption is correct.

Yes, that is a threading issue most likely due to Java usage on a thread it
didn't create. Normally, Java usage on such a thread should cause an instant
crash as soon as it tries to allocate memory. 

Whatever you do with threads, make sure that Java's Thread class was used to
create the thread first before usage. This means that you can only create more
threads from either the main thread or from such Java threads.


Guessed as much. Based on my reading of the earlier mails I was talking about (Cherrypy and Pylucene 1.0) I did some work with replacing threading.Thread with PyLucene.PythonThread inside the CHerrypy wsgi server. The site as such works just as usual for all other functions and thus I think whatever work I did was ok. However, the gc errors still continue.

I was hoping Rune (who initiated the earlier mails) could help me out with some further insights since he seemed to have a similar issue.

Anybody else have any sucess with Cherrypy and Pylucene?


Hi, 
I, I'm sorry to say, gave up on PyLucene.PythonThread.

Basically, the only thing I did (with cherrypy 2.1(svn 525)) was to pass a custom serverClass to cherrypy.server.start()  (The WorkerThread in my derived _cherrypywsgiserver inherits from PyLucene.PythonThread in stead of threading.Thread).

On Linux this sort of works, sometimes...but never for long.
Un-scientifically speaking - most times when I start the server I get "GC Warning: Out of Memory!  Returning NIL!", but sometimes the server starts without errors. When the server is started it will report "socket.error: (11, 'Resource temporarily unavailable')" on any attempt of executing a PyLucene enabled method.
The funny thing is that the exact same code works 100% on Mac OS X (10.4.2). Unfortunately for me my servers are running Linux.

regards
/rune


 "In any project that is multi-threaded, most bugs will come from threading issues. 

This is regardless of programming language -- it's a deep, as yet ununderstood property of threads." 

-- Guido van Rossum






_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to