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

PersistenceManager.addSegments may never complete

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      PersistenceManager.addSegments returns a CompletionStage which should be completed on a persistence executor thread. If the persistence executor was already stopped at the time addSegments() was called, however, the CompletionStage is never completed.

      This doesn't prevent the cache manager from stopping, but it causes a thread leak because a transport thread waits forever on the CompletionStage. E.g.

      16:57:06,128 TRACE (testng-Test:[]) [BasicComponentRegistryImpl] Changed status of org.infinispan.executors.persistence to STOPPED
      16:57:06,150 TRACE (transport-thread-Test-NodeB-p2059-t4:[Topology-testCache]) [PersistenceManagerImpl] Adding segments for id 584
      # no other mention of id 584
      17:15:17,300 ERROR [TestSuiteProgress] Test failed: SharedStoreInvalidationDuringRehashTest.ThreadLeakChecker
      java.lang.RuntimeException: Leaked thread transport-thread-SharedStoreInvalidationDuringRehashTest-NodeB-p2059-t4
      	at jdk.internal.misc.Unsafe.park(Native Method) ~[?:?]
      	at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234) ~[?:?]
      	at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1798) ~[?:?]
      	at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3128) ~[?:?]
      	at java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1868) ~[?:?]
      	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2021) ~[?:?]
      	at org.infinispan.util.concurrent.CompletableFutures.await(CompletableFutures.java:110) ~[classes/:?]
      	at org.infinispan.util.concurrent.CompletionStages.join(CompletionStages.java:73) ~[classes/:?]
      	at org.infinispan.statetransfer.StateConsumerImpl.onTopologyUpdate(StateConsumerImpl.java:306) ~[classes/:?]
      	at org.infinispan.scattered.impl.ScatteredStateConsumerImpl.onTopologyUpdate(ScatteredStateConsumerImpl.java:102) ~[classes/:?]
      

              wburns@redhat.com Will Burns
              dberinde@redhat.com Dan Berindei (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: