logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41214] Deadlock with RollingFileAppender
Date Wed, 22 Apr 2009 12:27:03 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=41214





--- Comment #26 from Vijay Anantharamu <vanantharamu@airvana.com>  2009-04-22 05:26:55
PST ---
Yet another case of deadlock we encountered, 
This is reported by the Java Threaddump, in the log4JAPi, causing the process
going down.
This problem seems to be very frequent as the load of the server is quite high.

The Thread dump indicates that the deadlock is caused by the
"RollingFileAppender". 

Please reply in here, do we have any solution boiled down on this issue.  

We are on Java Version : java version "1.5.0_11"
Log4J version : log4j-1.2.13
The platform is Sun solaris "SunOS XXX 5.10 Generic_127111-11 sun4u sparc
SUNW,Sun-Fire-V240"

The Deadloack threaddump encountered snippet 

Found one Java-level deadlock:
=============================
"AlarmCounter-Thread":
  waiting to lock monitor 0x00149d20 (object 0xa86e6988, a
java.io.PrintStream),
  which is held by "EventListenerThreadPool:Thread-1087"
"EventListenerThreadPool:Thread-1087":
  waiting to lock monitor 0x00149c90 (object 0xa6804bd8, a
org.apache.log4j.RollingFileAppender),
  which is held by "AlarmCounter-Thread"

Java stack information for the threads listed above:
===================================================
"AlarmCounter-Thread":
        at java.io.PrintStream.println(Unknown Source)
        - waiting to lock <0xa86e6988> (a java.io.PrintStream)
        at org.apache.log4j.helpers.LogLog.error(LogLog.java:142)
        at
org.apache.log4j.helpers.OnlyOnceErrorHandler.error(OnlyOnceErrorHandler.java:77)
        at
org.apache.log4j.helpers.OnlyOnceErrorHandler.error(OnlyOnceErrorHandler.java:67)
        at
org.apache.log4j.helpers.CountingQuietWriter.write(CountingQuietWriter.java:48)
        at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:301)
        at
org.apache.log4j.RollingFileAppender.subAppend(RollingFileAppender.java:234)
        at org.apache.log4j.WriterAppender.append(WriterAppender.java:159)
        at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
        - locked <0xa6804bd8> (a org.apache.log4j.RollingFileAppender)
        at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
        at org.apache.log4j.Category.callAppenders(Category.java:203)
        - locked <0xa680b0b8> (a org.apache.log4j.Logger)
        at org.apache.log4j.Category.forcedLog(Category.java:388)
        at org.apache.log4j.Category.error(Category.java:319)
        at com.airvana.faultServer.db.SQLUtil.executeQuery(SQLUtil.java:480)
        at com.airvana.faultServer.db.SQLUtil.executeQuery(SQLUtil.java:496)
        at
com.airvana.faultServer.db.AlarmCounter.initializeFromDb(AlarmCounter.java:71)
        - locked <0xa8710e60> (a com.airvana.faultServer.db.AlarmCounter)
        at com.airvana.faultServer.db.AlarmCounter.run(AlarmCounter.java:173)
        at java.lang.Thread.run(Unknown Source)
"EventListenerThreadPool:Thread-1087":
        at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:210)
        - waiting to lock <0xa6804bd8> (a org.apache.log4j.RollingFileAppender)
        at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
        at org.apache.log4j.Category.callAppenders(Category.java:203)
        - locked <0xa68047a8> (a org.apache.log4j.spi.RootLogger)
        at org.apache.log4j.Category.forcedLog(Category.java:388)
        at org.apache.log4j.Category.log(Category.java:835)
        at
com.airvana.faultServer.utils.LoggingOutputStream.flush(LoggingOutputStream.java:189)
        at java.io.PrintStream.write(Unknown Source)
        - locked <0xa86e6988> (a java.io.PrintStream)
        at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(Unknown Source)
        at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(Unknown Source)
        at sun.nio.cs.StreamEncoder.write(Unknown Source)
        - locked <0xa8809018> (a java.io.OutputStreamWriter)
        at java.io.OutputStreamWriter.write(Unknown Source)
        at java.io.BufferedWriter.flushBuffer(Unknown Source)
        - locked <0xa8809018> (a java.io.OutputStreamWriter)
        at java.io.BufferedWriter.write(Unknown Source)
        - locked <0xa8809018> (a java.io.OutputStreamWriter)
        at java.io.Writer.write(Unknown Source)
        at java.io.PrintStream.write(Unknown Source)
        - locked <0xa86e6988> (a java.io.PrintStream)
        at java.io.PrintStream.print(Unknown Source)
        at java.lang.ThreadGroup.uncaughtException(Unknown Source)
        at java.lang.ThreadGroup.uncaughtException(Unknown Source)
        at java.lang.Thread.dispatchUncaughtException(Unknown Source)

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


Mime
View raw message