Bug 995017 - Memory leak: MarshallerReaderContext held indefinitely by ReteooStatefulSession
Summary: Memory leak: MarshallerReaderContext held indefinitely by ReteooStatefulSession
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion)
Version: BRMS 5.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: ---
Assignee: Mario Fusco
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 986451
TreeView+ depends on / blocked
 
Reported: 2013-08-08 12:12 UTC by Mario Fusco
Modified: 2023-05-01 08:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
Simple Maven based reproducer (5.88 KB, application/zip)
2013-09-13 15:43 UTC, 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 15:44 UTC, Petr Široký
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker DROOLS-35 0 Major Resolved Possible memory leak: MarshallerReaderContext held indefinitely by ReteooStatefulSession 2015-12-09 09:32:49 UTC

Description Mario Fusco 2013-08-08 12:12:31 UTC
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 15:41:47 UTC
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 15:43:23 UTC
Created attachment 797401 [details]
Simple Maven based reproducer

Comment 4 Petr Široký 2013-09-13 15:44:11 UTC
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.