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

Memory leak in RuleBaseEventSupport.listeners when loading StatefulKnowledgeSession - Test Attached

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 5.4.0.CR1
    • 5.3.0.Final
    • drools-core (flow)
    • None
    • Hide

      Run the attached unit test, it starts 100 process instances, each process has 1 workitem which runs asynchronously. The workitem is then completed by using JPAKnowledgeService.loadStatefulKnowledgeSession after 1 second. Once all 100 processes have completed 100 ReteooStatefulKnowledge sessions are kept alive and there are 100 entries in RuleBaseEventSupport.listeners (AbstractEventSupport.listeners)

      Show
      Run the attached unit test, it starts 100 process instances, each process has 1 workitem which runs asynchronously. The workitem is then completed by using JPAKnowledgeService.loadStatefulKnowledgeSession after 1 second. Once all 100 processes have completed 100 ReteooStatefulKnowledge sessions are kept alive and there are 100 entries in RuleBaseEventSupport.listeners (AbstractEventSupport.listeners)

    Description

      When loading a Drools Flow StatefulKnowledgeSession with JPAKnowledgeService.loadStatefulKnowledgeSession, AbstractEventSupport.listeners has 2 listeners added to it. When the StatefulKnowledgeSession is disposed() only 1 of the listeners is removed. In the attached test this causes 100 ReteooStatefulSession objects to stay alive.

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            gchrystall Greg Chrystall (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty