<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:36:09 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-345] thread leak when connecting/disconnecting ovs nodes in a loop</title>
                <link>https://jira.opendaylight.org/browse/OVSDB-345</link>
                <project id="10158" key="OVSDB">ovsdb</project>
                    <description>&lt;p&gt;just do this in a loop:&lt;/p&gt;

&lt;p&gt;ovs-vsctl set-manager ${ODL_IP} 6640&lt;br/&gt;
sleep 1;&lt;br/&gt;
ovs-vsctl del-manager&lt;br/&gt;
sleep 1;&lt;/p&gt;

&lt;p&gt;each connection is generating some threads but they are not cleaned&lt;br/&gt;
up after the disconnection or after waiting for some period of time.&lt;/p&gt;

&lt;p&gt;feature installed is odl-ovsdb-southbound-impl-rest&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="22037">OVSDB-345</key>
            <summary>thread leak when connecting/disconnecting ovs nodes in a loop</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="dileep.ranganathan@intel.com">Dileep Ranganathan</assignee>
                                    <reporter username="jluhrsen">Jamo Luhrsen</reporter>
                        <labels>
                    </labels>
                <created>Fri, 27 May 2016 19:44:52 +0000</created>
                <updated>Wed, 15 Jun 2016 01:16:26 +0000</updated>
                            <resolved>Wed, 15 Jun 2016 01:16:26 +0000</resolved>
                                    <version>unspecified</version>
                                                    <component>Library</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="41445" author="vishnoianil@gmail.com" created="Fri, 27 May 2016 22:02:04 +0000"  >&lt;p&gt;Adding more details from the mail discussion.&lt;/p&gt;

&lt;p&gt;This is what i did:&lt;/p&gt;

&lt;p&gt;1) Started the controller with ovsdb&lt;br/&gt;
2) Connected profiler&lt;br/&gt;
3) Once controller was up and stable took the first thread dump&lt;br/&gt;
4) Then i started the script that set-controller and delete-controller (ovs-vsctl set-manager tcp:192.168.122.1:6640;sleep 4;ovs-vsctl show;sleep 4;ovs-vsctl del-manager ; ovs-vsctl show) for 200 times&lt;br/&gt;
5) went to sleep &lt;br/&gt;
6) Next morning stopped the controller and thread monitor was constant, so it means controller was cooled down after these 200 connection/disconnection&lt;br/&gt;
7) Took another thread dump.&lt;/p&gt;

&lt;p&gt;You can look at these thread dump at following urls&lt;br/&gt;
First Thread Dump (Step 3 above) : &lt;a href=&quot;https://gist.githubusercontent.com/vishnoianil/c87bc620f0b35a87cd698bcadc244cc4/raw/4010fe1b758015cb2fd1f6f0d801eaafd171dcbd/first-thread-dump.txt&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gist.githubusercontent.com/vishnoianil/c87bc620f0b35a87cd698bcadc244cc4/raw/4010fe1b758015cb2fd1f6f0d801eaafd171dcbd/first-thread-dump.txt&lt;/a&gt;&lt;br/&gt;
Last Thread Dump (Step 7 above) : &lt;a href=&quot;https://gist.githubusercontent.com/vishnoianil/48d3be92630d93f4e5317474b01a681e/raw/75da31ef97a0e59431c1f7d02d62d8d7f3894363/last-thread-dump&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gist.githubusercontent.com/vishnoianil/48d3be92630d93f4e5317474b01a681e/raw/75da31ef97a0e59431c1f7d02d62d8d7f3894363/last-thread-dump&lt;/a&gt;&lt;br/&gt;
Threads that are additional in Last thread dump compared to First Thread Dump : &lt;a href=&quot;https://gist.githubusercontent.com/vishnoianil/56b9e5ce8b8b25203d09d1a4b7d67049/raw/3f108b62a0cef6c9d4681636fb8b664ada17e81b/newly-created-and-not-reaped-threads.txt&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gist.githubusercontent.com/vishnoianil/56b9e5ce8b8b25203d09d1a4b7d67049/raw/3f108b62a0cef6c9d4681636fb8b664ada17e81b/newly-created-and-not-reaped-threads.txt&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is what i see:&lt;/p&gt;

