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

FileCacheStore throws an IllegalMonitorStateException in FileCacheVamTest

XMLWordPrintable

      If there are no expired elements the bucket will not be modified and the lock doesn't need to be acquired.
      We were still releasing the lock though, leading to IllegalMonitorStateExceptions in FileCacheStoreVamTest:

      2011-09-25 11:54:46,000 ERROR (testng-FileCacheStoreVamTest) [org.infinispan.test.fwk.UnitTestTestNGListener] Method testLoadAndStoreWithLifespan(org.infinispan.loaders.file.FileCacheStoreVamTest) threw an exception
      java.lang.IllegalMonitorStateException
      at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:398)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1340)
      at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:778)
      at org.infinispan.util.concurrent.locks.StripedLock.releaseLock(StripedLock.java:135)
      at org.infinispan.loaders.LockSupportCacheStore.unlock(LockSupportCacheStore.java:87)
      at org.infinispan.loaders.file.FileCacheStore.purgeInternal(FileCacheStore.java:244)
      at org.infinispan.loaders.AbstractCacheStore$2.run(AbstractCacheStore.java:106)
      at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:48)
      at org.infinispan.loaders.AbstractCacheStore.purgeExpired(AbstractCacheStore.java:103)
      at org.infinispan.loaders.BaseCacheStoreTest.purgeExpired(BaseCacheStoreTest.java:198)
      at org.infinispan.loaders.BaseCacheStoreTest.testLoadAndStoreWithLifespan(BaseCacheStoreTest.java:151)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:644)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:546)
      at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:700)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1002)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:137)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:121)
      at org.testng.TestRunner.runWorkers(TestRunner.java:909)
      at org.testng.TestRunner.privateRun(TestRunner.java:618)
      at org.testng.TestRunner.run(TestRunner.java:499)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
      at org.testng.SuiteRunner.access$000(SuiteRunner.java:33)
      at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:358)
      at org.testng.internal.thread.ThreadUtil$CountDownLatchedRunnable.run(ThreadUtil.java:142)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:679)

              dberinde@redhat.com Dan Berindei (Inactive)
              dberinde@redhat.com Dan Berindei (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: