On Sat, 2002-05-18 at 10:30, Geoffrey Talvola wrote: > On Thursday May 09, 2002 08:37 pm, Matt Feifarek wrote: > > I'm having trouble stopping (and therefore restarting) webkit on my debian > > box. > > > > I'm running python2.2, and the release webware 0.7. > > > > Here's what happens if I run the AppServer manually: > > > > Shutdown Called Thu May 9 20:23:03 2002 > > ThreadedAppServer: Shutting Down > > Shutting down the AppServer > > Application is Shutting Down > > Application has been succesfully shutdown. > > AppServer has been shutdown > > Unhandled exception in thread: > > Traceback (most recent call last): > > File "/usr/lib/python2.2/threading.py", line 423, in __bootstrap > > self.__stop() > > File "/usr/lib/python2.2/threading.py", line 432, in __stop > > self.__block.notifyAll() > > File "/usr/lib/python2.2/threading.py", line 242, in notifyAll > > self.notify(len(self.__waiters)) > > File "/usr/lib/python2.2/threading.py", line 224, in notify > > me = currentThread() > > TypeError: 'NoneType' object is not callable > > I also see this traceback occasionally when I'm running WebKit in a shell on > Linux and stop it by pressing Ctrl-C. It only happens about 10% of the time. > I don't know why it happens. > > Matt, it might be worth posting to comp.lang.python and asking if there's > some reason why this message would appear. Maybe someone familiar with > Python's threading module can answer.
While doing some other work on Webware today I had this error, too, and a google search turned up this thread on the mailing list. I was able to reproduce this traceback fairly consistently, and so it was possible to track down the cause (mainly by enabling verbose mode in threading.py, and then poring through the output, keeping track of all the thread starts/stops) and fix it. What is happening is that the python interpreter is exiting before the task manager thread (scheduler) has completely exited. Thus, when the task manager thread tries to call currentThread() it gets an error because this function no longer exists. The interpreter is exiting because the task manager runs in daemon mode and is the only thread remaining at this point (The python docs do indeed say that the program will exit when no non-daemon threads exist). One solution would be not to run this thread in daemon mode. I'm not sure if that has any other ramifications, though, so I didn't take that route. Instead, I simply do a join() on the scheduler thread in Scheduler.stop(), so that we can be sure it is completely finished before we continue the shutdown. I've just committed this to CVS. -- Jason D. Hildebrand [EMAIL PROTECTED] ------------------------------------------------------- This sf.net emial is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
