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 2005/12/01 23:51:23 UTC

DO NOT REPLY [Bug 37747] New: - Deadlock between SMTPAppender and RootLogger

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37747>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37747

           Summary: Deadlock between SMTPAppender and RootLogger
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: Appender
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: dave@daveoxley.co.uk


I am pretty shocked to have found this as we have been using 1.2.8 since it was
released, but one of our testers can recreate this problem at will!! Here's the
thread dump showing the deadlock:

jvm 1    | Found one Java-level deadlock:
jvm 1    | =============================
jvm 1    | "Thread-189":
jvm 1    |   waiting to lock monitor 0x286fa7b4 (object 0x06c2b8d8, a
org.apache.log4j.net.SMTPAppender),
jvm 1    |   which is held by "Thread-98"
jvm 1    | "Thread-98":
jvm 1    |   waiting to lock monitor 0x00b3ebf4 (object 0x06c57bc0, a
org.apache.log4j.spi.RootLogger),
jvm 1    |   which is held by "Thread-189"
jvm 1    | 
jvm 1    | Java stack information for the threads listed above:
jvm 1    | ===================================================
jvm 1    | "Thread-189":
jvm 1    | 	at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:210)
jvm 1    | 	- waiting to lock <0x06c2b8d8> (a org.apache.log4j.net.SMTPAppender)
jvm 1    | 	at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
jvm 1    | 	at org.apache.log4j.Category.callAppenders(Category.java:203)
jvm 1    | 	- locked <0x06c57bc0> (a org.apache.log4j.spi.RootLogger)
jvm 1    | 	at org.apache.log4j.Category.forcedLog(Category.java:388)
jvm 1    | 	at org.apache.log4j.Category.info(Category.java:663)
jvm 1    | 	at
uk.co.webessence.kernel.ApplicationLockManager.addLock(ApplicationLockManager.java:81)
jvm 1    | 	at
uk.co.webessence.kernel.database.LockHolder.getLocks(LockHolder.java:152)
jvm 1    | 	- locked <0x08df4278> (a
net.staffplanner.kernel.taexceptions.processing.ProcessRawEvent)
jvm 1    | 	at
uk.co.webessence.kernel.database.LockHolder._getAllRequiredLocks(LockHolder.java:86)
jvm 1    | 	- locked <0x08df4278> (a
net.staffplanner.kernel.taexceptions.processing.ProcessRawEvent)
jvm 1    | 	at
uk.co.webessence.kernel.database.LockHolder.getAllRequiredLocks(LockHolder.java:75)
jvm 1    | 	- locked <0x08df4278> (a
net.staffplanner.kernel.taexceptions.processing.ProcessRawEvent)
jvm 1    | 	at
uk.co.webessence.kernel.BackgroundProcess.getAllRequiredLocks(BackgroundProcess.java:173)
jvm 1    | 	- locked <0x08df4278> (a
net.staffplanner.kernel.taexceptions.processing.ProcessRawEvent)
jvm 1    | 	at
uk.co.webessence.kernel.BackgroundProcess.tryGetAllRequiredLocks(BackgroundProcess.java:234)
jvm 1    | 	at
uk.co.webessence.kernel.BackgroundProcess.waitForAllRequiredLocks(BackgroundProcess.java:212)
jvm 1    | 	at
net.staffplanner.kernel.taexceptions.processing.ProcessRawEvent.processSwipe(ProcessRawEvent.java:156)
jvm 1    | 	at
net.staffplanner.kernel.taexceptions.processing.ProcessRawEvent.doRun(ProcessRawEvent.java:74)
jvm 1    | 	at
uk.co.webessence.kernel.BackgroundProcess.run(BackgroundProcess.java:96)
jvm 1    | 	at java.lang.Thread.run(Thread.java:595)
jvm 1    | "Thread-98":
jvm 1    | 	at org.apache.log4j.Category.callAppenders(Category.java:201)
jvm 1    | 	- waiting to lock <0x06c57bc0> (a org.apache.log4j.spi.RootLogger)
jvm 1    | 	at org.apache.log4j.Category.forcedLog(Category.java:388)
jvm 1    | 	at org.apache.log4j.Category.fatal(Category.java:362)
jvm 1    | 	at
uk.co.webessence.utils.CriticalException.<init>(CriticalException.java:102)
jvm 1    | 	- locked <0x06c2b8d8> (a org.apache.log4j.net.SMTPAppender)
jvm 1    | 	at
uk.co.webessence.utils.DatabaseException.<init>(DatabaseException.java:49)
jvm 1    | 	at
uk.co.webessence.kernel.persistence.PersistenceHandler.handleSQLException(PersistenceHandler.java:696)
jvm 1    | 	at
uk.co.webessence.kernel.persistence.PersistenceHandler.insert(PersistenceHandler.java:298)
jvm 1    | 	at
uk.co.webessence.kernel.RecordServer.handlePersistentAdd(RecordServer.java:2012)
jvm 1    | 	at
net.staffplanner.kernel.taexceptions.TelfRecordServer.handlePersistentAdd(TelfRecordServer.java:86)
jvm 1    | 	at
net.staffplanner.kernel.taexceptions.TaExceptionLogServer.handlePersistentAdd(TaExceptionLogServer.java:82)
jvm 1    | 	at uk.co.webessence.kernel.RecordObject.flush(RecordObject.java:2393)
jvm 1    | 	at
uk.co.webessence.kernel.database.UserTransactionCache.commit(UserTransactionCache.java:247)
jvm 1    | 	at
uk.co.webessence.kernel.database.DatabaseTransaction.commit(DatabaseTransaction.java:137)
jvm 1    | 	at
net.staffplanner.kernel.taexceptions.processing.processSwipedEvent.matchRoundRecreateExceptionLogs(processSwipedEvent.java:203)
jvm 1    | 	at
net.staffplanner.kernel.taexceptions.processing.processSwipedEvent.doRun(processSwipedEvent.java:76)
jvm 1    | 	at
uk.co.webessence.kernel.BackgroundProcess.start(BackgroundProcess.java:80)
jvm 1    | 	at
uk.co.webessence.kernel.BackgroundProcess.start(BackgroundProcess.java:72)
jvm 1    | 	at
net.staffplanner.kernel.taexceptions.processing.ProcessRawEvent.doRun(ProcessRawEvent.java:76)
jvm 1    | 	at
uk.co.webessence.kernel.BackgroundProcess.run(BackgroundProcess.java:96)
jvm 1    | 	at java.lang.Thread.run(Thread.java:595)
jvm 1    | 
jvm 1    | Found 1 deadlock.
jvm 1    |

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

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