You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Bob Paulin (JIRA)" <ji...@apache.org> on 2014/09/02 16:24:21 UTC

[jira] [Commented] (FELIX-4627) Event Admin - Memory Leak in AsyncDeliverTasks

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

Bob Paulin commented on FELIX-4627:
-----------------------------------

Thanks for catching that use case.  Since there's no locking on the null check this makes sense.  With that addition I think we can remove the put that's outside of the synchronized block. This will prevent an additional put that occurs when the remove is executed before the next send request checks the running threads map for null (outside the synchronized block).  I've attached another patch.

> Event Admin - Memory Leak in AsyncDeliverTasks
> ----------------------------------------------
>
>                 Key: FELIX-4627
>                 URL: https://issues.apache.org/jira/browse/FELIX-4627
>             Project: Felix
>          Issue Type: Bug
>          Components: Event Admin
>    Affects Versions: eventadmin-1.4.0
>            Reporter: Bob Paulin
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: eventadmin-1.4.2
>
>         Attachments: FELIX-4627.patch, FELIX-4627b.patch
>
>
> Currently the AsyncDeliverTasks has a Map that tracks running threads (essentially a ThreadLocal like implementation).  As new threads post async events this list will continue to grow and is never cleared out.  Over time this will create a slow memory leak.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)