tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Slavik Lazor" <sl...@i-hypergrid.com>
Subject tomcat stuck
Date Sun, 04 Jul 2004 20:37:41 GMT
HI,

I worked with tomcat 4.1.12 and I've got the following situation.


Method org.apache.tomcat.util.threads.ThreadPool.ControlRunnable.run()
...
} catch(Throwable t) {
	loghelper.log("Caught exception executing " + toRun.toString() + ",
terminating thread", t);
	loghelper.flush();
	shouldTerminate = true;
      shouldRun = false;
	p.notifyThreadEnd(this);
} finally {
	if(shouldRun) {
		shouldRun = false;
		p.returnController(this);
	}
}


If loghelper.log will thrown an exception, this is possible if we add custom
handler to default logger, thread won't be released from pool and the
notification won't be performed. I have fixed the custom handler in my code
but I have another situation which makes is making the same situation.

If everything is OK there is always a thread which invokes socketAccept
method of the http serverSocket. But there are situation when this thread
dies and tomcat is stuck. Even if it dies there should be a stack trace of
the exception, logged in java.lang.ThreadGroup.uncaughtException, that
caused the death.

...
	if (!(e instanceof ThreadDeath)) {
	    e.printStackTrace(System.err);
	}
...
But there's none.
So I am wandering, where else can be that socket losing code.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message