-
Bug
-
Resolution: Done
-
Major
-
8.23.0.Final
-
None
-
NEW
-
NEW
When creating a simple SolverManager-based job:
try (SolverManager<..., UUID> manager = SolverManager.create(...)) {
SolverJob<..., UUID> job = manager.solve(UUID.randomUUID(), inputSolution);
... solution = job.getFinalBestSolution();
}
I get a JVM that never terminates. The following conditions must be met in order for the bug to reproduce consistently:
- MoveThreadCount > 0; multi-threaded solving must be enabled.
- An exception is thrown from within a move.
If either condition is not met, the JVM will terminate properly.
When both conditions are met and the JVM hangs, the thread dump has the following properties:
- It does not contain the main thread.
- It shows OptaPool-3-MoveThread-1 stuck at at org.optaplanner.core.impl.heuristic.thread.MoveThreadRunner.run(MoveThreadRunner.java:80)
From this, I assume that the parallel solver fails to clean up its executors in case of abnormal termination.