5

While running the test cases in arquillian, I am getting bewlow error. When I run the use case on actual server there is no such exception ocuurs.

I am using JBoss AS 7 with Infinispan 5.1.

I tried to use solution of How to fix "Unable to acquire lock after 15 seconds" errors in Wildfly but it did not worked.

15:25:07,539 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (EJB default - 44) ISPN000136: Execution error: org.infinispan.util.concurrent.TimeoutException: ISPN000299: Unable to acquire lock after 10 seconds for key XXX and requestor GlobalTransaction:<null>:21:local. Lock is held by GlobalTransaction:<null>:20:local, while request came from local
    at org.infinispan.util.concurrent.locks.LockManagerImpl.lock(LockManagerImpl.java:198)
    at org.infinispan.util.concurrent.locks.LockManagerImpl.acquireLock(LockManagerImpl.java:171)
    at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lockKeyAndCheckOwnership(AbstractTxLockingInterceptor.java:177)
    at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lockAndRegisterBackupLock(AbstractTxLockingInterceptor.java:110)
    at org.infinispan.interceptors.locking.OptimisticLockingInterceptor$LockAcquisitionVisitor.lockAndRecord(OptimisticLockingInterceptor.java:218)
    at org.infinispan.interceptors.locking.OptimisticLockingInterceptor$LockAcquisitionVisitor.visitSingleKeyCommand(OptimisticLockingInterceptor.java:213)
    at org.infinispan.interceptors.locking.OptimisticLockingInterceptor$LockAcquisitionVisitor.visitPutKeyValueCommand(OptimisticLockingInterceptor.java:206)
    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:71)
    at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.acquireLocksVisitingCommands(OptimisticLockingInterceptor.java:277)
    at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.visitPrepareCommand(OptimisticLockingInterceptor.java:76)
    at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
    at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:36)
    at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
    at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:111)
    at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:109)
    at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
    at org.infinispan.interceptors.TxInterceptor.invokeNextInterceptorAndVerifyTransaction(TxInterceptor.java:132)
    at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:119)
    at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)
    at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:111)
    at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:109)
    at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124
Community
  • 1
  • 1
sauumum
  • 1,638
  • 1
  • 19
  • 36
  • 1
    Acquiring a lock usually times out because another thread is blocked doing something while holding the lock. You need to get a thread dump while this is happening and see what the other threads are doing. – Dan Berindei Jun 03 '16 at 10:22
  • Did you able to fix it, any idea how to reproduce this issue. I am getting same error while doing put. But not able to reproduce this as it's simple put not sure how it can take more then 10seconds. – Sanjay Jun 06 '18 at 18:18

2 Answers2

0

You can refer to the below post for suggestion if you are not in HA: https://developer.jboss.org/thread/243458

This is been fixed in widfly 8.1 version, link: https://issues.jboss.org/browse/WFLY-3715

0

I fix this problem launching the update of the caches in a new Thread. I think that if you update the caches in the EJB-Thread, it produces inter-locking.

I hope that it will work

Riki Gomez
  • 11
  • 2