Bug 995017 - Memory leak: MarshallerReaderContext held indefinitely by ReteooStatefulSession
Memory leak: MarshallerReaderContext held indefinitely by ReteooStatefulSession
Status: VERIFIED
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion) (Show other bugs)
BRMS 5.3.1
Unspecified Unspecified
unspecified Severity unspecified
: GA
: ---
Assigned To: Mario Fusco
Petr Široký
:
Depends On:
Blocks: 986451
  Show dependency treegraph
 
Reported: 2013-08-08 08:12 EDT by Mario Fusco
Modified: 2013-09-13 11:44 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Simple Maven based reproducer (5.88 KB, application/zip)
2013-09-13 11:43 EDT, Petr Široký
no flags Details
Screenshot of VisualVM heap dump view comparing 5.3.1-P03 and P04 (153.53 KB, image/png)
2013-09-13 11:44 EDT, Petr Široký
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker DROOLS-35 Major Resolved Possible memory leak: MarshallerReaderContext held indefinitely by ReteooStatefulSession 2015-12-09 04:32 EST

  None (edit)
Description Mario Fusco 2013-08-08 08:12:31 EDT
After running some code like the code below, get a memory snapshot from the JVM. Note that it still holds a MarshallerReaderContext instance as a member of the ReteooStatefulSession instance.

-- Marshall/unmarshall code

//kBase = KnowledgeBaseFactory.newKnowledgeBase(...);
//kBase.addKnowledgePackages(kps);
//session = kBase.newStatefulKnowledgeSession(config, null);

//Insert some facts

// Marshall a session
Marshaller marshaller = MarshallerFactory.newMarshaller(session.getKnowledgeBase());
marshaller.marshall(bOut, session);
bOut.close();

// Restart the jvm if you like

// session = new session

//Unmarshall the session
Marshaller marshaller = MarshallerFactory.newMarshaller(session.getKnowledgeBase());

marshaller.unmarshall(bIn, session);
bIn.close();
Comment 2 Petr Široký 2013-09-13 11:41:47 EDT
Verified that the reference to MarshallerReaderContext is not held anymore.
Attaching screenshot from VisualVM that clearly shows it and also Maven based reproducer I used.
Comment 3 Petr Široký 2013-09-13 11:43:23 EDT
Created attachment 797401 [details]
Simple Maven based reproducer
Comment 4 Petr Široký 2013-09-13 11:44:11 EDT
Created attachment 797402 [details]
Screenshot of VisualVM heap dump view comparing 5.3.1-P03 and P04

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