ThreadLocal caches for regexp in RubyString and joni cause classloader leaks in 
app servers
-------------------------------------------------------------------------------------------

                 Key: JRUBY-1941
                 URL: http://jira.codehaus.org/browse/JRUBY-1941
             Project: JRuby
          Issue Type: Bug
            Reporter: Charles Oliver Nutter
            Assignee: Marcin Mielzynski
            Priority: Blocker
             Fix For: JRuby 1.1


There are at least two caches, one in RubyString and one in Joni, that are 
static and thread-local. This causes the following problem:

* Threads from the app server thread pool come in and are adopted.
* The caches get associated with those threads
* The contents of the caches reference either Ruby objects (which reference the 
Ruby runtime) or reference objects of types loaded within the webapp 
classloader chain (directly leading to the webapp classloader itself)
* Because the pooled threads stay alive and directly reference objects that 
reference the runtime or classloader, everything leaks.

We must eliminate these hard references from long-lived threads to objects and 
classes that live only in the webapp.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to