You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2008/09/30 11:31:25 UTC

DO NOT REPLY [Bug 45915] New: DeadLock occured in AsyncAppender

https://issues.apache.org/bugzilla/show_bug.cgi?id=45915

           Summary: DeadLock occured in AsyncAppender
           Product: Log4j
           Version: 1.2
          Platform: HP
        OS/Version: HP-UX
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Appender
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: keiichi.fujito@hp.com


Unfortunately, our system which uses log4j 1.2.15. encountered the same bug
that was reported in Bug#: 38137 Comment #16. 
This bug seems not to be discussed for the final fix for several months… Is
this bug going to fix in near future?

Here is the thread dump:

Found one Java-level deadlock:
=============================
"Thread-1":
  waiting to lock monitor 6000000000587e40 (object 9fffffffcb409a68, a
java.util.ArrayList),
  which is held by "pool-1-thread-41460"
"pool-1-thread-41460":
  waiting to lock monitor 6000000000588230 (object 9fffffffcb4d9b28, a
org.apache.log4j.spi.RootLogger),
  which is held by "Thread-1"

Java stack information for the threads listed above:
===================================================
"Thread-1":
        at org.apache.log4j.AsyncAppender.append(AsyncAppender.java:163)
        - waiting to lock <9fffffffcb409a68> (a java.util.ArrayList)
        at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
        - locked <9fffffffcb409ac0> (a org.apache.log4j.AsyncAppender)
        at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
        at org.apache.log4j.Category.callAppenders(Category.java:206)
        - locked <9fffffffcb4d9b28> (a org.apache.log4j.spi.RootLogger)
        at org.apache.log4j.Category.forcedLog(Category.java:391)
        at org.apache.log4j.Category.log(Category.java:856)
        at kid.bs.common.log.KidLogger.log(KidLogger.java:429)
        at kid.bs.common.log.KidLogger.log(KidLogger.java:351)
        at kid.bs.job.KidExecuter.run(KidExecuter.java:1128)
        at java.lang.Thread.run(Thread.java:595)
"pool-1-thread-41460":
        at org.apache.log4j.Category.callAppenders(Category.java:204)
        - waiting to lock <9fffffffcb4d9b28> (a
org.apache.log4j.spi.RootLogger)
        at org.apache.log4j.Category.forcedLog(Category.java:391)
        at org.apache.log4j.Category.log(Category.java:856)
        at kid.bs.common.log.KidLogger.info(KidLogger.java:142)
        at kid.sr.batch.LoadingDaily.action(LoadingDaily.java:2111)
        - locked <9fffffffcbee6e28> (a java.lang.String)
        at
kid.bs.job.thread.KidActionThread.newActionClass(KidActionThread.java:429)
        at
kid.bs.job.thread.KidActionThread.jobExecute(KidActionThread.java:149)
        at kid.bs.job.thread.KidActionThread.run(KidActionThread.java:83)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Thread.java:595)

Found 1 deadlock.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 45915] DeadLock occured in AsyncAppender

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45915


Roger <ro...@intel.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger.wang@intel.com




--- Comment #1 from Roger <ro...@intel.com>  2008-11-17 21:41:51 PST ---
I ran into a similar problem, but in the last I found that I was logging inside
the async appender's dispatch thread. May this is helpful for you.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 45915] DeadLock occured in AsyncAppender

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45915


Curt Arnold <ca...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




--- Comment #3 from Curt Arnold <ca...@apache.org>  2009-01-13 12:34:31 PST ---
Logging requests within appenders, layouts, etc are not supported.  Supporting
it is a design requirement for log4j 2
(https://issues.apache.org/jira/browse/LOG4J2-8).  Marking this as WONTFIX.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 45915] DeadLock occured in AsyncAppender

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45915





--- Comment #2 from QualityChecker <qu...@free.fr>  2008-11-18 00:07:03 PST ---
It seems that a recursive call is made in KidLogger.log :

        at kid.bs.common.log.KidLogger.log(KidLogger.java:429)
        at kid.bs.common.log.KidLogger.log(KidLogger.java:351)

Is it on purpose ? A bit dangerous in a logging method.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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