At 03:05 PM 12/12/01 -0600, Ian Bicking wrote: >How do people debug situations when they get in infinite loops? >Normally I'd hit Ctrl-C and get the traceback from somewhere inside the >loop, but that doesn't work with multiple threads, and I have no idea >where in the process the loop is coming from. > > Ian
A while ago I ran into an infinite loop here, and I was able to track down where the infinite loop was coming from by modifying ThreadedAppServer so that it logged threading.currentThread().getName() and also some information about the request both before and after it actually processed the request. Then I examined the logfiles for which thread logged the start of a request, but never logged the end of the request. It won't help you narrow down the cause of the problem, but at least you'll be able to figure out which servlet is causing the loop if you don't know already. The place to put this extra logging is in ThreadedAppServer.py, in RequestHandler.handleRequest(). This could be a generally useful option to add to WebKit -- some setting like "DebugInfiniteLoops" which would turn on this logging. -- - Geoff Talvola [EMAIL PROTECTED] _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
