You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/04/14 10:43:33 UTC

DO NOT REPLY [Bug 49116] New: Memory leak by HttpSession.

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

           Summary: Memory leak by HttpSession.
           Product: Tomcat 6
           Version: 6.0.26
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: kfujino@apache.org


When session is stored in StandardManager#doUnload method, 
an invalid session is stored. 

For instance, 
If HttpSession#invalidate is executed while executing StandardManager#doUnload,
session of "isValid=false" is stored.

The session of isValid=false is restored in StandardManager#doLoad, 
and it registers in session map (sessions). 
However, no one can invalidate this session. 

If isValid is false, StandardSession#invalidate() and StandardSession#isValid()
can not expire session.
They are throws IllegalStateException or return immediately. 

Consequently, the session of isValid=false is never deleted from the session
map(sessions). 

I made a patch.
If session is already invalid, expire session to prevent memory leak.

Best Regards.
Keiichi.

-- 
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 49116] Memory leak by HttpSession.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49116

Keiichi Fujino <kf...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Keiichi Fujino <kf...@apache.org> 2010-05-10 04:42:59 EDT ---
This fix applied to 6.0, will be in 6.0.27 onwards.

-- 
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 49116] Memory leak by HttpSession.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49116

--- Comment #1 from Keiichi Fujino <kf...@apache.org> 2010-04-14 04:45:10 EDT ---
Created an attachment (id=25290)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25290)
If session is already invalid, expire session to prevent memory leak.

-- 
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 49116] Memory leak by HttpSession.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49116

--- Comment #2 from Keiichi Fujino <kf...@apache.org> 2010-04-14 04:57:53 EDT ---
Fixed in trunk and proposed for 6.0.x.

-- 
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org