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

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

    XMLWordPrintable

Details

    • 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)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: