Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-2708

Thread leak after terminating a SolverJob

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 8.22.0.Final
    • 8.17.0.Final, 8.18.0.Final, 8.19.0.Final, 8.20.0.Final
    • optaplanner-core
    • None
    • 2022 Week 17-19 (from Apr 25)
    • NEW
    • NEW

      The SolverManager delegates disposing of consumer threads to the SolverJob.close() method, as the SolverJob owns the consumer thread.

      However, when a Solver terminates, the SolverJob is deregistered from the SolverManager and, as a result, SolverManager.close() does not call SolverJob.close() to properly dispose of the consumer thread.

      Even if the SolverJob.close() was called from the SolverManager.close(), the SolverManager may run over a long period of time and the number of consumer threads would still grow. The `SolverJob.close()` must be called also right after the last best solution is consumed.

              rsynek@redhat.com Radovan Synek (Inactive)
              rsynek@redhat.com Radovan Synek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: