karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ggirard07 (Jira)" <j...@apache.org>
Subject [jira] [Updated] (KARAF-6792) Memory leak when restarting bundle with service bound to a command
Date Fri, 17 Jul 2020 15:24:00 GMT

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

ggirard07 updated KARAF-6792:
-----------------------------
    Description: 
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!

  was:
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.


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

Mime
View raw message