<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:38:45 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>[SFC-146] Memory leak + some flows left behind after cleanup when creating + deleting RSPs</title>
                <link>https://jira.opendaylight.org/browse/SFC-146</link>
                <project id="10167" key="SFC">sfc</project>
                    <description>&lt;p&gt;On the test, we&apos;re adding 2 RSPs: &lt;br/&gt;
RSP1: SF1, SF2, SFF1, SFF2. Using NSH (VXLAN encapsulation)&lt;br/&gt;
RSP2: SF3, SFF3. NSH-VXLAN also &lt;/p&gt;

&lt;p&gt;The sequence of actions leading to this bug being reproduced: &lt;/p&gt;

&lt;p&gt;1: Create RSP1&lt;br/&gt;
After that, the internal table &quot;rspNameToFlowsMap&quot; (which contains information used for deleting flows when RSPs are deleted) in SfcL2FlowWriter contains two entries: &lt;br/&gt;
a) &quot;SFC&quot; RSP, with initialization flows for SFFs 1 &amp;amp; 2 -&amp;gt; 12 flows&lt;br/&gt;
b) RSP1 (5 flows / SFF) -&amp;gt; 10 flows on this case &lt;/p&gt;

&lt;p&gt;2: Create RSP2. &lt;br/&gt;
Initialization flows for SFF3 are added to &quot;SFC&quot; entry in rspNameToFlowWriter table, , and also a new table entry for the flow itself. So the table content at this point is the following: &lt;br/&gt;
a) &quot;SFC&quot; RSP key, with initialization flows for SFFs 1 &amp;amp; 2 &amp;amp; 3 -&amp;gt; 18 flows&lt;br/&gt;
b) RSP1 -&amp;gt; 10 flows&lt;br/&gt;
c) RSP2 -&amp;gt; 5 flows&lt;/p&gt;

&lt;p&gt;3: Delete RSP2. &lt;br/&gt;
Here is where the bug is triggered. After deleting the RSP, the table state:&lt;br/&gt;
a) &quot;SFC&quot; RSP -&amp;gt; Still contains 18 flows (i.e. initialization flows for SFF3 are not removed): this is the leak&lt;br/&gt;
Also, it can be observed that initialization (matchAny) flows are not deleted from SFF3 (those are the flows left behind at deletion)&lt;/p&gt;

&lt;p&gt;The problem is in the &quot;clearSffIfNoRspExists&quot; method in SfcL2FlowWriterImpl class. It only deletes initialization flows when ALL RSPs are deleted; but this is too coarse: initialization flows for each SFF should be accounted separately, so when no RSPs &lt;b&gt;for the SFF&lt;/b&gt; remain, initialization flows for the SFF are removed. &lt;/p&gt;

&lt;p&gt;Just for your info, I plan to submit a renderer patch in the following days (it introduces transactional flow write/deletion for all flows when the RSP is created/deleted, which can be seen also as a fix for &lt;a href=&quot;https://bugs.opendaylight.org/show_bug.cgi?id=4806&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.opendaylight.org/show_bug.cgi?id=4806&lt;/a&gt;), which includes two new unit tests currently nonpassing because of this bug. The tests check flow creation + internal state for the  Create:RSP1-&amp;gt;Create:RSP2-&amp;gt;Delete:RSP2-&amp;gt;Delete:RSP1 and Create:RSP1-&amp;gt;Create:RSP2-&amp;gt;Delete:RSP1-&amp;gt;Delete:RSP2 sequences&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="24172">SFC-146</key>
            <summary>Memory leak + some flows left behind after cleanup when creating + deleting RSPs</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="miguel.duarte.de.mora.barroso@ericsson.com">Miguel Duarte de Mora Barroso</assignee>
                                    <reporter username="diego.jesus.granados.lopez@ericsson.com">Diego Granados</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 May 2016 10:17:21 +0000</created>
                <updated>Wed, 21 Sep 2016 11:50:40 +0000</updated>
                            <resolved>Wed, 21 Sep 2016 11:50:40 +0000</resolved>
                                    <version>unspecified</version>
                                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="46663" author="miguel.duarte.de.mora.barroso@ericsson.com" created="Tue, 13 Sep 2016 15:43:45 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/45537/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/45537/&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>5969</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=5969]]></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_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10321"><![CDATA[Carbon]]></customfieldvalue>

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

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

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