You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Harper, Allen (AHARPER)" <AH...@arinc.com> on 2005/03/04 19:32:35 UTC

Appender, ErrorHanlder fail over deadlock

I have found and proved that Log4J does have a deadlock situation in
it's appender failover logic. 

In a nutshell heres whats happening. The entire instance of the logger
is syncronized. (Actually the syncronized object is the Category object
from which the Logger is derived.) A caller makes a log call
Log.xxxx(), in this case the JDBC appender. If the database is down the
DB call throws which in turn calls the errorHandler, which in turn calls
back into the Logger (deadlock) to swap out the primary and backup
appenders.

I guess what I'm going to do is to bust out another thread for the sole
purpose of handling failover logic.

Comments, input?

Al Harper


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org