cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amichai Rothman (JIRA)" <>
Subject [jira] [Resolved] (DOSGI-210) Service registration and memory leaks
Date Sun, 08 Dec 2013 17:26:35 GMT


Amichai Rothman resolved DOSGI-210.

    Resolution: Fixed

> Service registration and memory leaks
> -------------------------------------
>                 Key: DOSGI-210
>                 URL:
>             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

View raw message