<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:33:53 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>[OPNFLWPLUG-982] Suspected TransactionChain leak in TransactionChainManager (or fix false positive in TracingBroker)</title>
                <link>https://jira.opendaylight.org/browse/OPNFLWPLUG-982</link>
                <project id="10155" key="OPNFLWPLUG">OpenFlowPlugin</project>
                    <description>&lt;p&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; brings up &lt;a href=&quot;https://jira.opendaylight.org/browse/OPNFLWPLUG-940&quot; title=&quot;Suspected (not sure) TransactionChain leak in TransactionChainManager&quot; class=&quot;issue-link&quot; data-issue-key=&quot;OPNFLWPLUG-940&quot;&gt;&lt;del&gt;OPNFLWPLUG-940&lt;/del&gt;&lt;/a&gt; (or was it &lt;a href=&quot;https://jira.opendaylight.org/browse/OPNFLWPLUG-961&quot; title=&quot;New OOM due to more TX leaks seen in the nova-boot scenario&quot; class=&quot;issue-link&quot; data-issue-key=&quot;OPNFLWPLUG-961&quot;&gt;&lt;del&gt;OPNFLWPLUG-961&lt;/del&gt;&lt;/a&gt; or &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; ?) again:&lt;/p&gt;

&lt;p&gt;This time we need to either fix this, or if we confirm this is not a real issue, then move this issue to the Controller project and change the org.opendaylight.controller.md.sal.trace.dom.impl.TracingBroker to ignore it:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;TracingBroker found some not yet (or never..) closed transaction[chain]s!
[NB: If no stack traces are shown below, then enable transaction-debug-context-enabled in mdsaltrace_config.xml]
 
DataBroker : createTransactionChain() 3x TransactionChains opened but not closed here: (...) 
    org.opendaylight.controller.md.sal.dom.broker.impl.PingPongTransactionChain.&amp;lt;init&amp;gt;(PingPongTransactionChain.java:104) 
    org.opendaylight.controller.md.sal.dom.broker.impl.PingPongDataBroker.createTransactionChain(PingPongDataBroker.java:49)    org.opendaylight.controller.md.sal.dom.broker.impl.PingPongDataBroker.createTransactionChain(PingPongDataBroker.java:28) (...) 
    org.opendaylight.controller.md.sal.binding.impl.BindingDOMTransactionChainAdapter.&amp;lt;init&amp;gt;(BindingDOMTransactionChainAdapter.java:45) 
    org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter.createTransactionChain(BindingDOMDataBrokerAdapter.java:74) (...) 
    org.opendaylight.openflowplugin.common.txchain.TransactionChainManager.createTxChain(TransactionChainManager.java:81) 
    org.opendaylight.openflowplugin.common.txchain.TransactionChainManager.activateTransactionManager(TransactionChainManager.java:109) 
    org.opendaylight.openflowplugin.impl.device.DeviceContextImpl.lazyTransactionManagerInitialization(DeviceContextImpl.java:649) 
    org.opendaylight.openflowplugin.impl.device.DeviceContextImpl.instantiateServiceInstance(DeviceContextImpl.java:592) 
    org.opendaylight.openflowplugin.impl.lifecycle.GuardedContextImpl.instantiateServiceInstance(GuardedContextImpl.java:86) 
    java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:891) 
    org.opendaylight.openflowplugin.impl.lifecycle.ContextChainImpl.instantiateServiceInstance(ContextChainImpl.java:74) 
    org.opendaylight.mdsal.singleton.dom.impl.ClusterSingletonServiceGroupImpl.lambda$startServices$0(ClusterSingletonServiceGroupImpl.java:648)
    java.util.ArrayList.forEach(ArrayList.java:1257) 
    org.opendaylight.mdsal.singleton.dom.impl.ClusterSingletonServiceGroupImpl.startServices(ClusterSingletonServiceGroupImpl.java:645) 
    org.opendaylight.mdsal.singleton.dom.impl.ClusterSingletonServiceGroupImpl.cleanupCandidateOwnershipChanged(ClusterSingletonServiceGroupImpl.java:506) 
    org.opendaylight.mdsal.singleton.dom.impl.ClusterSingletonServiceGroupImpl.lockedOwnershipChanged(ClusterSingletonServiceGroupImpl.java:453) 
    org.opendaylight.mdsal.singleton.dom.impl.ClusterSingletonServiceGroupImpl.ownershipChanged(ClusterSingletonServiceGroupImpl.java:433) 
    org.opendaylight.mdsal.singleton.dom.impl.AbstractClusterSingletonServiceProviderImpl.ownershipChanged(AbstractClusterSingletonServiceProviderImpl.java:234) 
    org.opendaylight.mdsal.singleton.dom.impl.DOMClusterSingletonServiceProviderImpl.ownershipChanged(DOMClusterSingletonServiceProviderImpl.java:23) 
    org.opendaylight.controller.cluster.datastore.entityownership.EntityOwnershipListenerActor.onEntityOwnershipChanged(EntityOwnershipListenerActor.java:44) 
    org.opendaylight.controller.cluster.datastore.entityownership.EntityOwnershipListenerActor.handleReceive(EntityOwnershipListenerActor.java:33) 
    org.opendaylight.controller.cluster.common.actor.AbstractUntypedActor.onReceive(AbstractUntypedActor.java:38) (...)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="29280">OPNFLWPLUG-982</key>
            <summary>Suspected TransactionChain leak in TransactionChainManager (or fix false positive in TracingBroker)</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.opendaylight.org/images/icons/priorities/critical.svg">High</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="10001">Won&apos;t Do</resolution>
                                        <assignee username="skitt">Stephen Kitt</assignee>
                                    <reporter username="vorburger">Michael Vorburger</reporter>
                        <labels>
                    </labels>
                <created>Mon, 26 Feb 2018 17:48:52 +0000</created>
                <updated>Thu, 12 Apr 2018 09:48:47 +0000</updated>
                            <resolved>Thu, 12 Apr 2018 09:48:47 +0000</resolved>
                                    <version>Oxygen</version>
                                    <fixVersion>Fluorine</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="61434" author="vishnoianil@gmail.com" created="Tue, 6 Mar 2018 06:02:39 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=skitt&quot; class=&quot;user-hover&quot; rel=&quot;skitt&quot;&gt;skitt&lt;/a&gt; Stephen, are you looking at this issue ? If not, please unassign so we can triage it.&lt;/p&gt;</comment>
                            <comment id="61457" author="skitt@redhat.com" created="Tue, 6 Mar 2018 13:59:04 +0000"  >&lt;p&gt;I am indeed working on it, &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=Avishnoi&quot; class=&quot;user-hover&quot; rel=&quot;Avishnoi&quot;&gt;Avishnoi&lt;/a&gt;; I get the impression there&#8217;s a bunch of &#8220;synchronisation by magic&#8221; (aka GuardedBy statements with no corresponding reality) which could explain contribute to this, although it could also be perfectly innocent (if three devices are connected, there should be three outstanding transaction chains, right?).&lt;/p&gt;</comment>
                            <comment id="62026" author="vorburger" created="Tue, 3 Apr 2018 06:58:05 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=Avishnoi&quot; class=&quot;user-hover&quot; rel=&quot;Avishnoi&quot;&gt;Avishnoi&lt;/a&gt; and&#160;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=skitt&quot; class=&quot;user-hover&quot; rel=&quot;skitt&quot;&gt;skitt&lt;/a&gt; I meant to speak to you F2F last week at ONS about this, but forgot.. can we move on this?&lt;/p&gt;</comment>
                            <comment id="62199" author="vishnoianil@gmail.com" created="Fri, 6 Apr 2018 18:54:07 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=skitt&quot; class=&quot;user-hover&quot; rel=&quot;skitt&quot;&gt;skitt&lt;/a&gt; This class was reworked meany times to take care of mutliple race condition. Plugin creates TransactionChainManager&#160;per device and it&#160;is used&#160;in&#160;various places in openflowplugin to process the southbound events coming from device like&lt;/p&gt;

&lt;p&gt;(1) Flow/Group/Port/Queue/Table statistics --&amp;gt; they all are separate events and can come in any order and in parallel. Even Flow/Group&#160;statistics are divided in multiple openflow&#160;messages and each message end up generating once transaction.&#160;&lt;/p&gt;

&lt;p&gt;(2) Port status messages --&amp;gt; these are asyn messages and can be send anytime from switch if any port goes down.&lt;/p&gt;

&lt;p&gt;(3) Flow removed messages &#8211;&amp;gt; Async message send by switch whenever flow is removed from switch.&lt;/p&gt;

&lt;p&gt;(4) I may be forgetting one or two more events.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;So&#160;although&#160;TransactionChainManager instance is created per node, it needs to deal with the concurrency because of these various&#160;parallel events processing and hence &quot;GuardedBy&quot;. But i would love someone to&#160;review the synchronization in this class and push a patch if it can be handle in better way.&lt;/p&gt;

&lt;p&gt;Regarding the open transaction chain, given that openflowplugin create TransactionChainManager instance per device, it opens the transaction chain per node after device is initialized properly.&#160;&#160;I believe that&apos;s the reason you see these open transaction chains. I believe this can be further optimized by creating the transaction chain lazily, but as far as i can see this is not really a leak as such.&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="62362" author="vorburger" created="Wed, 11 Apr 2018 16:16:51 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=skitt&quot; class=&quot;user-hover&quot; rel=&quot;skitt&quot;&gt;skitt&lt;/a&gt; if you agree with &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=Avishnoi&quot; class=&quot;user-hover&quot; rel=&quot;Avishnoi&quot;&gt;Avishnoi&lt;/a&gt; then let us close this? &lt;/p&gt;

&lt;p&gt;I would then implement &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 then &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; could use that.&lt;/p&gt;</comment>
                            <comment id="62369" author="skitt@redhat.com" created="Thu, 12 Apr 2018 09:48:24 +0000"  >&lt;p&gt;Yes, I agree. After careful analysis, there doesn&#8217;t seem to be anything wrong in the TransactionChainManager, although I still have an upcoming patch to clarify things and help out static analysis tools.&lt;/p&gt;</comment>
                            <comment id="62370" author="skitt@redhat.com" created="Thu, 12 Apr 2018 09:48:47 +0000"  >&lt;p&gt;This is a false positive.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="20799">NETVIRT-878</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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03asf:</customfieldvalue>

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