1 Reply Latest reply on Apr 11, 2011 7:29 AM by tal2700

    WorkManager synchronization issue

    tal2700 Newbie

      Hi All,

       

      I have synchronization problem in my WorkManagers threads,

      I'm seeing threads locked every time I doing jstack.

      My application send/get messages from the network, the problem happen in the uplink, when message should forward from the resource adapter to the ejb. i'm using jms for this.

      when i run the JBoss on windows I don't get this problem, it happen only on Centos system. the performance on my windows laptop is x3 from the Xeon linux machine, my application written on ejb 2. in the test case i did, the RA and the ejb run on the same VM. i bold the line in the stack trace that related to my code.

       

      Thanks,

      Tal,

       

      "WorkManager(2)-9" daemon prio=10 tid=0x00000000517eb000 nid=0x3483 runnable [0x0000000045e99000]

         java.lang.Thread.State: RUNNABLE

                at java.util.zip.ZipFile.getEntry(Native Method)

                at java.util.zip.ZipFile.getEntry(ZipFile.java:149)

                - locked <0x00002aaabe89a7e8> (a java.util.jar.JarFile)

                at java.util.jar.JarFile.getEntry(JarFile.java:208)

                at java.util.jar.JarFile.getJarEntry(JarFile.java:191)

                at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:757)

                at sun.misc.URLClassPath.getResource(URLClassPath.java:169)

                at java.net.URLClassLoader$1.run(URLClassLoader.java:194)

                at java.security.AccessController.doPrivileged(Native Method)

                at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

                - locked <0x00002aaabe230220> (a org.jboss.system.NoAnnotationURLClassLoader)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

                at java.lang.Class.forName0(Native Method)

                at java.lang.Class.forName(Class.java:247)

                at org.jboss.classloader.plugins.loader.ClassLoaderToLoaderAdapter.loadClass(ClassLoaderToLoaderAdapter.java:173)

                at org.jboss.classloader.spi.ClassLoaderDomain.loadClassFromParent(ClassLoaderDomain.java:352)

                at org.jboss.classloader.spi.ClassLoaderDomain.loadClassBefore(ClassLoaderDomain.java:307)

                at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:243)

                at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1099)

                at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:730)

                at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:374)

                - locked <0x00002aaac36fbb28> (a org.jboss.classloader.spi.base.BaseClassLoader)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

                at org.jboss.classloading.spi.DelegatingClassLoader.loadClass(DelegatingClassLoader.java:84)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

                at org.jboss.util.loading.DelegatingClassLoader.loadClass(DelegatingClassLoader.java:92)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

                at org.jboss.security.SecurityContextFactory.getContextClass(SecurityContextFactory.java:142)

                at org.jboss.security.SecurityContextFactory.createUtil(SecurityContextFactory.java:118)

                at org.jboss.security.plugins.JBossSecurityContext.getUtil(JBossSecurityContext.java:197)

                at org.jboss.security.plugins.JBossSecurityContext.<init>(JBossSecurityContext.java:89)

                at sun.reflect.GeneratedConstructorAccessor85.newInstance(Unknown Source)

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

                at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

                at org.jboss.security.SecurityContextFactory.createSecurityContext(SecurityContextFactory.java:71)

                at org.jboss.security.SecurityContextFactory.createSecurityContext(SecurityContextFactory.java:51)

                at org.jboss.security.SecurityContextFactory.createSecurityContext(SecurityContextFactory.java:87)

                at org.jboss.ejb.plugins.SecurityActions$1.run(SecurityActions.java:386)

                at java.security.AccessController.doPrivileged(Native Method)

                at org.jboss.ejb.plugins.SecurityActions.createAndSetSecurityContext(SecurityActions.java:382)

                at org.jboss.ejb.plugins.RunAsSecurityInterceptor.process(RunAsSecurityInterceptor.java:118)

                at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:103)

                at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)

                at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)

                at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:416)

                at org.jboss.ejb.Container.invoke(Container.java:1028)

                at sun.reflect.GeneratedMethodAccessor166.invoke(Unknown Source)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

                at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)

                at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)

                at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:193)

                at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:179)

                at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)

                at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.delivery(MessageEndpointInterceptor.java:249)

                at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor.java:128)

                at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)

                at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)

                at $Proxy152.onMessage(Unknown Source)

      at com.tal.aa.jca.MessageQueueListener.run(MessageQueueListener.java:63)

                at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)

                at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                at java.lang.Thread.run(Thread.java:619)

       

       

      "WorkManager(2)-8" daemon prio=10 tid=0x0000000052438000 nid=0x3482 waiting for monitor entry [0x0000000045d99000]

         java.lang.Thread.State: BLOCKED (on object monitor)

                at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:352)

                - waiting to lock <0x00002aaac36fbb28> (a org.jboss.classloader.spi.base.BaseClassLoader)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

                at org.jboss.classloading.spi.DelegatingClassLoader.loadClass(DelegatingClassLoader.java:84)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

                at org.jboss.util.loading.DelegatingClassLoader.loadClass(DelegatingClassLoader.java:92)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

                at org.jboss.security.SecurityContextFactory.getContextClass(SecurityContextFactory.java:142)

                at org.jboss.security.SecurityContextFactory.createSecurityContext(SecurityContextFactory.java:68)

                at org.jboss.security.SecurityContextFactory.createSecurityContext(SecurityContextFactory.java:51)

                at org.jboss.security.SecurityContextFactory.createSecurityContext(SecurityContextFactory.java:87)

                at org.jboss.ejb.plugins.SecurityActions$1.run(SecurityActions.java:386)

                at java.security.AccessController.doPrivileged(Native Method)

                at org.jboss.ejb.plugins.SecurityActions.createAndSetSecurityContext(SecurityActions.java:382)

                at org.jboss.ejb.plugins.SecurityInterceptor.shouldBypassSecurity(SecurityInterceptor.java:381)

                at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:218)

                at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:206)

                at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:98)

                at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:81)

                at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)

                at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)

                at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:651)

                at org.jboss.ejb.Container.invoke(Container.java:1028)

                at sun.reflect.GeneratedMethodAccessor166.invoke(Unknown Source)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

                at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)

                at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)

                at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:193)

                at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:179)

                at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)

                at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:87)

                at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)

                at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)

                at $Proxy154.handleMessage(Unknown Source)

                at com.tal.aa.bean.session.EISMDBListenerBean.onMessage(EISMDBListenerBean.java:94)

                at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.invocation.Invocation.performCall(Invocation.java:386)

                at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:514)

                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)

                at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:115)

                at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)

                at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)

                at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)

                at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)

                at org.jboss.ejb.plugins.RunAsSecurityInterceptor.process(RunAsSecurityInterceptor.java:133)

                at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:103)

                at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)

                at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)

                at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:416)

                at org.jboss.ejb.Container.invoke(Container.java:1028)

                at sun.reflect.GeneratedMethodAccessor166.invoke(Unknown Source)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

                at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)

                at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)

                at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:193)

                at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:179)

                at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)

                at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.delivery(MessageEndpointInterceptor.java:249)

                at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor.java:128)

                at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)

                at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)

                at $Proxy152.onMessage(Unknown Source)

                at com.tal.aa.jca.MessageQueueListener.run(MessageQueueListener.java:63)

                at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)

                at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                at java.lang.Thread.run(Thread.java:619)