Details
-
Bug
-
Resolution: Done
-
Major
-
10.0.0.Beta3
-
None
-
DataGrid Sprint #30
Description
I got a thread leak when running the test suite with trace logging enabled and taskset -c 1-2:
17:06:05,307 DEBUG (testng-Test:[]) [TestSuiteProgress] Test configuration finished: org.infinispan.remoting.transport.InitialClusterSizeTest.testClassFinished 17:15:17,284 ERROR [TestSuiteProgress] Test failed: InitialClusterSizeTest.ThreadLeakChecker java.lang.RuntimeException: Leaked thread Controller-remote-thread-InitialClusterSizeTest-NodeB at jdk.internal.misc.Unsafe.park(Native Method) ~[?:?] at java.util.concurrent.locks.LockSupport.park(LockSupport.java:194) ~[?:?] at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:885) ~[?:?] at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1039) ~[?:?] at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1345) ~[?:?] at java.util.concurrent.Semaphore.acquire(Semaphore.java:318) ~[?:?] at org.infinispan.util.concurrent.BlockingTaskAwareExecutorServiceImpl$ControllerThread.run(BlockingTaskAwareExecutorServiceImpl.java:159) ~[classes/:?]
I believe it may be caused by doExecute() adding a task to the blocked tasks queue without calling checkForReadyTasks() (after the executor rejected the task). ControllerThread.run() needs a semaphore permit to start polling for tasks, so it needs a semaphore.release() after each {{blockedTasks.add().
Attachments
Issue Links
- is related to
-
ISPN-10330 BasicComponentRegistryImpl.findFactory() concurrency issue
- Closed
-
ISPN-10342 Test Thread Leaks aren't clearing in time
- Closed