<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:36:10 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>[OVSDB-352] potential memory leak in JsonRpcEndpoint</title>
                <link>https://jira.opendaylight.org/browse/OVSDB-352</link>
                <project id="10158" key="OVSDB">ovsdb</project>
                    <description>&lt;p&gt;Summary:&lt;br/&gt;
If the same OVSDB client repeatedly makes requests to read the OVSDB configuration, the methodContext hashmap keeps growing. &lt;/p&gt;

&lt;p&gt;Steps to reproduce:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;add multiple ports/interfaces (&amp;gt;30) to OVSDB (using ovs-vsctl) so that the increase in memory consumption is easy to detect.&lt;/li&gt;
	&lt;li&gt;using a client, make requests to read the configuration in OVSDB repeatedly.&lt;/li&gt;
	&lt;li&gt;observe the memory growth of this test program using a tool like jstack.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Some questions:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Is there a recommendation that the same OVSDB client should not be used for multiple requests?&lt;/li&gt;
	&lt;li&gt;Is there a way to reinitialize JsonRpcEndpoint for the same OVSDB client?&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="22044">OVSDB-352</key>
            <summary>potential memory leak in JsonRpcEndpoint</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="Avishnoi">Anil Vishnoi</assignee>
                                    <reporter username="ashwinp.work@gmail.com">Ashwin P</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Jul 2016 13:27:31 +0000</created>
                <updated>Sun, 24 Jul 2016 08:30:08 +0000</updated>
                            <resolved>Sun, 24 Jul 2016 08:30:08 +0000</resolved>
                                    <version>unspecified</version>
                                                    <component>Library</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="41465" author="vishnoianil@gmail.com" created="Wed, 6 Jul 2016 07:15:19 +0000"  >&lt;p&gt;Hi Ashwin,&lt;/p&gt;

&lt;p&gt;Can you please give some more details about &quot;- using a client, make requests to read the configuration in OVSDB repeatedly.&quot;. How are you making the request? are you using RESTCONF to fetch the data from data store? Or are you using explicit library calls for that ?&lt;/p&gt;</comment>
                            <comment id="41466" author="ashwinp.work@gmail.com" created="Thu, 7 Jul 2016 04:33:22 +0000"  >&lt;p&gt;@Anil:&lt;br/&gt;
&amp;gt; How are you making the request? are you using RESTCONF to fetch the data from data store? Or are you using explicit library calls for that ?&lt;/p&gt;

&lt;p&gt;Library calls &lt;span class=&quot;error&quot;&gt;&amp;#91;an example -- repeated ovsdb.lib.operations.TransactionBuilder.execute calls that execute a select operation on the Port table (containing &amp;gt; 30 ports) using an OvsdbClient&amp;#93;&lt;/span&gt;. I believe the problem is that there are only &quot;put&quot; invocations on the methodContext hash-map in JsonRpcEndpoint. There is no piece of code that removes elements from the hash-map after the request is processed.&lt;/p&gt;</comment>
                            <comment id="41467" author="ashwinp.work@gmail.com" created="Sun, 10 Jul 2016 18:27:33 +0000"  >&lt;p&gt;Attachment #1: Bug6157 reproducer JUnit test&lt;/p&gt;</comment>
                            <comment id="41472" author="ashwinp.work@gmail.com" created="Sun, 10 Jul 2016 18:27:33 +0000"  >&lt;p&gt;Attachment Bug6157_reproducer.txt has been added with description: Bug6157 reproducer&lt;/p&gt;</comment>
                            <comment id="41468" author="ashwinp.work@gmail.com" created="Sun, 10 Jul 2016 18:29:40 +0000"  >&lt;p&gt;Attachment #2: Bug6157 OutOfMemory exception after running the reproducer.&lt;/p&gt;</comment>
                            <comment id="41473" author="ashwinp.work@gmail.com" created="Sun, 10 Jul 2016 18:29:40 +0000"  >&lt;p&gt;Attachment Bug6157_exception.txt has been added with description: Bug6157 OutOfMemory exception after running the reproducer&lt;/p&gt;</comment>
                            <comment id="41469" author="ashwinp.work@gmail.com" created="Sun, 10 Jul 2016 18:47:08 +0000"  >&lt;p&gt;@Anil:&lt;/p&gt;

&lt;p&gt;I have attached two files. One of them is a reproducer. It simply creates a select OVSDB transaction using ODL library calls on the OVSDB Port table, and executes it 300 times.&lt;/p&gt;

&lt;p&gt;If you run the JUnit test &lt;b&gt;after&lt;/b&gt; adding a large number of ports (~ 300) using &quot;ovs-vsctl add-port &amp;lt;BRIDGE_NAME&amp;gt; &amp;lt;PORT_NAME&amp;gt;&quot; to OVSDB, I believe you should be able to observe the OutOfMemoryError exception (second attachment). `ps aux` output shows continuous increase in the memory consumption when the test is run. I used the Beryllium-1.2.3-SR2 stable released version of ODL for running these tests.&lt;/p&gt;

&lt;p&gt;I&apos;d really appreciate if the fix for this Bug can be included in the forthcoming SR3 release.&lt;/p&gt;</comment>
                            <comment id="41470" author="ashwinp.work@gmail.com" created="Fri, 15 Jul 2016 00:16:04 +0000"  >&lt;p&gt;The following change may be a potential workaround/fix:&lt;br/&gt;
-----a/library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcEndpoint.java&lt;br/&gt;
+++ b/library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcEndpoint.java&lt;br/&gt;
@@ -128,6 +128,8 @@ public class JsonRpcEndpoint &lt;/p&gt;
{
             return;
         }

&lt;p&gt;+        methodContext.remove(response.get(&quot;id&quot;).asText());&lt;br/&gt;
+&lt;br/&gt;
         if (ListenableFuture.class == returnCtxt.getMethod().getReturnType()) {&lt;br/&gt;
             TypeToken&amp;lt;?&amp;gt; retType = TypeToken.of(&lt;br/&gt;
                     returnCtxt.getMethod().getGenericReturnType())&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;@Anil: If you could please provide an ETA for the fix for this Bug, I&apos;d really appreciate it. Will the fix make it to the forthcoming SR3 release?&lt;/p&gt;</comment>
                            <comment id="41471" author="vishnoianil@gmail.com" created="Sun, 24 Jul 2016 08:30:08 +0000"  >&lt;p&gt;Master : &lt;a href=&quot;https://git.opendaylight.org/gerrit/42211&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/42211&lt;/a&gt;&lt;br/&gt;
Stable/beryllium : &lt;a href=&quot;https://git.opendaylight.org/gerrit/42113&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/42113&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="12889" name="Bug6157_exception.txt" size="3192" author="ashwinp.work@gmail.com" created="Sun, 10 Jul 2016 18:29:40 +0000"/>
                            <attachment id="12888" name="Bug6157_reproducer.txt" size="1826" author="ashwinp.work@gmail.com" created="Sun, 10 Jul 2016 18:27:33 +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>6157</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=6157]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10202" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Priority</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10312"><![CDATA[High]]></customfieldvalue>

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

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