&lt;p&gt;Total Threads in First Dump : 98&lt;br/&gt;
Total Threads in Last Dump : 313&lt;br/&gt;
Additional Thread spawned : ~215.&lt;/p&gt;

&lt;p&gt;I see three category of threads &lt;/p&gt;

&lt;p&gt;Thread &quot;PassiveConnection-X&quot; (9 threads) &amp;#8211; These are expected.&lt;br/&gt;
Thread &quot;nioEventLoopGroup-5-X&quot; ( 7 Threads) &amp;#8211; These are expected as well for netty library.&lt;/p&gt;

&lt;p&gt;Thread &quot;pool-XX-thread-Y&quot; (197 threads) &amp;#8211; These threads are problem. Each thread has the same stack. This stack related to is executor pool threads.&lt;br/&gt;
  Thread &quot;pool-95-thread-1&quot;:&lt;br/&gt;
    at sun.misc.Unsafe.park(boolean, long)&lt;br/&gt;
    at java.util.concurrent.locks.LockSupport.park(java.lang.Object) (line: 175)&lt;br/&gt;
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() (line: 2039)&lt;br/&gt;
    at java.util.concurrent.LinkedBlockingQueue.take() (line: 442)&lt;br/&gt;
    at java.util.concurrent.ThreadPoolExecutor.getTask() (line: 1067)&lt;br/&gt;
    at java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (line: 1127)&lt;br/&gt;
    at java.util.concurrent.ThreadPoolExecutor$Worker.run() (line: 617)&lt;br/&gt;
    at java.lang.Thread.run() (line: 745)&lt;/p&gt;

&lt;p&gt;As of now I am not sure whether we are creating these threads or any of the core controller component is causing these.  I am working on a patch, that actually name all executor pools in the ovsdb code, so that we can figure out whether these &quot;pool-xxx-thread-y&quot; are created by us or someone else. BUT indeed it&apos;s a thread leak somewhere.&lt;/p&gt;</comment>
                            <comment id="41446" author="dileep.ranganathan@intel.com" created="Tue, 7 Jun 2016 03:16:42 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/39917/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/39917/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="41447" author="shague@redhat.com" created="Tue, 14 Jun 2016 16:11:29 +0000"  >&lt;p&gt;be: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/39986/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/39986/&lt;/a&gt;&lt;br/&gt;
b: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/39917/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/39917/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="41448" author="jluhrsen" created="Tue, 14 Jun 2016 16:16:37 +0000"  >&lt;p&gt;I&apos;m going to bring a CSIT test case to check for this.  Once I do, I&apos;ll&lt;br/&gt;
mark this verified/fixed.&lt;/p&gt;</comment>
                            <comment id="41449" author="vishnoianil@gmail.com" created="Tue, 14 Jun 2016 16:18:00 +0000"  >&lt;p&gt;I was about to ask this and you sensed it &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/biggrin.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;, thanks a lot jamo. I need to create the wiki page that actually should list all these bugs for which we need to write a integration tests. I will do that as soon as possible&lt;/p&gt;</comment>
                            <comment id="41450" author="shague@redhat.com" created="Wed, 15 Jun 2016 01:16:26 +0000"  >&lt;p&gt;Anil, Jamo,&lt;/p&gt;

&lt;p&gt;add the test cases to the spreadsheet Venkat and Josh started: &lt;a href=&quot;https://docs.google.com/spreadsheets/d/1n4yCFc9kogkkRrWwFjrVJyDPeO4lu79PZtwjuourDWg/edit#gid=0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.google.com/spreadsheets/d/1n4yCFc9kogkkRrWwFjrVJyDPeO4lu79PZtwjuourDWg/edit#gid=0&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </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>5976</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=5976]]></customfieldvalue>

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

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