History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: UP-1125
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Faizan Ahmed
Reporter: Faizan Ahmed
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
uPortal

memory leak happens under stress when CPortletAdapter portlets are asked to clean themselves up when the session ends.

Created: 27/May/05 11:36 AM   Updated: 03/Jul/07 04:11 PM
Component/s: Portlet Container
Affects Version/s: 2.5.0 RC1, 2.5.0 RC3, 2.5.0 RC2, 2.5.0 GA
Fix Version/s: 2.6.0 M1, 2.5.1 RC1

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Issue Links:
Duplicate
This issue duplicates:
UP-1119 memory leak happens under stress when... Major Closed
 
Generic Relation
This issue relates to:
UP-1134 Track user state in such a way to all... Major Closed
 


 Description  « Hide
 memory leak happens under stress when CPortletAdapter portlets are asked to clean themselves up when the session ends.

It looks like when the PortletStateManager is asked to clear the window state for a particular session, that session cannot be obtained due to the response already being committed. And since this exception is thrown, the subsequent cleaning of the static channelStateMap Map does not happen, which results in a memory leak.

Following is the error message

ERROR [http-8080-Processor128] portal.ChannelManager.[] Jan/20 22:12:53 -
Error sending session done event to channel
org.jasig.portal.MultithreadedPrivilegedCacheableDirectResponseCharacterChan
nelAdapter@1f91311

java.lang.IllegalStateException: Cannot create a session after the response
has been committed

at
org.apache.coyote.tomcat5.CoyoteRequest.doGetSession(CoyoteRequest.java:2270
)

at
org.apache.coyote.tomcat5.CoyoteRequest.getSession(CoyoteRequest.java:2116)

at
org.apache.coyote.tomcat5.CoyoteRequestFacade.getSession(CoyoteRequestFacade
.java:526)

at
org.apache.coyote.tomcat5.CoyoteRequestFacade.getSession(CoyoteRequestFacade
.java:531)

at
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWr
apper.java:223)

at
org.jasig.portal.container.services.information.PortletStateManager.clearSta
te(PortletStateManager.java:370)

at
org.jasig.portal.channels.portlet.CPortletAdapter.receiveEvent(CPortletAdapt
er.java:342)

at
org.jasig.portal.MultithreadedCharacterChannelAdapter.receiveEvent(Multithre
adedCharacterChannelAdapter.java:62)

at
org.jasig.portal.ChannelManager.finishedSession(ChannelManager.java:269)

at
org.jasig.portal.UserInstance.valueUnbound(UserInstance.java:676)

at
org.apache.catalina.session.StandardSession.removeAttributeInternal(Standard
Session.java:1566)

at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:708)

at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:632)

at
org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:
1051)

at
org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSession
Facade.java:149)

at org.jasig.portal.LogoutServlet.doGet(LogoutServlet.java:142)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:237)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)

at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:198)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:152)

at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
)

at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117
)

at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)

at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)

at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:705)

at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)

at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)

at java.lang.Thread.run(Thread.java:534)

 All   Comments   Work Log   Change History      Sort Order:
Faizan Ahmed [27/May/05 11:37 AM]
The code in the portal_rel-2-4-patches (For the CportletAdapter and PortletStateManager) is at a different state than the code in the portal_rel-2-5-patches and in the head. Because of this reason I created this issue separatly.

Eric Dalquist [27/May/05 02:17 PM]
I am working with UW on making portions of the uPortal framework work correctly with session replication. Their focus is on portlets. In this work we have re-written how PortletStateManager tracks PortletMode and WindowState data for PortletWindow objects. We are now tracking it in the user's session. This should resolve both the threading issue and possible memory leak.

Eric Dalquist [06/Jun/05 08:19 PM]
The fix for UP-1134 resolves this issue

Eric Dalquist [06/Jun/05 08:19 PM]
Fix for UP-1134 resolves this issue