Key: KERN-1185
URL: http://jira.sakaiproject.org/browse/KERN-1185
Project: Nakamura
Issue Type: Bug
Components: System - other
Affects Versions: 0.8
Reporter: Ian Boston
Fix For: 0.9
04.10.2010 21:35:02.078 *WARN* [Finalizer] org.apache.jackrabbit.core.SessionImpl Unclosed session detected. The session was opened here: java.lang.Exception: Stack Trace
at org.apache.jackrabbit.core.SessionImpl.<init>(SessionImpl.java:237)
at org.apache.jackrabbit.core.SystemSession.<init>(SystemSession.java:76)
at org.apache.jackrabbit.core.SystemSession.create(SystemSession.java:64)
at org.apache.jackrabbit.core.DynamicSecurityManager.getAccessControlProvider(DynamicSecurityManager.java:566)
at org.apache.jackrabbit.core.DynamicSecurityManager.getAccessManager(DynamicSecurityManager.java:274)
at org.apache.jackrabbit.core.SessionImpl.createAccessManager(SessionImpl.java:373)
at org.apache.jackrabbit.core.SessionImpl.<init>(SessionImpl.java:290)
at org.apache.jackrabbit.core.SessionImpl.<init>(SessionImpl.java:259)
at org.apache.jackrabbit.core.XASessionImpl.<init>(XASessionImpl.java:107)
at org.apache.jackrabbit.core.RepositoryImpl.createSessionInstance(RepositoryImpl.java:1602)
at org.apache.jackrabbit.core.RepositoryImpl.createSession(RepositoryImpl.java:1010)
at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1500)
at org.apache.sling.jcr.base.AbstractSlingRepository.login(AbstractSlingRepository.java:214)
at org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl.getResourceResolverInternal(JcrResourceResolverFactoryImpl.java:291)
at org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl.getResourceResolver(JcrResourceResolverFactoryImpl.java:262)
at org.apache.sling.auth.core.impl.SlingAuthenticator.getResolver(SlingAuthenticator.java:651)
at org.apache.sling.auth.core.impl.SlingAuthenticator.handleSecurity(SlingAuthenticator.java:402)
at org.apache.sling.engine.impl.SlingMainServlet.handleSecurity(SlingMainServlet.java:846)
at org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:62)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:111)
at org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:64)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.sakaiproject.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Ian Boston reassigned KERN-1185:
--------------------------------
Assignee: Ian Boston
> Unclosed session detected stack trace
> -------------------------------------
>
> Key: KERN-1185
> URL: http://jira.sakaiproject.org/browse/KERN-1185
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Ian Boston
> Assignee: Ian Boston
Ian Boston resolved KERN-1185.
------------------------------
Resolution: Non-Issue
This is normal behaviour.
The session was created when a Security Manager was created on the thread.
The session remains bound to the thread for its lifetime and normally gets closed and cleaned if the AccessControlProviderHolder allocates a session - thread binding at which time it scans for dead threads.
If there has been no server activity for 12h and the thread is GC'd before a new allocation is made this exception will be reported. Although this may appear in the logs, we want the exception to remain as its an indicator to developers that they have opened a session and not closed it. This exception will not normally be seen in these circumstances as its very unlikely that there will be no requests between a request thread finishing and the GC getting to the session.
If it becomes really annoying, we could put a timer thread in place to clean the session - thread binding in the AccessControlProviderHolder but its a waste of resources at the moment to do so.
> Unclosed session detected stack trace
> -------------------------------------
>
> Key: KERN-1185
> URL: http://jira.sakaiproject.org/browse/KERN-1185
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Ian Boston
> Assignee: Ian Boston