Bug 735807

Summary: Memory leak in org.drools.reteoo.ReteooStatefulSession
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Lukáš Petrovický <lpetrovi>
Component: BRE (Expert, Fusion)Assignee: Edson Tirelli <etirelli>
Status: CLOSED NOTABUG QA Contact: Lukáš Petrovický <lpetrovi>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: BRMS 5.2.0-ER1CC: brms-jira, etirelli, paradhya, pmacik, tschloss
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-19 13:34:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Lukáš Petrovický 2011-09-05 14:18:18 UTC
Duplicating SOA-3358 for BRMS.
Requesting to be a blocker for BRMS 5.2.

Comment 1 Edson Tirelli 2011-09-06 15:07:30 UTC
Hi all,

I am still setting up to reproduce the problem here, but just looking at the code, I am not seeing the class HeartBeatStatus being defined as an event anywhere (meaning it will not be automatically garbage collected) nor it is being manually retracted anywhere that I can see... 

The attached profiling reports raise suspicious on that due to the number of instances and retained size of "DefaultFactHandle" instances...

org.drools.common.DefaultFactHandle
First 10 of 426 907 objects	426 907	40 983 072	1 012 701 856

org.jboss.soa.esb.samples.quickstart.business_ruleservice_cep.status.HeartbeatStatus
First 10 of 213 451 objects	213 451	6 830 432	6 830 432


The events themselves seemed to be properly collected as there are only 99 remaining in memory:

org.jboss.soa.esb.samples.quickstart.business_ruleservice_cep.hub.Event
First 10 of 99 objects	99	3 960	3 960

While I finish setting up here, can you please clarify if HeartbeatStatus is supposed to be an event or not and if it is being retracted somewhere in the code that I am missing?

Thanks

Comment 2 Edson Tirelli 2011-09-06 16:23:30 UTC
PASTED FROM THE JIRA TICKET:
==================================
I am rejecting this issue as the test is not correct. For instance, it keeps inserting instances into the session without ever retracting them or declaring them as events for automatic garbage collection. E.g.: HeartBeatStatus should have a declaration like:

declare HeartBeatStatus
@role( event )
@expires( 30s )
end

Also, dward says this test is not ready to be included in SOA-P. From the SOA-P IRC channel:

<dward> etirelli: There's a few things wrong with that test, honestly. I had asked it not to be included in soa-p because it was just a start and imo, as well as jdelong's, it's not really a true cep test anyway. At least not yet.

If after fixing the problem you still detect problems, please reopen the ticket.

Comment 3 Prakash Aradhya 2011-09-09 02:43:33 UTC
It appears from the comments that it is not a valid test.  Please update the issue if the problem persists even after fixing the above issue with test.

Comment 4 Lukáš Petrovický 2011-09-19 13:34:49 UTC
Closing as the SOA test turned out not to be proper.