0 Replies Latest reply on Oct 30, 2014 4:22 PM by vince.adamo

    java.lang.InterruptedException encountered under load

    vince.adamo

      I am load testing a web application running on JBoss EAP 5.2.0, with Seam 2.2.2 Final, and under moderate load (50-60% CPU utilization) I observe occasional exceptions like the one provided below.  In summary, the initial UndeclaredThrowableException is being caused by a java.lang.InterruptedException that is being thrown while trying to acquire a Semaphore within the jboss EJB3 framework.

       

      I would ideally like to understand what exactly is causing this interrupt.  Is it a timeout that has been configured on stateless/stateful pool, transaction timeout, timeout waiting for a bean to become available, etc?  There is no other message that is logged that provides a hint as to where I need to look to resolve this problem.

       

      Any help would be appreciated!

       

      javax.ejb.EJBException: java.lang.reflect.UndeclaredThrowableException

              at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:77)

              at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)

              at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:261)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:182)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:193)

              at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:250)

              at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:188)

              at com.sun.proxy.$Proxy541.checkout(Unknown Source)

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

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

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

              at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)

              at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)

              at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)

              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)

              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)

              at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)

              at org.javassist.tmp.java.lang.Object_$$_javassist_seam_22.checkout(Object_$$_javassist_seam_22.java)

              ...

              at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)

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

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

      Caused by: java.lang.reflect.UndeclaredThrowableException

              at com.sun.proxy.$Proxy563.persist(Unknown Source)

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

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

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

              at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)

              at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)

              at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)

              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)

              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)

              at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)

              at org.javassist.tmp.java.lang.Object_$$_javassist_seam_46.persist(Object_$$_javassist_seam_46.java)

              ...

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)

              ... 101 more

      Caused by: java.lang.InterruptedException

              at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1325)

              at java.util.concurrent.Semaphore.tryAcquire(Semaphore.java:410)

              at org.jboss.ejb3.EJBContainer$SemaphoreLock.tryLock(EJBContainer.java:1855)

              at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:60)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:193)

              at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:250)

              at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:188)

              ... 164 more