Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-11940

TimeoutException on second invocation of method with TransactionAttribute.MANDATORY (Stateful bean) within one transaction

    Details

    • Target Release:
    • Steps to Reproduce:
      Hide

      Steps to reproduce:

      git clone git+ssh://git.app.eng.bos.redhat.com/srv/git/jbossqe/eap-tests-ejb.git
      cd eap-tests-ejb/ejb-multi-server-ts/
      mvn clean test -Deap.zip=/PATH/TO/JBOSS_EAP7.ZIP -Dtest=TransactionsInCluster_StatefulBean_TestCase#twoCallsPerTransactionAndCommit
      

      You can download EAP 7.1.0.ER1 zip here:
      http://download.devel.redhat.com/devel/candidates/JBEAP/JBEAP-7.1.0-ER1/jboss-eap-7.1.0.ER1.zip

      Show
      Steps to reproduce: git clone git+ssh: //git.app.eng.bos.redhat.com/srv/git/jbossqe/eap-tests-ejb.git cd eap-tests-ejb/ejb-multi-server-ts/ mvn clean test -Deap.zip=/PATH/TO/JBOSS_EAP7.ZIP -Dtest=TransactionsInCluster_StatefulBean_TestCase#twoCallsPerTransactionAndCommit You can download EAP 7.1.0.ER1 zip here: http://download.devel.redhat.com/devel/candidates/JBEAP/JBEAP-7.1.0-ER1/jboss-eap-7.1.0.ER1.zip

      Description

      There is one server started with standalone-ha.xml profile (or there can be more servers in a cluster, it doesn't matter). There is a stateful bean TransactionalBeanStateful.java provided in the deployment on the server.

      The bean has createPerson() method with TransactionAttributeType=MANDATORY.

      These steps lead to a TimeoutException:

      • client looks up a TransactionalBeanStateful bean,
      • client creates a UserTranscation:
        final UserTransaction tx = (UserTransaction) ctx.lookup("txn:UserTransaction");
        
      • client begins new transaction
      • client calls createPerson() method twice within the same transaction

      See steps to reproduce to reproduce the issue locally.
      Test code: http://git.app.eng.bos.redhat.com/git/jbossqe/eap-tests-ejb.git/tree/ejb-multi-server-ts/src/test/java/org/jboss/qa/ejb/tests/transactions/TransactionsInCluster_StatefulBean_TestCase.java#n108

      The issue does not occur if:

      • server is not started with *ha.xml profile
      • the bean is stateless

      Full stacktrace:

      CLUSTER1_NODE1: 13:57:06,375 ERROR [org.jboss.as.ejb3.invocation] (default task-11) WFLYEJB0034: EJB Invocation failed on component TransactionalBeanStateful for method public abstract void org.jboss.qa.ejb.tests.transactions.bean.TransactionalBeanRemote.createPerson(): javax.ejb.EJBTransactionRolledbackException: ISPN000299: Unable to acquire lock after 15 seconds for key UUIDSessionID [dbf99845-1e0f-4a5b-8b8a-0a81c16d1c0f] and requestor GlobalTransaction:<cluster1-node1>:5:local. Lock is held by GlobalTransaction:<cluster1-node1>:3:local
              at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:160)
              at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:257)
              at org.jboss.as.ejb3.tx.CMTTxInterceptor.mandatory(CMTTxInterceptor.java:296)
              at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:234)
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
              at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:327)
              at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
              at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
              at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:84)
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
              at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
              at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
              at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
              at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
              at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
              at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:57)
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
              at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
              at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
              at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
              at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
              at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:256)
              at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:609)
              at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57)
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
              at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
              at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
              at org.jboss.as.ejb3.remote.AssociationImpl$$Lambda$1237/260509875.apply(Unknown Source)
              at org.wildfly.security.auth.server.SecurityIdentity.runAsFunctionEx(SecurityIdentity.java:380)
              at org.jboss.as.ejb3.remote.AssociationImpl.invokeWithIdentity(AssociationImpl.java:479)
              at org.jboss.as.ejb3.remote.AssociationImpl.invokeMethod(AssociationImpl.java:474)
              at org.jboss.as.ejb3.remote.AssociationImpl.lambda$receiveInvocationRequest$0(AssociationImpl.java:182)
              at org.jboss.as.ejb3.remote.AssociationImpl$$Lambda$1234/1203786036.run(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: org.infinispan.util.concurrent.TimeoutException: ISPN000299: Unable to acquire lock after 15 seconds for key UUIDSessionID [dbf99845-1e0f-4a5b-8b8a-0a81c16d1c0f] and requestor GlobalTransaction:<cluster1-node1>:5:local. Lock is held by GlobalTransaction:<cluster1-node1>:3:local
              at org.infinispan.util.concurrent.locks.impl.DefaultLockManager$KeyAwareExtendedLockPromise.lock(DefaultLockManager.java:238)
              at org.infinispan.interceptors.locking.AbstractLockingInterceptor.lockAndRecord(AbstractLockingInterceptor.java:193)
              at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.checkPendingAndLockKey(AbstractTxLockingInterceptor.java:193)
              at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lockOrRegisterBackupLock(AbstractTxLockingInterceptor.java:116)
              at org.infinispan.interceptors.locking.PessimisticLockingInterceptor.visitDataReadCommand(PessimisticLockingInterceptor.java:71)
              at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitGetKeyValueCommand(AbstractLockingInterceptor.java:80)
              at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:43)
              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
              at org.infinispan.interceptors.TxInterceptor.enlistReadAndInvokeNext(TxInterceptor.java:346)
              at org.infinispan.interceptors.TxInterceptor.visitGetKeyValueCommand(TxInterceptor.java:331)
              at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:43)
              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
              at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:113)
              at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:85)
              at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:43)
              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
              at org.infinispan.statetransfer.StateTransferInterceptor.visitReadCommand(StateTransferInterceptor.java:177)
              at org.infinispan.statetransfer.StateTransferInterceptor.visitGetKeyValueCommand(StateTransferInterceptor.java:154)
              at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:43)
              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
              at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110)
              at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:79)
              at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:85)
              at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:43)
              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
              at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:113)
              at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:85)
              at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:43)
              at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:335)
              at org.infinispan.cache.impl.CacheImpl.get(CacheImpl.java:414)
              at org.infinispan.cache.impl.DecoratedCache.get(DecoratedCache.java:443)
              at org.infinispan.cache.impl.AbstractDelegatingCache.get(AbstractDelegatingCache.java:287)
              at org.wildfly.clustering.ejb.infinispan.bean.InfinispanBeanFactory.findValue(InfinispanBeanFactory.java:88)
              at org.wildfly.clustering.ejb.infinispan.bean.InfinispanBeanFactory.findValue(InfinispanBeanFactory.java:50)
              at org.wildfly.clustering.ejb.infinispan.InfinispanBeanManager.findBean(InfinispanBeanManager.java:267)
              at org.jboss.as.ejb3.cache.distributable.DistributableCache.get(DistributableCache.java:109)
              at org.jboss.as.ejb3.component.stateful.StatefulComponentInstanceInterceptor.processInvocation(StatefulComponentInstanceInterceptor.java:52)
              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
              at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:255)
              ... 44 more
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  pferraro Paul Ferraro
                  Reporter:
                  mvinkler Michal Vinkler
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: