https://issues.apache.org/bugzilla/show_bug.cgi?id=46875

           Summary: CometConnectionManagerValve: concurrent access on
                    session object when calling HttpSession.invalidate()
           Product: Tomcat 6
           Version: 6.0.18
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: holger.sch...@tsi-mms.de


When calling invalidate() on an valid HttpSession object
CometConnectionManagerValve methods sessionDestroy(HttpSessionEvent se) and
event(Request request, Response response, CometEvent event) are called
concurrently.

So either a CometEvent with EventType.END and EventSubType.SESSION_END is never
signaled via sessionDestroyed(...) or the HttpSession object has become invalid
and the attribute holding comet requests can not be set or removed via
event(...).

I have configured CometConnectionManagerValve as a Valve element in context.xml
and also as a Listener element in my applications web.xml.



see this stacktrace 'sessionDestroy() was a bit faster':

An exception or error occurred in the container during the request processing
java.lang.IllegalStateException: removeAttribute: Session already invalidated
    at
org.apache.catalina.session.StandardSession.removeAttribute(StandardSession.java:1206)
    at
org.apache.catalina.session.StandardSession.removeAttribute(StandardSession.java:1181)
    at
org.apache.catalina.session.StandardSessionFacade.removeAttribute(StandardSessionFacade.java:140)
    at
org.apache.catalina.valves.CometConnectionManagerValve.event(CometConnectionManagerValve.java:335)
    at
org.apache.catalina.core.StandardHostValve.event(StandardHostValve.java:179)
    at org.apache.catalina.valves.ValveBase.event(ValveBase.java:200)
    at
org.apache.catalina.core.StandardEngineValve.event(StandardEngineValve.java:128)
    at
org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:198)
    at
org.apache.coyote.http11.Http11NioProcessor.event(Http11NioProcessor.java:750)
    at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.event(Http11NioProtocol.java:653)
    at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2081)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:637)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to