Bug 724787 (BRMS-626) - Memory leak in KnowledgeBase
Summary: Memory leak in KnowledgeBase
Keywords:
Status: VERIFIED
Alias: BRMS-626
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion)
Version: BRMS 5.2.0-Dev1
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: BRMS 5.2.0.GA
Assignee: Nobody
QA Contact: Lukáš Petrovický
URL: http://jira.jboss.org/jira/browse/BRM...
Whiteboard:
Depends On: BRMS-644
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-12 06:23 UTC by Tomas Schlosser
Modified: 2022-05-31 22:28 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-20 01:08:55 UTC
Type: Bug


Attachments (Terms of Use)
memleak.zip (1.68 KB, application/zip)
2011-07-12 06:25 UTC, Tomas Schlosser
no flags Details
brms-532.png (76.61 KB, image/png)
2011-07-20 06:05 UTC, Tomas Schlosser
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker BRMS-626 0 Critical Closed Memory leak in KnowledgeBase 2016-10-14 14:45:59 UTC

Description Tomas Schlosser 2011-07-12 06:23:27 UTC
securitylevel_name: Public

When using multiple StatefulKnowledgeSessions created from one KnowledgeBase the used memory keeps growing never being freed although method dispose() is called every time the session is not needed anymore. When creating new KnowledgeBase every time the problem disappears.

Doesn't occur in Drools 5.2.0.Final nor BRMS 5.1 but all the DEV builds of BRMS 5.2

Comment 1 Tomas Schlosser 2011-07-12 06:25:50 UTC
BRMS 5.1, Drools 5.2 - used memory is bellow 400MB all the time
BRMS 5.2 DEV - used memory grows until hit max memory and throws OOME

Comment 2 Tomas Schlosser 2011-07-12 06:25:50 UTC
Attachment: Added: memleak.zip


Comment 3 Anne-Louise Tangring 2011-07-19 18:47:59 UTC
Ryan, I believe you picked up Drools 5.2 for this build. If you could mark this as resolved and we'll let it go to QE for retest, I'd appreciate it.

Comment 4 Ryan Zhang 2011-07-20 01:08:55 UTC
This should be resolved in BRMS 5.2.0 ER1. Please have a check.

Comment 5 Tomas Schlosser 2011-07-20 05:59:28 UTC
Unfortunately the problem persists. I'll include memory usage chart.

Comment 6 Tomas Schlosser 2011-07-20 06:05:16 UTC
The chart shows memory usage over time. The test creates one knowledge base that is used to create new knowledge sessions. For first 30k test runs new stateful knowledge session is created for every test run (and properly disposed in finally block) next 30k runs new stateful knowledge session is created for every thread (= 100 sessions).

Comment 7 Tomas Schlosser 2011-07-20 06:05:16 UTC
Attachment: Added: brms-532.png


Comment 8 Tomas Schlosser 2011-07-20 07:43:52 UTC
I just did a little more testing and it seems that jbpm*.jar are causing the problem. I tried removing them for testing other bug and this problem was resolved. 

Comment 9 Tomas Schlosser 2011-07-20 08:22:13 UTC
Link: Added: This issue is incorporated by BRMS-644


Comment 10 Ryan Zhang 2011-07-20 08:35:20 UTC
I would tidy up the brms-engine binaries folder as BRMS-644 suggested, it should be fixed in the next release.

Comment 11 Ryan Zhang 2011-08-05 02:56:07 UTC
For fixing Bug 727562  - Missing Drools Flow , jbpm-flow and jbpm-flow-build are still needed to be included.
So this issue might still remain and need further investigation.

Comment 12 Ryan Zhang 2011-08-16 10:08:07 UTC
Could we retest this issue since many jars in binary folder has been cleaned up?

Comment 13 Petr Široký 2011-08-16 14:34:44 UTC
Still present in 5.2.0 ER2. When the jbpm-flow-5.1.1.SOA.ER2.jar and jbpm-flow-builder-5.1.1.SOA.ER2.jar are on classpath the memory consumption is raising until the OOME is thrown.

Comment 14 Tihomir Surdilovic 2011-08-16 17:06:04 UTC
Fix checked into drools-core 5.2.x branch as well as jbpm 5.1.x branch

Comment 15 lcarlon 2011-08-18 06:08:58 UTC
Marked as not needing a release as this issue appears to be between internal dev builds.

If it should have a release note, please set the technical_not flag to '?'

thanks
- Lee

Comment 16 lcarlon 2011-08-18 06:29:34 UTC
Sorry, still getting used to BZ, it looks like I (somehow) changed the component from BRE to 3rd party when I set the technical note flag. 

Changing it back - sorry.

Lee

Comment 17 Lukáš Petrovický 2011-08-26 12:11:47 UTC
Petr, please verify that this bug no longer affects our performance tests.

Comment 18 Petr Široký 2011-08-30 08:27:56 UTC
Verified fixed for StatefulKnowledgeSession in 5.2.0 ER3.


Note You need to log in before you can comment on or make changes to this bug.