Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-569

IllegalMonitorStateException thrown when releasing the lock

    Details

    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      If a transaction manager is configured, the issue does not occur.

      Show
      If a transaction manager is configured, the issue does not occur.

      Description

      This simple test case:

      public class SkipLockingTest extends SingleCacheManagerTest {

      private AdvancedCache advancedCache;

      @Override
      protected EmbeddedCacheManager createCacheManager() throws Exception

      { Configuration c = new Configuration(); c.setCacheMode(Configuration.CacheMode.LOCAL); EmbeddedCacheManager cacheManager = new DefaultCacheManager(c); advancedCache = cacheManager.getCache().getAdvancedCache(); return cacheManager; }

      public void testExistsInContextPut(Method m)

      { String name = m.getName(); advancedCache.put("k-" + name, "v-" + name); advancedCache.withFlags(Flag.SKIP_LOCKING).put("k-" + name, "v2-" + name); }

      }

      throws:

      java.lang.IllegalMonitorStateException
      at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:127)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1175)
      at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)
      at org.infinispan.util.concurrent.locks.containers.AbstractStripedLockContainer.releaseLock(AbstractStripedLockContainer.java:98)
      at org.infinispan.util.concurrent.locks.LockManagerImpl.unlock(LockManagerImpl.java:100)
      at org.infinispan.interceptors.LockingInterceptor.cleanupLocks(LockingInterceptor.java:289)
      at org.infinispan.interceptors.LockingInterceptor.doAfterCall(LockingInterceptor.java:243)
      at org.infinispan.interceptors.LockingInterceptor.visitPutKeyValueCommand(LockingInterceptor.java:200)
      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
      at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132)
      at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:57)
      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
      at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:183)
      at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:132)
      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
      at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:58)
      at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:39)
      at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:57)
      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
      at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:271)
      at org.infinispan.CacheDelegate.put(CacheDelegate.java:426)
      at org.infinispan.CacheSupport.put(CacheSupport.java:28)
      at org.infinispan.api.SkipLockingTest.testExistsInContextPut(SkipLockingTest.java:41)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  galder.zamarreno Galder ZamarreƱo
                  Reporter:
                  galder.zamarreno Galder ZamarreƱo
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: