Bug 910308 - Memory leak for RequestScoped, SessionScoped, and ViewScoped managed-beans
Summary: Memory leak for RequestScoped, SessionScoped, and ViewScoped managed-beans
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: PortletBridge
Version: 6.0.x
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
: 6.1.0
Assignee: hfnukal@redhat.com
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 948826
TreeView+ depends on / blocked
 
Reported: 2013-02-12 09:50 UTC by Petr Mensik
Modified: 2015-07-20 01:00 UTC (History)
6 users (show)

Fixed In Version: Portlet Bridge v3.2.0.CR1
Clone Of:
: 948826 (view as bug list)
Environment:
Last Closed: 2013-11-07 14:22:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Mensik 2013-02-12 09:50:00 UTC
Steps to reproduce

1. Start JPP
2. Deploy JSF2 jsf2portlet (or any other portlet using Session, View or Request Scoped beans) to JPP
3. Add portlet to some page
4. Go to that page
5. Run VisualVM and connect to JPP process, go to Head Dump, target bean should be visible there
6. Wait for session expiration
7. Perform Garbage collection
8. Bean still hangs in memory

Useful links

Same issue reported in Liferay - http://issues.liferay.com/browse/FACES-1470
Related issue with @PreDestroy lifecycle event - https://issues.jboss.org/browse/JBPAPP-10496

I am also adding comment from Ken Finnigan

Basically it's a problem of EAP creating its own listener hooks for
the JSF lifecycle, which means that JSF doesn't have a handle to the
objects to correctly clean them up, so they linger in memory.

The issue was originally discovered in JSF 2.1.16, and fixes are in
2.1.18 to resolve the JSF side but alterations to PBR are also
needed to make it work.

To my knowledge, it hasn't been verified to be a problem prior to
2.1.16, as it was raised with that version and view scoped beans.

Thomas is correct that that version of JSF is only expected in EAP
6.1 and higher.

Comment 1 Stan Silvert 2013-03-14 15:28:41 UTC
EAP 6.1 has been upgraded to JSF 2.1.19.  So the JSF side of the issue should be fixed.

Comment 2 Ken Finnigan 2013-03-20 18:27:57 UTC
If JPP 6.1 is based on EAP 6.1, then no JSF update is required (as per Stan's previous comment).

However, if JPP 6.1 will continue to be based off EAP 6.0.1, then we will also need to include the patch for EAP to upgrade JSF to 2.1.19

Comment 5 Petr Mensik 2013-06-27 11:37:10 UTC
I've tried to test this leak in JPP 6.1.ER01 and the issue still persists. I didn't modify WAR file of the jsf2-hello-world-portlet in any way except adding the session timeout.

Comment 6 Petr Mensik 2013-07-04 10:41:02 UTC
Memory leak issue seems to be gone in ER02, beans are correctly garbage collected after session timeout.

Comment 10 Jared MORGAN 2013-10-10 00:16:47 UTC
Hi Ken

Just made the required changes to the RN for this issue to upgrade it to a Bug Fix from a Known Issue.

Cheers

Jared

Comment 11 Jared MORGAN 2013-10-13 20:37:39 UTC
According to Comment#34 in BZ#991844 by Dominik, this issue does not require a release note. Zeroing out the Release Note fields and flags.


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