David Tse created DROOLS-368:
--------------------------------
Summary: Memory leak mappedKnowledgeBaseListeners
Key: DROOLS-368
URL:
https://issues.jboss.org/browse/DROOLS-368
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 5.5.0.Final
Environment: Linex
Reporter: David Tse
Assignee: Mark Proctor
Priority: Critical
This leak is identified by getting a heap dump. Analysis of the heap dump by Eclipse MAT
puts org.drools.retoo.ReteooRuleBase as the prime suspect holding to 47.33% of the 870 MB
heap memory with org.drools.retoo.ReteooStatefulSession adding to the problem accounting
for an additional 5.25% of the memory leak.
Examination of the BRMS 5.5.0.Final source code indicates that SFT memory leaks are caused
by issues associated with 7 classes in the drools-core module of the community version
BRMS 5.5.0.Final. These classes are
• org.drools.impl.KnowledgeBaseImpl.java
• org.drools.impl.StatefulKnowledgeSession.java
• org.drools.retoo.ReteooStatefulSession which extends
org.drools.retoo.ReteooWorkingMemory.java which extends
org.drools.common.AbstractWorkingMemory.java
• org.drools.retoo.ReteooRuleBase.java which extends
org.drools.common.AbstractRuleBase.java
The code in the community version has cyclic dependency and these developed into dying
pointers.
1. org.drools.impl.KnowledgeBaseImpl$KnowledgeBaseEventListenerWrapper is holding a
reference to this (KnowledgeBaseImpl)
2. KnowledgeBaseImpl is holding a reference to RuleBase (ReteooRuleBase is the
implementation class)
3. ReteooRuleBase is holding a reference to
org.drools.impl.KnowledgeBaseImpl$KnowledgeBaseEventListenerWrapper
For the second leak, StatefulKnowledgeSessionImpl is holding a reference to
ReteooWorkingMemory. ReteooWorkingMemory is also holding a reference to
StatefulKnowledgeSessionImpl.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira