Bug 734367
Summary: | Memory leak in stateless session when using CommandFactory.newInsertElements() | ||||||
---|---|---|---|---|---|---|---|
Product: | [JBoss] JBoss Enterprise BRMS Platform 5 | Reporter: | Petr Široký <psiroky> | ||||
Component: | BRE (Expert, Fusion) | Assignee: | Nobody <nobody> | ||||
Status: | CLOSED UPSTREAM | QA Contact: | |||||
Severity: | urgent | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | BRMS 5.2.0.GA | CC: | alazarot, ldimaggi | ||||
Target Milestone: | --- | ||||||
Target Release: | BRMS 5.2.0.GA | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2025-02-10 03:14:11 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: | |||||
Embargoed: | |||||||
Attachments: |
|
Mario Fusco has fix this issue and committed also to the 5.2.x branch. Please test. Verified fixed in 5.2.0 ER4. As this is the first time jbpm will be included with BRMS I have marked this issue as not requiring a release note. A memory leak related to this issue can still happen. To see it you should change in the test attached the ksession.execute(commands) to ksession.execute(CommandFactory.newBatchExecution(commands)) I created a new pull request about it: https://github.com/droolsjbpm/drools/pull/94 If it's ok, please merge it on branch 5.3.x and upstream. Alessandro Lazarotti <alazarot> updated the status of jira JBRULES-3217 to Reopened Alessandro Lazarotti <alazarot> made a comment on jira JBRULES-3217 A memory leak related to this issue can still happen. To see it you should change in the test attached the ksession.execute(commands) to ksession.execute(CommandFactory.newBatchExecution(commands)) I created a new pull request about it: https://github.com/droolsjbpm/drools/pull/94 If it's ok, please merge it on branch 5.3.x and upstream. Alessandro Lazarotti <alazarot> made a comment on jira JBRULES-3217 The test is attached at https://bugzilla.redhat.com/show_bug.cgi?id=734367 Mario Fusco <mario.fusco> updated the status of jira JBRULES-3217 to Resolved Mario Fusco <mario.fusco> made a comment on jira JBRULES-3217 The current fix is enough and no other memory leaks can actually be reproduced on both 5.3.x and master. This product has been discontinued or is no longer tracked in Red Hat Bugzilla. |
Created attachment 520553 [details] Simple reproducer. 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.