<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:55:51 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[CONTROLLER-1559] Memory leak during bundle tree restart</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-1559</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;The references to service providers are not removed from memory on blueprint containers&apos; restart. This produces a memory leak on each bundle tree restart (e.g. initiated by a change in *.cfg configs).&lt;br/&gt;
Example of a provider reference chain left in memory after restart is in the attachement.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="26113">CONTROLLER-1559</key>
            <summary>Memory leak during bundle tree restart</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="adetalhouet">Alexis de Talhou&#235;t</assignee>
                                    <reporter username="mdindoffer">Martin Dindoffer</reporter>
                        <labels>
                    </labels>
                <created>Tue, 18 Oct 2016 12:55:30 +0000</created>
                <updated>Tue, 25 Jul 2023 08:24:14 +0000</updated>
                            <resolved>Thu, 17 Nov 2016 13:43:55 +0000</resolved>
                                                                    <component>blueprint</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="51593" author="mdindoffer" created="Tue, 18 Oct 2016 12:55:30 +0000"  >&lt;p&gt;Attachment file_6969.txt has been added with description: Example of a provider leak reference chain&lt;/p&gt;</comment>
                            <comment id="51589" author="adetalhouet" created="Sat, 12 Nov 2016 17:42:02 +0000"  >&lt;p&gt;Martin, could you try this fix please: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/48284/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/48284/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="51594" author="mdindoffer" created="Sun, 13 Nov 2016 18:07:49 +0000"  >&lt;p&gt;Attachment topoChain.txt has been added with description: Path to the GC roots of a leaked TopoProcessingProviderImpl after a proposed fix&lt;/p&gt;</comment>
                            <comment id="51590" author="mdindoffer" created="Sun, 13 Nov 2016 18:08:39 +0000"  >&lt;p&gt;@Alexis&lt;br/&gt;
This actually seems to make the problem even worse on current Topoprocessing master (546d29e92f78a97419eff784b863f9a39b0dbcbf). Now, after 2 restarts and a GC, I have 7 instances of TopoProcessingProviderImpl in memory. Is this related to the (not merged yet) patch of yours in topoprocessing &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;?&lt;br/&gt;
Anyway, I&apos;ve attached a full path to GC roots of a leaked provider with the provided fix.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/48283/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/48283/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(On a side note, I am currently on vacation till early December. So I don&apos;t guarantee I will be reachable.)&lt;/p&gt;</comment>
                            <comment id="51591" author="adetalhouet" created="Mon, 14 Nov 2016 22:10:44 +0000"  >&lt;p&gt;Thanks Martin for the quick feedback. I understand you might not pick up the fix until early December, thanks for notifying as well.&lt;/p&gt;

&lt;p&gt;You are correct the fix I provided in topoprocessing is also part of the resolution of this bug, but was unfortunately uncomplete at the time of your testing, now it is.&lt;/p&gt;

&lt;p&gt;I have identified two root causes for the memory leak:&lt;/p&gt;

&lt;p&gt;1. Retention on BlueprintContainer when destroying them before &quot;quiescing&quot;&lt;br/&gt;
them: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/48284/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/48284/&lt;/a&gt;&lt;br/&gt;
Restarting a set of bundles requires cooperation between them to avoid&lt;br/&gt;
having retention on services due to on-going call, processing.&lt;br/&gt;
As OSGi APIs don&apos;t provide such functionality, the Quiesce APIs where&lt;br/&gt;
created, ensuring all calls to be finished before actually shutting down&lt;br/&gt;
the bundle. Once the set of bundles are quiesced, e.g. shut down, they&lt;br/&gt;
can safely be destroyed.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Retention on the TopoProcessingProviderImpl due to unreleased resources:&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/48283/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/48283/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Obversed behavior with both the changes:&lt;br/&gt;
a. change the config value in the config file&lt;br/&gt;
b. bundle is reloaded&lt;br/&gt;
b. i. no more BlueprintContainer retention (opendaylight-user@root&amp;gt;services show only one BlueprintContainer)&lt;br/&gt;
b. ii. memory still have two instances of TopoProcessingProviderImpl, but one is marked as &quot;unreachable from GC roots, but not yet collected.&quot; hence will be eventually collected.&lt;br/&gt;
Forcing GC removes that instance.&lt;/p&gt;

&lt;p&gt;Let me know if those fixes are indeed solving your issues. Thanks.&lt;/p&gt;</comment>
                            <comment id="51592" author="adetalhouet" created="Thu, 17 Nov 2016 13:43:55 +0000"  >&lt;p&gt;Martin, on the controller side, that bug is now resolved. I&apos;ve opened a BUG in Topoprocessing to track the memory leak over there: &lt;a href=&quot;https://bugs.opendaylight.org/show_bug.cgi?id=7197&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.opendaylight.org/show_bug.cgi?id=7197&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Alexis&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="13594" name="file_6969.txt" size="32144" author="martin.dindoffer@pantheon.tech" created="Tue, 18 Oct 2016 12:55:30 +0000"/>
                            <attachment id="13595" name="topoChain.txt" size="35802" author="martin.dindoffer@pantheon.tech" created="Sun, 13 Nov 2016 18:07:49 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6969</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=6969]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Bug]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02rbj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>