commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From commons-...@jakarta.apache.org
Subject [jira] Updated: (JELLY-148) Huge memory leak resulting from the use of ThreadLocal
Date Sun, 19 Sep 2004 20:31:38 GMT
The following issue has been updated:

    Updater: Hans Gilde (mailto:hansgilde@earthlink.net)
       Date: Sun, 19 Sep 2004 1:31 PM
    Comment:
The simplest way to fix this problem is to prevent a Tag from holding a hard reference to
its body Script. Which this patch does.

But, the patch will break some stuff. It has an unfortunate side effect for Tags that want
to keep their body Script around after they execute. For instance, Swing action tags execute
their body as the action. If the Swing script is executed, then disposed of, the body script
won't be available when the action is executed.

However, the action Tag simply cannot be allowed to keep a hard reference to its body. If
it keeps the hard reference, it will be trapped in the ThreadLocal forever. Argh.

I'm trying to come up with a solution to this situation that doesn't horribly complicate things.
    Changes:
             Attachment changed to thread-local-memory-leak-fix-demo.txt
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/JELLY-148?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JELLY-148

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JELLY-148
    Summary: Huge memory leak resulting from the use of ThreadLocal
       Type: Bug

     Status: Unassigned
   Priority: Critical

    Project: jelly
 Components: 
             core / taglib.core
   Versions:
             1.0-beta-5

   Assignee: 
   Reporter: Hans Gilde

    Created: Sat, 18 Sep 2004 9:34 PM
    Updated: Sun, 19 Sep 2004 1:31 PM

Description:
There is a huge memory leak that results from the TagScript's use of ThreadLocal.

ThreadLocal is usually used from a staic variable, while TagScript uses it from an instance
variable. Although this looks legal to me, it causes a huge memory leak.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message