[ 
https://issues.apache.org/jira/browse/DOSGI-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Amichai Rothman updated DOSGI-210:
----------------------------------

    Summary: Service registration and memory leaks  (was: Service registration 
and memory leak)

> Service registration and memory leaks
> -------------------------------------
>
>                 Key: DOSGI-210
>                 URL: https://issues.apache.org/jira/browse/DOSGI-210
>             Project: CXF Distributed OSGi
>          Issue Type: Bug
>          Components: Discovery
>    Affects Versions: 1.5.0, 1.6.0
>            Reporter: Amichai Rothman
>            Assignee: Amichai Rothman
>             Fix For: 1.6.0
>
>
> While doing some memory profiling on a custom application using DOSGi, I 
> noticed after a while there were many existing ZooKeeper instances, with 
> their references being held by multiple registered 
> PublishingEndpointListenerFactory services and some LocalDiscovery references 
> too. Further investigation found several issues:
> 1. PublishingEndpointListenerFactory was registered as a service when 
> started, but did not unregister the service when stopped (the bundle itself 
> does not get deactivated, so there's no automatic unregistering).
> 2. ZookeeperDiscovery was re-creating a new instance of 
> PublishingEndpointListenerFactory (and the rest of its implementation 
> classes, registrations, etc.) whenever it received a ZooKeeper SyncConnected 
> event, however these can be received more than once in a row (e.g. with a 
> unhandled Disconnected event in between), thus leaking copies of everything 
> it initializes.
> 3. LocalDiscovery was missing synchronization code, and also had a little 
> memory leak (filter strings of removed endpoint listeners were never removed 
> from its internal data structures).
> All issues are now fixed, and these memory/service leaks no longer occur.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to