[
https://issues.jboss.org/browse/JBRULES-3217?page=com.atlassian.jira.plug...
]
Mario Fusco resolved JBRULES-3217.
----------------------------------
Resolution: Done
Fixed by disposing stateful session created inside the stateless one after its execution.
Also avoid to create a ProcessRuntime twice.
Memory leak in stateless session when using
CommandFactory.newInsertElements()
------------------------------------------------------------------------------
Key: JBRULES-3217
URL:
https://issues.jboss.org/browse/JBRULES-3217
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Reporter: Mario Fusco
Assignee: Mario Fusco
Priority: Critical
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
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira