<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:53:55 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>[YANGTOOLS-660] SchemaContext - excessive memory consumption</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-660</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;When I try to create SchemaContext including 500 complicated models (8 MB of yang sources), SchemaContext instance occupies 1.6 GB of memory. Profiling has shown, that one of the causes could be large number of duplicated objects - probably EnumMaps in class SubstatementContext.&lt;br/&gt;
Would it be possible to somehow optimize it?&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="23080">YANGTOOLS-660</key>
            <summary>SchemaContext - excessive memory consumption</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.opendaylight.org/images/icons/priorities/blocker.svg">Highest</priority>
                        <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="rovarga">Robert Varga</assignee>
                                    <reporter username="andrej.mak@pantheon.tech">Andrej Mak</reporter>
                        <labels>
                    </labels>
                <created>Tue, 20 Sep 2016 13:03:53 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:51 +0000</updated>
                            <resolved>Wed, 19 Oct 2016 17:07:44 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="44102" author="rovarga" created="Sat, 15 Oct 2016 19:23:36 +0000"  >&lt;p&gt;Can you share a heap dump and the list of models?&lt;/p&gt;</comment>
                            <comment id="44103" author="rovarga" created="Mon, 17 Oct 2016 15:29:11 +0000"  >&lt;p&gt;Analysis of the provided memory dump shows quite clearly that we are retaining implementation-internal details and state in the end result.&lt;/p&gt;

&lt;p&gt;We retain BuildSchemaContext, SourceSpecificContext, SubstatementContext and similar, which should certainly not be retained once EffectiveSchemaContext has been built.&lt;/p&gt;

&lt;p&gt;It would seem that the problem is EffectiveStatementBase.unknownSubstatementsToBuild, introduced in &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/28300/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/28300/&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="44104" author="rovarga" created="Mon, 17 Oct 2016 15:31:35 +0000"  >&lt;p&gt;The approach taken to fix the recursion issue needs to be revised so that that field does not exist at all.&lt;/p&gt;</comment>
                            <comment id="44105" author="rovarga" created="Mon, 17 Oct 2016 20:23:40 +0000"  >&lt;p&gt;master: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/47038/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/47038/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="44106" author="rovarga" created="Mon, 17 Oct 2016 20:37:34 +0000"  >&lt;p&gt;boron: &lt;a href=&quot;https://git.opendaylight.org/gerrit/47041&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/47041&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="44107" author="anipbu" created="Tue, 18 Oct 2016 18:40:36 +0000"  >&lt;p&gt;Reopening bug since it needs to be fixed in Beryllium SR4.&lt;/p&gt;</comment>
                            <comment id="44108" author="anipbu" created="Tue, 18 Oct 2016 18:41:07 +0000"  >&lt;p&gt;To better assess the impact of this bug and fix, could someone from your team please help us identify the following:&lt;br/&gt;
Severity: Could you elaborate on the severity of this bug?  Is this a BLOCKER such that we cannot release Beryllium without it?  Is there a workaround such that we can write a release note?&lt;br/&gt;
Testing: Could you also elaborate on the testing of this patch?  How extensively has this patch been tested?  Is it covered by any unit tests or system tests?  &lt;br/&gt;
Impact: Does this fix impact any dependent projects?&lt;/p&gt;</comment>
                            <comment id="44109" author="rovarga" created="Tue, 18 Oct 2016 20:39:28 +0000"  >&lt;p&gt;Severity:&lt;br/&gt;
This issue was introduced during fixing of BUG-4456 and while it fixed that issue, it inadvertently caused temporary objects to be retained indefinitely instead of being garbage collected, causing excessive memory overhead.&lt;/p&gt;

&lt;p&gt;The problem is triggered by presence of an &apos;extension&apos; statement containing another extension. The only workaround is to not to load models containing such constructs, which is not practical.&lt;/p&gt;

&lt;p&gt;The issue could be exploited by a malicious SB device to cause a resource exhaustion on the controller. Given the SR4 is our last planned maintenance release, we should not be releasing it without this issue being fixed.&lt;/p&gt;

&lt;p&gt;Testing:&lt;br/&gt;
BUG-4456 is covered by a unit test. The patch attached to this issue reverts the original fix, temporarily introducing a functionality regression (while fixing the memory leak). The patch attached to BUG-4456 reworks the original fix in a way, which does not leak memory. This is confirmed by the unit test passing again as expected.&lt;/p&gt;

&lt;p&gt;The combination of the two patches has been manually tested against the device which flushed the original bug report and confirmed to work (no regression on BUG-4456) and to have eliminated the memory leak (reported memory usage was ~240MB).&lt;/p&gt;

&lt;p&gt;We currently do not have system tests which would identify this sort of issues, but we are in process of introducing such a test suite in Carbon.&lt;/p&gt;

&lt;p&gt;Impact:&lt;br/&gt;
No ODL projects use models which trigger this behavior as far as we can tell, hence they should not be impacted by this issue.&lt;/p&gt;</comment>
                            <comment id="44110" author="rovarga" created="Tue, 18 Oct 2016 20:40:25 +0000"  >&lt;p&gt;beryllium: &lt;a href=&quot;https://git.opendaylight.org/gerrit/47091&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/47091&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="44111" author="anipbu" created="Wed, 19 Oct 2016 17:07:44 +0000"  >&lt;p&gt;Has this bug been verified as fixed in the latest Beryllium SR4 Build 20161019?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="21269">NETCONF-256</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="23112">YANGTOOLS-692</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="23113">YANGTOOLS-693</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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_10002" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>YANGTOOLS-652</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6757</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=6757]]></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="10358"><![CDATA[Beryllium-4]]></customfieldvalue>

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

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