Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3217

Memory leak in stateless session when using CommandFactory.newInsertElements()

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • None
    • None
    • None
    • None

    Description

      Description of problem:
      There is a memory leak when calling an execute method on
      StatelessKnowledgeSession with list of Commands(facts). See the reproducer.

      According to heap dump, the
      org.drools.command.runtime.rule.InsertElementsCommand is holding references to
      facts even after the execute() method is finished.

      This is a regression from 5.1.0 GA.

      Version-Release number of selected component (if applicable):
      BRMS 5.2.0 ER3

      How reproducible:
      Always

      Steps to Reproduce:
      1. Run the attached reproducer with ER3 binaries on classpath.
      2. Look at stdout to see the raising heap used memory.

      Actual results:
      Heap used memory is raising.

      Expected results:
      Heap used memory is not raising. All unused object are collected.

      Additional info:
      When jBPM jars are not included in classpath, leak is away and memory usage in
      not raising.

      Memory leak does not occur when StatefulKnowledgeSession is used.

      Reported in bugzilla as: https://bugzilla.redhat.com/show_bug.cgi?id=734367

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            mfusco@redhat.com Mario Fusco
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty