]
Dan Berindei updated ISPN-10349:
--------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
PersistenceManager.addSegments may never complete
-------------------------------------------------
Key: ISPN-10349
URL:
https://issues.jboss.org/browse/ISPN-10349
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 10.0.0.Beta3
Reporter: Dan Berindei
Assignee: Will Burns
Priority: Major
Labels: testsuite_stability
Fix For: 10.0.0.Beta4
{{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.
{noformat}
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/:?]
{noformat}