]
Dan Berindei updated ISPN-10363:
--------------------------------
Git Pull Request:
LazyInitializingExecutorService is not thread-safe
--------------------------------------------------
Key: ISPN-10363
URL:
https://issues.jboss.org/browse/ISPN-10363
Project: Infinispan
Issue Type: Bug
Components: Core, Test Suite - Core
Affects Versions: 10.0.0.Beta3, 9.4.15.Final
Reporter: Dan Berindei
Assignee: Dan Berindei
Priority: Major
Labels: testsuite_stability
Fix For: 10.0.0.Beta4
{{LazyInitializingExecutorService.shutdown()}} is not synchronized, so it may miss the
executor created on another thread.
Normally the long time between the first use and stop is long enough for this to be a
non-issue, but it does cause random thread leaks in {{PersistenceManagerTest}}:
{noformat}
17:57:06,421 DEBUG (testng-PersistenceManagerTest:[]) [DefaultCacheManager] Started cache
manager PersistenceManagerTest-NodeB on null
17:57:06,423 INFO (testng-PersistenceManagerTest:[]) [TestSuiteProgress] Test starting:
org.infinispan.persistence.PersistenceManagerTest.testProcessAfterStop
17:57:06,446 INFO (testng-PersistenceManagerTest:[]) [TestSuiteProgress] Test succeeded:
org.infinispan.persistence.PersistenceManagerTest.testProcessAfterStop
17:57:06,447 DEBUG (testng-PersistenceManagerTest:[]) [DefaultCacheManager] Stopped cache
manager PersistenceManagerTest-NodeB
17:58:38,062 WARN (main:[]) [ThreadLeakChecker] Possible leaked thread:
"async-thread-PersistenceManagerTest-NodeB-p54399-t1" daemon prio=5 tid=0x2ab4c
nid=NA waiting
java.lang.Thread.State: WAITING
at java.base(a)11.0.3/jdk.internal.misc.Unsafe.park(Native Method)
at java.base@11.0.3/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
at
java.base@11.0.3/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
at
java.base@11.0.3/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
at
java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
at
java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
at
java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base@11.0.3/java.lang.Thread.run(Thread.java:834)
{noformat}