logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James A. N. Stauffer" <stauffer.ja...@gmail.com>
Subject Re: Log4j deadlock
Date Mon, 24 Sep 2007 13:59:01 GMT
Does this provide any clues?  Do you have suggestions on what I should do?

Java stack information for the threads listed above:
===================================================
"ConnectorThread jdbc:weblogic:mssqlserver4:webformslogs@webarc1:1433":
 at org.apache.log4j.Category.callAppenders(Category.java:185)
 - waiting to lock <0xa63067d0> (a org.apache.log4j.spi.RootCategory)
 at org.apache.log4j.Category.forcedLog(Category.java:372)
 at org.apache.log4j.Category.info(Category.java:674)
 at sps.webec.sql.ConnectionBroker.connect(ConnectionBroker.java:260)
 at sps.webec.sql.ConnectionBroker.createFree(ConnectionBroker.java:232)
 - locked <0xa6305750> (a sps.webec.sql.ConnectionBroker)
 at sps.webec.sql.ConnectionBroker.access$200(ConnectionBroker.java:23)
 at sps.webec.sql.ConnectionBroker$ConnectorThread.run(ConnectionBroker.java:346)
"main":
 at sps.webec.sql.ConnectionBroker.getConnectionAttributes(ConnectionBroker.java:62)
 - waiting to lock <0xa6305750> (a sps.webec.sql.ConnectionBroker)
 at sps.webec.sql.DatabaseManager.getConnectionAttributes(DatabaseManager.java:490)
 at sps.webec.sql.DatabaseManager.executeInsert(DatabaseManager.java:227)
 at sps.webec.sql.DatabaseManager.execute(DatabaseManager.java:64)
 at sps.webec.server.util.DBAppender.append(DBAppender.java:65)
 at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
 - locked <0xa618b640> (a sps.webec.server.util.DBAppender)
 at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
 at org.apache.log4j.Category.callAppenders(Category.java:187)
 - locked <0xa63067d0> (a org.apache.log4j.spi.RootCategory)
 at org.apache.log4j.Category.forcedLog(Category.java:372)
 at org.apache.log4j.Category.error(Category.java:303)
 at sps.webec.server.util.Log.LogException(Log.java:124)
 at sps.webec.engine.Logger.logException(Logger.java:155)
 at sps.webec.engine.FEDSException.logException(FEDSException.java:197)
 at sps.webec.engine.Engine.createExceptionLog(Engine.java:637)
 at sps.webec.engine.Engine.handleFEDSException(Engine.java:679)
 at sps.webec.engine.Engine.receive(Engine.java:990)
 at sps.webec.engine.Engine.processReceive(Engine.java:409)
 at sps.webec.engine.Engine.processArguments(Engine.java:247)
 at sps.webec.engine.Engine.start(Engine.java:143)
 at sps.webec.engine.Engine.main(Engine.java:76)


On 9/21/07, Curt Arnold <carnold@apache.org> wrote:
>
> On Sep 21, 2007, at 3:18 PM, James A. N. Stauffer wrote:
>
> > We don't redirect System.out or System.err.  Both stack traces showed
> > that both threads were calling logger.debug or logger.info.
>
> Calling stacks would be very helpful to try to analyze the problem.
> The most obvious way to get a deadlock where one of the monitors is
> RootLogger or RootCategory would be when a log request is made
> (possibly indirectly) in the course of processing a log request.
>
> > On Sep 21, 2007, at 10:18 AM, James A. N. Stauffer wrote:
> >
> >
> >> After years of using log4j I also encountered this.  Is it a freak,
> >> rare occurance or is there a cause that can be addressed?
>
> Finer grain and provably safe concurrency is the primary design
> objective for log4j 2.0 and can not be achieved without significant
> implementation and API changes (hence why it has to be part of log4j
> 2.0 and not a 1.x).  The internals of log4j 1.x are not thread-safe
> but depend on coarse-grained locks to prevent more than more one log
> request to be processed at a time.  The coarse grained locks
> significantly impact performance on multi-core machines and leave the
> potential for these types of deadlocks.  Individual problems can be
> analyzed and fixed or worked around, but eliminating all potential
> problems requires a near complete rework.
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
James A. N. Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

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


Mime
View raw message