Bug 995017 - Memory leak: MarshallerReaderContext held indefinitely by ReteooStatefulSession
Summary: Memory leak: MarshallerReaderContext held indefinitely by ReteooStatefulSession
Keywords:
Status: CLOSED UPSTREAM
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: 2025-02-10 03:28 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 03:28:16 UTC
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

Comment 7 Red Hat Bugzilla 2025-02-10 03:28:16 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


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