You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Baptiste Onofré (Jira)" <ji...@apache.org> on 2020/10/08 13:17:00 UTC

[jira] [Assigned] (KARAF-6792) Memory leak when restarting bundle with service bound to a command

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

Jean-Baptiste Onofré reassigned KARAF-6792:
-------------------------------------------

    Assignee:     (was: Jean-Baptiste Onofré)

> Memory leak when restarting bundle with service bound to a command
> ------------------------------------------------------------------
>
>                 Key: KARAF-6792
>                 URL: https://issues.apache.org/jira/browse/KARAF-6792
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.2.8
>         Environment: Karaf 4.2.8
> openjdk 11.0.7 2020-04-14
>            Reporter: ggirard07
>            Priority: Major
>         Attachments: image-2020-07-17-11-21-21-301.png, image-2020-07-17-11-23-00-615.png
>
>
> Code to reproduce the issue available at [https://github.com/ggirard07/karaf-command-service-leak]
> When restarting a bundle containing a command with a bound service with @Reference annotation, the previous service instance is being leaked because the command instance keep the object alive.
> Trying to reproduce the issue might take multiple restarts as the reproduction sample seems to be leaking at a frequency of 2/3 based on my testing.
> *Steps to reproduce*
>  # Install the bundle built from reproduction sample
>  # Inspect MyServiceImpl instances in VisualVM
>  # Restart the bundle with bundle:restart bundleId
>  # Inspect MyServiceImpl instances in VisualVM
> *Expected result*
> A single instance of the MyServiceImpl singleton exist at all time.
> *Actual result*
> The old MyServiceImpl instance is leaked and 2 instances of the service singleton coexists.
> !image-2020-07-17-11-23-00-615.png!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)