felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Paulin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-4627) Event Admin - Memory Leak in AsyncDeliverTasks
Date Tue, 02 Sep 2014 14:24:21 GMT

    [ 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)

Mime
View raw message