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

Thread leak after terminating a SolverJob

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • 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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: