12 Replies Latest reply on Jun 19, 2017 10:13 AM by Paul Ferraro

    WildFly 8.2 throws Unable to acquire lock after [15 seconds] on key  for requestor [GlobalTransaction:<null>:227:local]! Lock held by [GlobalTransaction:<null>:187:local]

    Guru Prashanth Thanakodi Newbie

      We are upgrading our application from JBOSS 7.0 to WildFly 8.2.  It's a standalone environment. WildFly 8.2 fails during update of an entity with the below exception.

       

      The infinispan configuration in standalone.xml is shown below.

       

              <subsystem xmlns="urn:jboss:domain:infinispan:2.0">

                  <cache-container name="hibernate" default-cache="local-query" module="org.hibernate">

      <local-cache name="entity">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LRU" max-entries="10000"/>

                          <expiration max-idle="100000"/>

                      </local-cache>

                      <local-cache name="local-query">

                          <transaction mode="NONE"/>

                          <eviction strategy="LRU" max-entries="10000"/>

                          <expiration max-idle="100000"/>

                      </local-cache>

                      <local-cache name="timestamps">

                          <transaction mode="NONE"/>

                          <eviction strategy="NONE"/>

                      </local-cache>

                  </cache-container>

              </subsystem>

       

       

      I have added    <transaction mode="NON_XA"  locking="optimistic"/> but this one fails with write skew trace. It would be of great help if we can get a solution.

       

      Here is a snippet of the stack trace.

       

       

      Unable to acquire lock after [15 seconds] on key [entityclassName#7cdf9e61-535a-4c98-bd2b-42d576751577] for requestor [GlobalTransaction:<null>:227:local]! Lock held by [GlobalTransaction:<null>:187:local]

        at org.infinispan.util.concurrent.locks.LockManagerImpl.lock(LockManagerImpl.java:198) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.util.concurrent.locks.LockManagerImpl.acquireLock(LockManagerImpl.java:171) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lockKeyAndCheckOwnership(AbstractTxLockingInterceptor.java:169) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.interceptors.locking.PessimisticLockingInterceptor.visitPutKeyValueCommand(PessimisticLockingInterceptor.java:107) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:70) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:32) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:70) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:255) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:186) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:70) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.interceptors.CacheMgmtInterceptor.updateStoreStatistics(CacheMgmtInterceptor.java:148) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:134) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:70) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:73) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:32) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:70) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:333) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1306) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.CacheImpl.putInternal(CacheImpl.java:878) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.CacheImpl.put(CacheImpl.java:870) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.DecoratedCache.put(DecoratedCache.java:401) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.infinispan.AbstractDelegatingCache.put(AbstractDelegatingCache.java:276) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

        at org.hibernate.cache.infinispan.access.TransactionalAccessDelegate.update(TransactionalAccessDelegate.java:192) [hibernate-infinispan-4.3.7.Final.jar:4.3.7.Final]

        at org.hibernate.cache.infinispan.entity.TransactionalAccess.update(TransactionalAccess.java:89) [hibernate-infinispan-4.3.7.Final.jar:4.3.7.Final]

        at org.hibernate.action.internal.EntityUpdateAction.cacheUpdate(EntityUpdateAction.java:235) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]

        at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:210) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]

        at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]

        at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:349) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]

        at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]

        at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]

        at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1222) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]

        at org.hibernate.jpa.spi.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:1335) [hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]

        at org.jboss.as.jpa.container.AbstractEntityManager.flush(AbstractEntityManager.java:457) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]

       

       

       

       

      Thanks

      Guru