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

Soft Index File Store: Put on same key after remove leads to corrupted cache on shutdown

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 7.2.5.Final, 8.2.1.Final
    • Loaders and Stores
    • None
    • Hide

      Run attached unit test two times.

      Note: I'm assuming this is related to ISPN-5753 since it does not occur on the current 8.2.x development branch.

      Can the respective fix be backported to the 7.2.x branch?

      Show
      Run attached unit test two times. Note: I'm assuming this is related to ISPN-5753 since it does not occur on the current 8.2.x development branch. Can the respective fix be backported to the 7.2.x branch?

    Description

      When performing a remove and then a put on the same key, the persistent soft index store appears to be corrupted on shutdown. On next startup an exception occurs:

      org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.persistence.manager.PersistenceManagerImpl.start() on object of type PersistenceManagerImpl

      at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:172)
      at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:859)
      at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:628)
      at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:617)
      at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:542)
      at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:238)
      at org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:849)
      at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:635)
      at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:585)
      at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:451)
      at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:437)
      at org.infinispan.quickstart.embeddedcache.SoftIndexFileStoreRemoveTest.createCache(SoftIndexFileStoreRemoveTest.java:38)
      at org.infinispan.quickstart.embeddedcache.SoftIndexFileStoreRemoveTest.testPutAfterRemove(SoftIndexFileStoreRemoveTest.java:26)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:483)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:483)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
      Caused by: org.infinispan.commons.CacheException: Unable to start cache loaders
      at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:174)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:483)
      at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:168)
      ... 39 more
      Caused by: org.infinispan.persistence.spi.PersistenceException: java.lang.IllegalArgumentException: Negative position
      at org.infinispan.persistence.sifs.SoftIndexFileStore.forEachOnDisk(SoftIndexFileStore.java:456)
      at org.infinispan.persistence.sifs.SoftIndexFileStore.start(SoftIndexFileStore.java:153)
      at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:141)
      ... 44 more
      Caused by: java.lang.IllegalArgumentException: Negative position
      at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:685)
      at org.infinispan.persistence.sifs.FileProvider$Handle.read(FileProvider.java:291)
      at org.infinispan.persistence.sifs.EntryRecord.read(EntryRecord.java:85)
      at org.infinispan.persistence.sifs.EntryRecord.readEntryHeader(EntryRecord.java:55)
      at org.infinispan.persistence.sifs.SoftIndexFileStore$1.apply(SoftIndexFileStore.java:169)
      at org.infinispan.persistence.sifs.SoftIndexFileStore.forEachOnDisk(SoftIndexFileStore.java:443)
      ... 46 more

      Attachments

        Issue Links

          Activity

            People

              rvansa1@redhat.com Radim Vansa (Inactive)
              apabst Andreas Pabst (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: