Memory leak caused by uncleaned JCR sessions in some HTTP requests
------------------------------------------------------------------
Key: GTNPORTAL-852
URL:
https://jira.jboss.org/jira/browse/GTNPORTAL-852
Project: GateIn Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Performance
Environment: GateIn trunk (revision 2014) deployed on EAP5
Sun JDK 1.6
Reporter: Marek Posolda
Fix For: 3.0.0-GA
In some HTTP requests sent to GateIn portal can be seen situation, where method class
org.exoplatform.services.jcr.impl.core.SessionRegistry.registerSession(SessionImpl
session) is called 2-times but method unregisterSession of same class is called only one
time in particular HTTP request. So only second used JCR session is unregistered but the
first session remains in private map "sessionsMap". So final result is, that
there is one new item in sessionsMap for special HTTP request.
I founded that these HTTP requests can cause problems:
- HTTP request used to login any user into GateIn portal (triggered by click to "Sign
in" button)
- HTTP request to show dashboard of user root (
http://localhost:8080/portal/private/classic/Tab_0 )
At least these two types of HTTP request can be used to simulate the issue.
I founded the possible cause of problem in class
org.exoplatform.commons.chromattic.Synchronization in method loggedIn:
public void loggedIn(Session session)
{
repositorySessions.put(session.getWorkspace().getName(), session);
}
If this method is called 2-times during single HTTP request, than new session simply
rewrite old session (if workspace name is "portal-system" in both cases). So in
RequestLifeCycle.end is cleared only the last session.
Another thing is, that org.exoplatform.services.jcr.impl.core.SessionRegistry can use
helper thread called "SessionCleaner" which can clean timeouted JCR sessions.
But SessionCleaner is actually unused (timeout is configured with value 0 in
sessionRegistry)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira