]
Farah Juma moved JBEAP-19628 to WFLY-13556:
-------------------------------------------
Project: WildFly (was: JBoss Enterprise Application Platform)
Key: WFLY-13556 (was: JBEAP-19628)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: JSF
(was: JSF)
Environment: (was: * JBoss EAP 7.2.3 (also JBoss EAP 7.1.6 that is the
latest version in 7.1.x is affected by this issue))
Affects Version/s: (was: 7.3.1.CR1)
QE Test Coverage: (was: +)
Fix Version/s: (was: 7.3.2.GA)
Memory leak in FlashScope - expired elements are not cleared
------------------------------------------------------------
Key: WFLY-13556
URL:
https://issues.redhat.com/browse/WFLY-13556
Project: WildFly
Issue Type: Bug
Components: JSF
Reporter: Farah Juma
Assignee: Bartosz Spyrko-Smietanko
Priority: Critical
Labels: regression
*This is a regression agains the 7.2.z stream.*
Objects in FlashScope is not cleared and keep accumulating even if POST-REDIRECT-BACK is
completed.
If we put a huge object to FlashScope continuously as the following code, Java heap space
will be exhausted soon.
{code:java}
@Model
public class Action {
private static final int oneHundredMB = 1024 * 1024 * 100;
public String next() {
Flash flash = FacesContext.getCurrentInstance().getExternalContext().getFlash();
flash.putNow("huge", new byte[oneHundredMB]);
return "index.xhtml?faces-redirect=true";
}
}
{code}
When OutOfMemoryError is happened, flashInnerMap field in
com.sun.faces.context.flash.ELFlash is bloated.
{noformat}
Class Name | Ref. Objects |
Shallow Heap | Ref. Shallow Heap | Retained Heap
-----------------------------------------------------------------------------------------------------------------------------------------
java.lang.Thread @ 0xeea24380 default task-1 Thread | 1 |
120 | 64 | 20,800
'- <Java Local> com.sun.faces.context.flash.ELFlash @ 0xee9e4608 |
1 | 40 | 64 | 64
'- flashInnerMap java.util.concurrent.ConcurrentHashMap @ 0xee9e4630| 1
| 64 | 64 | 314,574,048
-----------------------------------------------------------------------------------------------------------------------------------------
{noformat}