Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-3153

ArrayIndexOutOfBoundsException in BoundedOffHeapDataContainer.removeSegments

    XMLWordPrintable

    Details

      Description

      When the data-segmentation feature is disabled, the data container is not segmented, but BoundedOffHeapDataContainer.removeSegments still uses DefaultSegmentedDataContainer.getMapForSegment internally, and gets an ArrayIndexOutOfBoundsException:

      09:51:06,887 ERROR [org.infinispan.topology.LocalTopologyManagerImpl] (transport-thread--p4-t3) ISPN000452: Failed to update topology for cache books: java.lang.ArrayIndexOutOfBoundsException: Index 54 out of bounds for length 1
      	at java.base/java.lang.invoke.VarHandle$1.apply(VarHandle.java:2011)
      	at java.base/java.lang.invoke.VarHandle$1.apply(VarHandle.java:2008)
      	at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:159)
      	at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:156)
      	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:62)
      	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
      	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
      	at java.base/java.lang.invoke.VarHandleObjects$Array.getVolatile(VarHandleObjects.java:438)
      	at java.base/java.lang.invoke.VarHandleGuards.guard_LI_L(VarHandleGuards.java:646)
      	at java.base/java.util.concurrent.atomic.AtomicReferenceArray.get(AtomicReferenceArray.java:100)
      	at org.infinispan.core:jdg-7.3@9.4.15.Final-redhat-00001//org.infinispan.container.impl.DefaultSegmentedDataContainer.getMapForSegment(DefaultSegmentedDataContainer.java:83)
      	at org.infinispan.core:jdg-7.3@9.4.15.Final-redhat-00001//org.infinispan.container.impl.AbstractInternalDataContainer.remove(AbstractInternalDataContainer.java:183)
      	at org.infinispan.core:jdg-7.3@9.4.15.Final-redhat-00001//org.infinispan.container.impl.AbstractInternalDataContainer.remove(AbstractInternalDataContainer.java:206)
      	at org.infinispan.core:jdg-7.3@9.4.15.Final-redhat-00001//org.infinispan.container.impl.InternalDataContainerAdapter.removeSegmentEntries(InternalDataContainerAdapter.java:144)
      	at org.infinispan.core:jdg-7.3@9.4.15.Final-redhat-00001//org.infinispan.container.offheap.BoundedOffHeapDataContainer.removeSegments(BoundedOffHeapDataContainer.java:160)
      	at org.infinispan.core:jdg-7.3@9.4.15.Final-redhat-00001//org.infinispan.statetransfer.StateConsumerImpl.removeStaleData(StateConsumerImpl.java:972)
      	at org.infinispan.core:jdg-7.3@9.4.15.Final-redhat-00001//org.infinispan.statetransfer.StateConsumerImpl.onTopologyUpdate(StateConsumerImpl.java:442)
      	at org.infinispan.core:jdg-7.3@9.4.15.Final-redhat-00001//org.infinispan.statetransfer.StateTransferManagerImpl.doTopologyUpdate(StateTransferManagerImpl.java:200)
      	at org.infinispan.core:jdg-7.3@9.4.15.Final-redhat-00001//org.infinispan.statetransfer.StateTransferManagerImpl.access$000(StateTransferManagerImpl.java:57)
      	at org.infinispan.core:jdg-7.3@9.4.15.Final-redhat-00001//org.infinispan.statetransfer.StateTransferManagerImpl$1.updateConsistentHash(StateTransferManagerImpl.java:113)
      	at org.infinispan.core:jdg-7.3@9.4.15.Final-redhat-00001//org.infinispan.topology.LocalTopologyManagerImpl.doHandleTopologyUpdate(LocalTopologyManagerImpl.java:357)
      	at org.infinispan.core:jdg-7.3@9.4.15.Final-redhat-00001//org.infinispan.topology.LocalTopologyManagerImpl.lambda$handleTopologyUpdate$1(LocalTopologyManagerImpl.java:279)
      	at org.infinispan.core:jdg-7.3@9.4.15.Final-redhat-00001//org.infinispan.executors.LimitedExecutor.runTasks(LimitedExecutor.java:175)
      	at org.infinispan.core:jdg-7.3@9.4.15.Final-redhat-00001//org.infinispan.executors.LimitedExecutor.access$100(LimitedExecutor.java:37)
      	at org.infinispan.core:jdg-7.3@9.4.15.Final-redhat-00001//org.infinispan.executors.LimitedExecutor$Runner.run(LimitedExecutor.java:227)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      

      The exception doesn't prevent the state transfer from finishing, but if the segments become owned by the local node again in the future, the cache may return the outdated values that were not removed because of the exception.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              wburns@redhat.com Will Burns
              Reporter:
              dberinde@redhat.com Dan Berindei
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: