<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:56:23 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-1760] Tooling to find the real root cause culprit of memory leaks related to non-closed transactions (and tx chains)</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-1760</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-1756&quot; title=&quot;OOM due to huge Map in ShardDataTree&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-1756&quot;&gt;&lt;del&gt;CONTROLLER-1756&lt;/del&gt;&lt;/a&gt; (and derived &lt;a href=&quot;https://jira.opendaylight.org/browse/OPNFLWPLUG-933&quot; title=&quot;IllegalStateException: Attempted to close chain with outstanding transaction PingPongTransaction at org.opendaylight.openflowplugin.impl.device.TransactionChainManager.createTxChain&quot; class=&quot;issue-link&quot; data-issue-key=&quot;OPNFLWPLUG-933&quot;&gt;&lt;del&gt;OPNFLWPLUG-933&lt;/del&gt;&lt;/a&gt;) made me realize that we really do need some sort of &quot;tooling&quot; to be able to find the real root cause culprit of memory leaks related to non-closed transactions (and tx chains) ... &lt;/p&gt;

&lt;p&gt;Originally, I thought that one can find this in HPROF heap dumps, but thinking this through further after Tom&apos;s reply on &lt;a href=&quot;https://lists.opendaylight.org/pipermail/mdsal-dev/2017-August/001323.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://lists.opendaylight.org/pipermail/mdsal-dev/2017-August/001323.html&lt;/a&gt; and a comment from Robert on IRC, I realized that of course you actually cannot - the &quot;left over&quot; (non closed) transactions piling up on the heap obviously don&apos;t have any trace anymore to where they where originally created - thus where the origin of the leak is, that must be bug fixed, is &quot;lost&quot;, at that point.&lt;/p&gt;

&lt;p&gt;It turns out that the mdsal-trace feature in controller already has a useful basis for such a feature (which is a debug utility, not something we would want in production), and I&apos;ve started to work on this in:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/62288/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/62288/&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/62289/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/62289/&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/62294/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/62294/&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;more coming this week&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;As this currently stand, there&apos;s a chance (hope) that &lt;a href=&quot;https://jira.opendaylight.org/browse/OPNFLWPLUG-933&quot; title=&quot;IllegalStateException: Attempted to close chain with outstanding transaction PingPongTransaction at org.opendaylight.openflowplugin.impl.device.TransactionChainManager.createTxChain&quot; class=&quot;issue-link&quot; data-issue-key=&quot;OPNFLWPLUG-933&quot;&gt;&lt;del&gt;OPNFLWPLUG-933&lt;/del&gt;&lt;/a&gt; fixes the root cause for &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-1756&quot; title=&quot;OOM due to huge Map in ShardDataTree&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-1756&quot;&gt;&lt;del&gt;CONTROLLER-1756&lt;/del&gt;&lt;/a&gt; - but if we have this utility, we can be sure that is the one, and we can find other non-closed transaction leaks, today and in the future.  Therefore I&apos;d like to create this tool independent of &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-1756&quot; title=&quot;OOM due to huge Map in ShardDataTree&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-1756&quot;&gt;&lt;del&gt;CONTROLLER-1756&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.opendaylight.org/browse/OPNFLWPLUG-933&quot; title=&quot;IllegalStateException: Attempted to close chain with outstanding transaction PingPongTransaction at org.opendaylight.openflowplugin.impl.device.TransactionChainManager.createTxChain&quot; class=&quot;issue-link&quot; data-issue-key=&quot;OPNFLWPLUG-933&quot;&gt;&lt;del&gt;OPNFLWPLUG-933&lt;/del&gt;&lt;/a&gt; (and am thus creating this new separate bugzilla issue).&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="26314">CONTROLLER-1760</key>
            <summary>Tooling to find the real root cause culprit of memory leaks related to non-closed transactions (and tx chains)</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</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="-1">Unassigned</assignee>
                                    <reporter username="vorburger">Michael Vorburger</reporter>
                        <labels>
                    </labels>
                <created>Mon, 28 Aug 2017 09:45:40 +0000</created>
                <updated>Wed, 15 Nov 2017 16:53:24 +0000</updated>
                            <resolved>Mon, 4 Sep 2017 13:46:57 +0000</resolved>
                                    <version>Carbon</version>
                                                    <component>mdsal</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="52652" author="vorburger" created="Tue, 29 Aug 2017 08:36:07 +0000"  >&lt;p&gt;&amp;gt; I&apos;ve started to work on this in:&lt;br/&gt;
&amp;gt; * more coming this week&lt;/p&gt;

&lt;p&gt;==&amp;gt; &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/q/topic:bug/9060&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/q/topic:bug/9060&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="52653" author="vorburger" created="Tue, 29 Aug 2017 22:10:56 +0000"  >&lt;p&gt;hello, world - so is this KEWL, or WHAT... check out the output below from this new trace:transactions topic:bug/9060 tool!&lt;/p&gt;

&lt;p&gt;So I can find 5 &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/warning.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; transaction (thus memory) leaks JUST by installing odl-netvirt-openstack (master), and not doing ANYTHING yet... looks like our code is like Swiss Cheese, with many holes in it!  It will be so much &lt;b&gt;FUN&lt;/b&gt; to have this used e.g. in a CSIT and later during real scale testing.. and, likely, find many many more like this:&lt;/p&gt;

&lt;p&gt;opendaylight-user@root&amp;gt;trace:transactions &lt;br/&gt;
TracingBroker found some not yet (or never..) closed transaction&lt;span class=&quot;error&quot;&gt;&amp;#91;chain&amp;#93;&lt;/span&gt;s!&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;NB: If no stack traces are shown below, then enable transaction-debug-context-enabled in mdsaltrace_config.xml&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;  DataBroker : newReadOnlyTransaction()&lt;br/&gt;
    1x transactions opened here, which are not closed:&lt;br/&gt;
(...)&lt;br/&gt;
      Proxy52650ca9_3ae6_40f1_9c52_ec2047cecc51.newReadOnlyTransaction(Unknown Source)&lt;br/&gt;
      org.opendaylight.openflowplugin.applications.topology.manager.FlowCapableTopologyProvider.isFlowTopologyExist(FlowCapableTopologyProvider.java:86)&lt;br/&gt;
      org.opendaylight.openflowplugin.applications.topology.manager.FlowCapableTopologyProvider.start(FlowCapableTopologyProvider.java:57)&lt;br/&gt;
(...)&lt;/p&gt;

&lt;p&gt;==&amp;gt; &lt;a href=&quot;https://jira.opendaylight.org/browse/OPNFLWPLUG-934&quot; title=&quot;ReadOnlyTransaction created in FlowCapableTopologyProvider.isFlowTopologyExist line 86 is never closed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;OPNFLWPLUG-934&quot;&gt;&lt;del&gt;OPNFLWPLUG-934&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;  DataBroker : createTransactionChain()&lt;br/&gt;
    1x TransactionChains opened but not closed:&lt;br/&gt;
(...)&lt;br/&gt;
      Proxyfaab8ae8_e5e3_4a72_a6ea_4ae4baef08d5.createTransactionChain(Unknown Source)&lt;br/&gt;
      org.opendaylight.restconf.RestConnectorProvider.start(RestConnectorProvider.java:87)&lt;br/&gt;
(...)&lt;/p&gt;

&lt;p&gt;==&amp;gt; &lt;a href=&quot;https://jira.opendaylight.org/browse/NETCONF-462&quot; title=&quot;TransactionChain created in RestConnectorProvider.start line 87 is never closed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;NETCONF-462&quot;&gt;&lt;del&gt;NETCONF-462&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;    1x TransactionChains opened but not closed:&lt;br/&gt;
(...)&lt;br/&gt;
      Proxy52650ca9_3ae6_40f1_9c52_ec2047cecc51.createTransactionChain(Unknown Source)&lt;br/&gt;
      org.opendaylight.openflowplugin.applications.topology.manager.OperationProcessor.&amp;lt;init&amp;gt;(OperationProcessor.java:36)&lt;/p&gt;

&lt;p&gt;==&amp;gt; &lt;a href=&quot;https://jira.opendaylight.org/browse/OPNFLWPLUG-935&quot; title=&quot;TransactionChain created in OperationProcessor.&amp;lt;init&amp;gt; line 36 is never closed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;OPNFLWPLUG-935&quot;&gt;&lt;del&gt;OPNFLWPLUG-935&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;    1x TransactionChains opened but not closed:&lt;br/&gt;
(...)&lt;br/&gt;
    Proxy5501955d_71e1_4829_a1c6_db3085042ff1.createTransactionChain(Unknown Source)&lt;br/&gt;
    org.opendaylight.ovsdb.southbound.transactions.md.TransactionInvokerImpl.&amp;lt;init&amp;gt;(TransactionInvokerImpl.java:53)&lt;br/&gt;
    org.opendaylight.ovsdb.southbound.SouthboundProvider.init(SouthboundProvider.java:79)&lt;br/&gt;
(...)&lt;/p&gt;

&lt;p&gt;==&amp;gt; &lt;a href=&quot;https://jira.opendaylight.org/browse/OVSDB-423&quot; title=&quot;TransactionChain created in TransactionInvokerImpl.&amp;lt;init&amp;gt; line 53 is never closed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;OVSDB-423&quot;&gt;&lt;del&gt;OVSDB-423&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;    1x TransactionChains opened but not closed:&lt;br/&gt;
(...)&lt;br/&gt;
    Proxyd6d64bb3_914d_4db8_9c2a_094278739686.createTransactionChain(Unknown Source)&lt;br/&gt;
    org.opendaylight.ovsdb.hwvtepsouthbound.transactions.md.TransactionInvokerImpl.&amp;lt;init&amp;gt;(TransactionInvokerImpl.java:61)&lt;br/&gt;
    org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepSouthboundProvider.init(HwvtepSouthboundProvider.java:78)&lt;/p&gt;

&lt;p&gt;==&amp;gt; &lt;a href=&quot;https://jira.opendaylight.org/browse/OVSDB-424&quot; title=&quot;TransactionChain created in hwvtepsouthbound TransactionInvokerImpl.&amp;lt;init&amp;gt; line 61 is never closed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;OVSDB-424&quot;&gt;&lt;del&gt;OVSDB-424&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="52654" author="vorburger" created="Thu, 31 Aug 2017 09:42:36 +0000"  >&lt;p&gt;Status update: This tool is now available in master.  &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/62403/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/62403/&lt;/a&gt; would be great to have in netvirt master to make it much easier to use e.g. by QA folks (and in order to be able to start talking about integrating it into CSIT, which would be VERY cool).&lt;/p&gt;

&lt;p&gt;Next step:  I&apos;ll now start looking at the feasibility of back patching this stuff from master to stable/carbon, so that we can run it on internal QA environments under load - and use this to help us find the real culprit of &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-1756&quot; title=&quot;OOM due to huge Map in ShardDataTree&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-1756&quot;&gt;&lt;del&gt;CONTROLLER-1756&lt;/del&gt;&lt;/a&gt;!&lt;/p&gt;</comment>
                            <comment id="52655" author="vorburger" created="Thu, 31 Aug 2017 13:54:05 +0000"  >&lt;p&gt;&amp;gt; have this used e.g. in a CSIT&lt;br/&gt;
&amp;gt; start talking about integrating it into CSIT&lt;/p&gt;

&lt;p&gt;==&amp;gt; &lt;a href=&quot;https://jira.opendaylight.org/browse/NETVIRT-878&quot; title=&quot;CSIT should help to detect possible memory leaks leading to OOM related to non-closed transactions (and tx chains) early&quot; class=&quot;issue-link&quot; data-issue-key=&quot;NETVIRT-878&quot;&gt;NETVIRT-878&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="52656" author="vorburger" created="Thu, 31 Aug 2017 18:56:14 +0000"  >&lt;p&gt;I&apos;ve just (minutes ago) been able to merge the back-patch of new &lt;a href=&quot;https://bugs.opendaylight.org/show_bug.cgi?id=9060&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.opendaylight.org/show_bug.cgi?id=9060&lt;/a&gt; tooling from master into the upstream stable/carbon branch, and with that consider this issue fully done from my side.  We&apos;ll be dealing with enhancements in new issues, such as &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-1765&quot; title=&quot;trace:transactions should suppress false TransactionChain positives, by white list, or showing only x2+ ?&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-1765&quot;&gt;&lt;del&gt;CONTROLLER-1765&lt;/del&gt;&lt;/a&gt; and hope to update &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-1756&quot; title=&quot;OOM due to huge Map in ShardDataTree&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-1756&quot;&gt;&lt;del&gt;CONTROLLER-1756&lt;/del&gt;&lt;/a&gt; with the findings obtained thanks to this new tool soon (that was the main point of all of this).&lt;/p&gt;</comment>
                            <comment id="60056" author="vorburger" created="Wed, 15 Nov 2017 16:53:24 +0000"  >&lt;p&gt;&lt;a href=&quot;http://blog2.vorburger.ch/2017/09/how-to-find-transaction-related-memory.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://blog2.vorburger.ch/2017/09/how-to-find-transaction-related-memory.html&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="20799">NETVIRT-878</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="26310">CONTROLLER-1756</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="26319">CONTROLLER-1765</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="20804">NETVIRT-883</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is blocked by">
                                        <issuelink>
            <issuekey id="26318">CONTROLLER-1764</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9060</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=9060]]></customfieldvalue>

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

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