Bug 724238 (BRMS-182)

Summary: Memory leak on queries (regression)
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: nwallace <nwallace>
Component: unspecifiedAssignee: Edson Tirelli <ed.tirelli>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: high    
Version: unspecified   
Target Milestone: ---   
Target Release: 5.0.1   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/BRMS-182
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-01 12:29:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description nwallace 2009-07-07 15:31:40 UTC
Date of First Response: 2009-09-10 01:39:37
securitylevel_name: Public

A leak was found when a rulebase contained 2 or more queries on it.

Comment 1 nwallace 2009-07-07 15:32:48 UTC
Link: Added: This issue is related to JBRULES-2091


Comment 2 nwallace 2009-09-01 12:29:41 UTC
Fix in place.

Comment 3 David Le Sage 2009-09-10 05:39:37 UTC
For documenting this in the Release Notes, can you please confirm the following and fill in the missing information. Dot point explanations are fine:

The CAUSE (what was actually broken)
 *  This was a regression bug caused by a problem with the offset calculation algorithm for "temporal reasoning."

CONSEQUENCES of the bug (how it impacts users.)
 * A memory leak was occurring when rulebases containing two or more queries were run. 

The FIX (what was changed to eliminate this bug) and 
 *

RESULTS of the fix (what now happens for users.)
 * 

Comment 4 David Le Sage 2009-09-23 05:43:43 UTC
We are still awaiting the outstanding information for the Release Notes on this one.  Please provide it as soon as possible. Thanks.

Comment 5 Edson Tirelli 2009-09-23 13:22:11 UTC
The CAUSE (what was actually broken)
 * Drools uses special facts to execute queries. These facts should not be tracked by the "temporal reasoning" algorithm, but due to a regression they were.

CONSEQUENCES of the bug (how it impacts users.)
 * Tracking Query facts means they were kept in memory longer than necessary, causing a memory leak when the knowledge base contained two or more queries.

The FIX (what was changed to eliminate this bug) and
 * Fixed the temporal reasoning algorithm to not track query facts. Also added a special FactType for queries to avoid regressions in the future.

RESULTS of the fix (what now happens for users.)
 * Memory leak is fixed.

Comment 6 Dana Mison 2009-10-05 08:56:34 UTC
added to the 5.0.CP01 release notes as resolved:

JBRULES-2091
 Memory leaks could occur when the KnowledgeBase contained more than one query. This was caused by the facts being incorrectly tracked. This has been fixed.