felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Pauls (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIX-1170) MemoryLeak when stopping and restarting Felix
Date Fri, 22 May 2009 16:02:45 GMT

    [ https://issues.apache.org/jira/browse/FELIX-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712145#action_12712145
] 

Karl Pauls commented on FELIX-1170:
-----------------------------------

Your patch makes sense to me. Thanks. I will look into applying it soon. 

> MemoryLeak when stopping and restarting Felix
> ---------------------------------------------
>
>                 Key: FELIX-1170
>                 URL: https://issues.apache.org/jira/browse/FELIX-1170
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.2.1

>         Environment: Atlassian JIRA
>            Reporter: Jed Wesley-Smith
>            Assignee: Karl Pauls
>         Attachments: BundleProtectionDomain.java.FELIX-1170.patch
>
>
> There is a memory leak caused by a strong reference from the BundleProtectionDomain to
a bundle and Felix.
> The problem is that a URLClassLoader gets its AccessControlContext from the stack - AccessController.getContext()
calls AccessController.getStackAccessControlContext() which is basically arbitrary at the
time.
> In our case we have a ServletFilter plugin that is being loaded by Felix. When a JasperLoader
(a URLClassLoader) is created to load a JSP it inherits the BundleProtectionDomain as part
of its AccessControlContext. If we later shut down Felix, it cannot be GC'd due to this reference.
> For our purposes we have tested making the m_felix and m_bundle weak references and have
verified that it does indeed fix the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message