[
http://jira.jboss.com/jira/browse/JBAS-4514?page=comments#action_12367632 ]
chris effenberger commented on JBAS-4514:
-----------------------------------------
Ceki hasnĀ“t implemented the fix (
http://issues.apache.org/bugzilla/attachment.cgi?id=9635)
in 1.2.8.
you find the bug under:
http://issues.apache.org/bugzilla/show_bug.cgi?id=24159
You can see this in the source of Category.java (or in the decompile code).
First in 1.3.alpha-8 he has a fixed version of Category.java with the helpers class
"ReaderWriterLock.java".
with the log4j1.2.8 in jboss-3.2.5 we have the following deadlock:
Found one Java-level deadlock:
=============================
"org.jboss.jms.asf.StdServerSessionPool$DefaultThreadFactory@19dcf69 Thread Pool
Worker-3":
waiting to lock monitor 0x761f8754 (object 0x483c6e30, a
org.jboss.logging.appender.DailyRollingFileAppender),
which is held by
"org.jboss.jms.asf.StdServerSessionPool$DefaultThreadFactory@8786e7 Thread Pool
Worker-18"
"org.jboss.jms.asf.StdServerSessionPool$DefaultThreadFactory@8786e7 Thread Pool
Worker-18":
waiting to lock monitor 0x0950654c (object 0x4824a390, a
org.apache.log4j.spi.RootCategory),
which is held by
"org.jboss.jms.asf.StdServerSessionPool$DefaultThreadFactory@19dcf69 Thread Pool
Worker-3"
Java stack information for the threads listed above:
===================================================
"org.jboss.jms.asf.StdServerSessionPool$DefaultThreadFactory@19dcf69 Thread Pool
Worker-3":
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:201)
- waiting to lock <0x483c6e30> (a
org.jboss.logging.appender.DailyRollingFileAppender)
at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
at org.apache.log4j.Category.callAppenders(Category.java:187)
- locked <0x4824a390> (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
ourcompany.sst.kks.server.KKSMessageDrivenBean.onMessage(KKSMessageDrivenBean.java:145)
at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:458)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at
org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)
at
org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:32)
at
org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
at
org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.AbstractInterceptor.invoke(AbstractInterceptor.java:94)
at
ourcompany.interceptor.dhcounter.ourcompanyCounterInterceptor.invoke(DHCounterInterceptor.java:64)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at
org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:372)
at org.jboss.ejb.Container.invoke(Container.java:723)
at
org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:914)
at
org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1208)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:276)
at
org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:871)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:159)
at org.jboss.mq.SpySession.run(SpySession.java:347)
- locked <0x4ad0e130> (a java.util.LinkedList)
at org.jboss.jms.asf.StdServerSession.run0(StdServerSession.java:200)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:534)
"org.jboss.jms.asf.StdServerSessionPool$DefaultThreadFactory@8786e7 Thread Pool
Worker-18":
at org.apache.log4j.Category.callAppenders(Category.java:185)
- waiting to lock <0x4824a390> (a org.apache.log4j.spi.RootCategory)
at org.apache.log4j.Category.forcedLog(Category.java:372)
at org.apache.log4j.Category.log(Category.java:864)
at org.jboss.logging.Log4jLoggerPlugin.debug(Log4jLoggerPlugin.java:128)
at org.jboss.logging.Logger.debug(Logger.java:142)
at org.jboss.util.NestedThrowable$Util.getBoolean(NestedThrowable.java:128)
at org.jboss.util.NestedThrowable.<clinit>(NestedThrowable.java:39)
at
org.jboss.tm.JBossRollbackException.printStackTrace(JBossRollbackException.java:102)
at
org.apache.log4j.spi.ThrowableInformation.getThrowableStrRep(ThrowableInformation.java:50)
at org.apache.log4j.spi.LoggingEvent.getThrowableStrRep(LoggingEvent.java:333)
at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:295)
at
org.apache.log4j.DailyRollingFileAppender.subAppend(DailyRollingFileAppender.java:349)
at org.apache.log4j.WriterAppender.append(WriterAppender.java:150)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
- locked <0x483c6e30> (a
org.jboss.logging.appender.DailyRollingFileAppender)
at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
at org.apache.log4j.Category.callAppenders(Category.java:187)
- locked <0x483daeb8> (a org.apache.log4j.Logger)
at org.apache.log4j.Category.forcedLog(Category.java:372)
at org.apache.log4j.Category.log(Category.java:864)
at org.jboss.logging.Log4jLoggerPlugin.error(Log4jLoggerPlugin.java:205)
at org.jboss.logging.Logger.error(Logger.java:216)
at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:290)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
at org.jboss.ejb.plugins.AbstractInterceptor.invoke(AbstractInterceptor.java:94)
at
ourcompany.interceptor.dhcounter.ourcompanyCounterInterceptor.invoke(DHCounterInterceptor.java:64)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at
org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
at org.jboss.ejb.Container.invoke(Container.java:723)
at
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:359)
at
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)
at $Proxy410.updateTransport(Unknown Source)
at
ourcompany.module.anlagenprogramm.AsyncAPHandlerMessageDrivenBean.updateTransporte(AsyncAPHandlerMessageDrivenBean.java:208)
at
ourcompany.module.anlagenprogramm.AsyncAPHandlerMessageDrivenBean.handle(AsyncAPHandlerMessageDrivenBean.java:137)
at
ourcompany.module.anlagenprogramm.AsyncAPHandlerMessageDrivenBean.onMessage(AsyncAPHandlerMessageDrivenBean.java:89)
at sun.reflect.GeneratedMethodAccessor437.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:458)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at
org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)
at
org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:32)
at
org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
at
org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.AbstractInterceptor.invoke(AbstractInterceptor.java:94)
at
ourcompanyt.interceptor.dhcounter.ourcompanyCounterInterceptor.invoke(DHCounterInterceptor.java:64)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at
org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:372)
at org.jboss.ejb.Container.invoke(Container.java:723)
at
org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:914)
at
org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1208)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:276)
at
org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:871)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:159)
at org.jboss.mq.SpySession.run(SpySession.java:347)
- locked <0x4c924448> (a java.util.LinkedList)
at org.jboss.jms.asf.StdServerSession.run0(StdServerSession.java:200)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:534)
Found 1 deadlock.
-----------------------
we have jboss-3.2.5 and the jdk1.4
so we have backported the new fix with the "ReaderWriterLock.java" helper class
to our own version of log4j1.2.8. I hope this works better now.
CLONE -Deadlock when logging trace
----------------------------------
Key: JBAS-4514
URL:
http://jira.jboss.com/jira/browse/JBAS-4514
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Reporter: chris effenberger
Assigned To: Scott M Stark
SourceForge Submitter: genman .
This was caused when trace was enabled. I imagine it
was caused by the classloader trying to load a class
while it was being rendered (?) to disk. Probably not
a big issue, unless trace-logging is enabled.
Java stack information for the threads listed above:
===================================================
"SMPP-TIMER-0":
at
com.logica.smpp.util.ByteBuffer.getHexDump(ByteBuffer.java:379)
at
com.logica.smpp.util.ByteBuffer.toString(ByteBuffer.java:387)
at
org.apache.log4j.or.DefaultRenderer.doRender(DefaultRenderer.java:26)
at
org.apache.log4j.or.RendererMap.findAndRender(RendererMap.java:70)
at
org.apache.log4j.spi.LoggingEvent.getRenderedMessage(LoggingEvent.java:288)
at
org.apache.log4j.helpers.PatternParser$BasicPatternConverter.convert(PatternParser.java:395)
at
org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:56)
at
org.apache.log4j.PatternLayout.format(PatternLayout.java:495)
at
org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:292)
at
org.apache.log4j.WriterAppender.append(WriterAppender.java:150)
at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
- locked <0x473874c8> (a
org.apache.log4j.ConsoleAppender)
at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
at
org.apache.log4j.Category.callAppenders(Category.java:187)
- locked <0x46829180> (a
org.apache.log4j.spi.RootCategory)
at
org.apache.log4j.Category.forcedLog(Category.java:372)
at
org.apache.log4j.Category.debug(Category.java:241)
at
com.logica.smpp.debug.Log4JDebug.write(Log4JDebug.java:79)
at
com.logica.smpp.TCPIPConnection.send(TCPIPConnection.java:301)
at
com.logica.smpp.Transmitter.send(Transmitter.java:81)
at com.logica.smpp.Session.send(Session.java:983)
at com.logica.smpp.Session.bind(Session.java:452)
at
...
"SMSC-Accept-16910":
at
org.apache.log4j.Category.callAppenders(Category.java:185)
- waiting to lock <0x46829180> (a
org.apache.log4j.spi.RootCategory)
at
org.apache.log4j.Category.forcedLog(Category.java:372)
at org.apache.log4j.Category.log(Category.java:864)
at
org.jboss.logging.Log4jLoggerPlugin.trace(Log4jLoggerPlugin.java:96)
at org.jboss.logging.Logger.trace(Logger.java:113)
at
org.jboss.mx.loading.UnifiedClassLoader3.attempt(UnifiedClassLoader3.java:242)
at
org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:126)
- locked <0x472e2f38> (a
org.jboss.mx.loading.UnifiedClassLoader3)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
- locked <0x472e2f38> (a
org.jboss.mx.loading.UnifiedClassLoader3)
at
com.proteusmobile.smsgw.server.ServerService.listen(ServerService.java:187)
at
com.proteusmobile.smsgw.server.ServerService.access$3(ServerService.java:46)
at
com.proteusmobile.smsgw.server.ServerService$Listener.run0(ServerService.java:163)
at
com.proteusmobile.smsgw.server.ServerService$Listener.run(ServerService.java:154)
at java.lang.Thread.run(Thread.java:536)
Found 1 deadlock.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira