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

Real-time planning: memory leak when calling addProblemFactChange(ProblemFactChange)

XMLWordPrintable

      When using Planner with DroolsScoreDirector, after each problem fact change, number of planning entity instances increases.

      Steps to reproduce:
      1. open cloud balance example with GUI, choose the largest input
      2. start solving the problem
      3. delete some of the listed computers - to make the fact change (for me, 5 computers in a 5 seconds are enough)
      4. take a heapdump (I used jmap -dump:live,file=... to enforce GC first)
      5. open visualvm or similar tool and look for the planning entity class
      6. repeat 3. - 5. several times, you should see increasing number of planning entity instances

      Also, there is a rule base holding sessions under the Planner API - and number of sessions also increases in time (these sessions reference to planning entity instances).

      Steps to reproduce:
      1. open the last heapdump in similar tool and look for ReteooRuleBase.
      2. the rule base holds ObjectHashSet with stateful sessions in its entries
      3. you should see a different number of these session in every heapdump taken in previous recipe

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            rsynek@redhat.com Radovan Synek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: