You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Amichai Rothman (JIRA)" <ji...@apache.org> on 2013/12/08 18:26:35 UTC

[jira] [Resolved] (DOSGI-210) Service registration and memory leaks

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

Amichai Rothman resolved DOSGI-210.
-----------------------------------

    Resolution: Fixed

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