<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:56:02 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-1629] AbstractConcurrentDataBrokerTest causes deadlocks which AbstractDataBrokerTest did not</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-1629</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;The AbstractConcurrentDataBrokerTest, introduced in &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-1578&quot; title=&quot;Multi-threaded AbstractDataBrokerTest/s fail with TransactionCommitFailedException Caused by: java.lang.IllegalStateException: Store tree ... and candidate base ... differ.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-1578&quot;&gt;&lt;del&gt;CONTROLLER-1578&lt;/del&gt;&lt;/a&gt; to replace the AbstractDataBrokerTest, while working well in a number of tests I&apos;ve been using it since, seems to cause deadlocks in some rare cases.&lt;/p&gt;

&lt;p&gt;For example, &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/54353/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/54353/&lt;/a&gt; replaces AbstractDataBrokerTest in Daexim by AbstractConcurrentDataBrokerTest, and causes DataExportImportAppProviderTest to deadlock... &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/sad.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;  Attached is a thread dump.&lt;/p&gt;

&lt;p&gt;Tali Ben-Meir seems to have hit a similar issue in a not-yet-published new test she&apos;s writing for project Federation, according to private email exchange with a thread dump that looks similar.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="26183">CONTROLLER-1629</key>
            <summary>AbstractConcurrentDataBrokerTest causes deadlocks which AbstractDataBrokerTest did not</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="-1">Unassigned</assignee>
                                    <reporter username="vorburger">Michael Vorburger</reporter>
                        <labels>
                    </labels>
                <created>Wed, 5 Apr 2017 17:56:36 +0000</created>
                <updated>Tue, 25 Jul 2023 08:24:28 +0000</updated>
                            <resolved>Thu, 13 Jul 2017 21:59:07 +0000</resolved>
                                                                    <component>mdsal</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="51950" author="vorburger" created="Wed, 5 Apr 2017 18:02:01 +0000"  >&lt;p&gt;Attachment bug8163-jstack-1.txt has been added with description: jstack of deadlock in DataExportImportAppProviderTest when changing from @Deprecated AbstractDataBrokerTest to AbstractConcurrentDataBrokerTest&lt;/p&gt;</comment>
                            <comment id="51940" author="tpantelis" created="Thu, 13 Apr 2017 22:48:41 +0000"  >&lt;p&gt;The problem is the use of MoreExecutors$DirectExecutorService in the QueuedNotificationManager and the fact that the DataExportImportAppProvider does a blocking get on the submit Future in onDataTreeChanged. The solution is to not use a direct executor for publishing change notifications.&lt;/p&gt;</comment>
                            <comment id="51941" author="vorburger" created="Fri, 14 Apr 2017 02:24:52 +0000"  >&lt;p&gt;&amp;gt; DataExportImportAppProvider does a blocking get on the submit Future in onDataTreeChanged&lt;/p&gt;

&lt;p&gt;I may be too tired to see it - but where?  DataExportImportAppProvider has a registerDataTreeChangeListener() in init() with an (anonymous / lambda) onDataTreeChanged which goes into ipcHandler() - but I don&apos;t see a get() in there?  There definitely are many in other places though (c/55022), so I&apos;m probably just not seeing what you&apos;re pointing to...&lt;/p&gt;

&lt;p&gt;&amp;gt; The problem is the use of MoreExecutors$DirectExecutorService in the QueuedNotificationManager (...) The solution is to not use a direct executor for publishing change notifications.&lt;/p&gt;

&lt;p&gt;In Daexim or in controller?  Oh wait, I&apos;m seeing that this DirectExecutorService is created in AbstractDataBrokerTestCustomizer .. this sounds strangely familiar.. &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; Is this the discussion we&apos;ve already had in &lt;a href=&quot;https://bugs.opendaylight.org/show_bug.cgi?id=7538#c9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.opendaylight.org/show_bug.cgi?id=7538#c9&lt;/a&gt; ?  I can try to pick that up from where left that off...&lt;/p&gt;

&lt;p&gt;PS, just FTR: This WORKED before switching from the AbstractDataBrokerTest to the AbstractConcurrentDataBrokerTest, and more importantly it works in &quot;production&quot; (with the &quot;real&quot; not test DataBroker) .. so it&apos;s a problem in controller utilities?&lt;/p&gt;</comment>
                            <comment id="51942" author="tpantelis" created="Tue, 18 Apr 2017 11:37:14 +0000"  >&lt;p&gt;(In reply to Michael Vorburger from comment #3)&lt;br/&gt;
&amp;gt; I may be too tired to see it - but where?  DataExportImportAppProvider has a&lt;br/&gt;
&amp;gt; registerDataTreeChangeListener() in init() with an (anonymous / lambda)&lt;br/&gt;
&amp;gt; onDataTreeChanged which goes into ipcHandler() - but I don&apos;t see a get() in&lt;br/&gt;
&amp;gt; there?&lt;/p&gt;

&lt;p&gt;One code path is ipcHandler -&amp;gt; updateNodeStatus. The code in this class really should be changed to be async and not block on Futures.&lt;/p&gt;

&lt;p&gt;&amp;gt; Is this the discussion we&apos;ve already had in&lt;br/&gt;
&amp;gt; &lt;a href=&quot;https://bugs.opendaylight.org/show_bug.cgi?id=7538#c9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.opendaylight.org/show_bug.cgi?id=7538#c9&lt;/a&gt; ?  I can try to pick&lt;br/&gt;
&amp;gt; that up from where left that off...&lt;/p&gt;

&lt;p&gt;Yes. &lt;/p&gt;

&lt;p&gt;&amp;gt; PS, just FTR: This WORKED before switching from the AbstractDataBrokerTest&lt;br/&gt;
&amp;gt; to the AbstractConcurrentDataBrokerTest, and more importantly it works in&lt;br/&gt;
&amp;gt; &quot;production&quot; (with the &quot;real&quot; not test DataBroker) .. so it&apos;s a problem in&lt;br/&gt;
&amp;gt; controller utilities?&lt;/p&gt;

&lt;p&gt;It works in production b/c there are no direct executors used in production core code. CDS uses akka actors and is all async. In this case the InMemoryDOMDataStore executor in the tests cannot not be a direct executor since the DataExportImportAppProvider code does blocking gets in its DTCL callback.&lt;/p&gt;</comment>
                            <comment id="51943" author="cdgasparini" created="Sat, 6 May 2017 18:51:32 +0000"  >&lt;p&gt;Hi, investigating BUG-8335 It seems that Im hitting the same issue.&lt;/p&gt;

&lt;p&gt;dead lock is caused by AbstractConcurrentDataBrokerTest. &lt;br/&gt;
Debugging I see that it hangs when AbstractRegistrationTree#removeRegistration&lt;br/&gt;
is trying to take the log.&lt;/p&gt;

&lt;p&gt;Created a demo class and test to easily reproduce the issue.&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/56640/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/56640/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;moving the bug as confirmed, you can changed it you don&apos;t agree&lt;/p&gt;</comment>
                            <comment id="51944" author="tpantelis" created="Tue, 4 Jul 2017 19:57:35 +0000"  >&lt;p&gt;Is this fixed now?&lt;/p&gt;</comment>
                            <comment id="51945" author="vorburger" created="Wed, 5 Jul 2017 13:27:19 +0000"  >&lt;p&gt;&amp;gt; Is this fixed now?&lt;/p&gt;

&lt;p&gt;Nope, this one slipped through the cracks on my side; never got to this, due to other (internal, downstream) prios .. if you/someone would like to have a go at it, please don&apos;t let me stop you.. &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; Otherwise I&apos;ll try to get to this in the next weeks, time permitting.&lt;/p&gt;</comment>
                            <comment id="51946" author="tpantelis" created="Wed, 5 Jul 2017 13:33:59 +0000"  >&lt;p&gt;(In reply to Michael Vorburger from comment #7)&lt;br/&gt;
&amp;gt; &amp;gt; Is this fixed now?&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; Nope, this one slipped through the cracks on my side; never got to this, due&lt;br/&gt;
&amp;gt; to other (internal, downstream) prios .. if you/someone would like to have a&lt;br/&gt;
&amp;gt; go at it, please don&apos;t let me stop you.. &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; Otherwise I&apos;ll try to get to&lt;br/&gt;
&amp;gt; this in the next weeks, time permitting.&lt;/p&gt;

&lt;p&gt;I commented earlier on the solution based on the original thread dump - do not use a direct executor for publishing change notifications. I can push a patch for that but I suspect some downstream tests may fail intermittently if they&apos;re not expecting DTCL notification to be async.&lt;/p&gt;</comment>
                            <comment id="51947" author="tpantelis" created="Thu, 6 Jul 2017 12:44:27 +0000"  >&lt;p&gt;Submitted &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/60022/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/60022/&lt;/a&gt; to use a thread pool executor instead of direct executor for DTCL notifications. This fixes the deadlock with the DemoBugTest in &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/56640/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/56640/&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;This change may break existing tests if they expect DTCL notifications to be immediate but we can tackle those if/when they occur. If it becomes too problematic we can keep AbstractConcurrentDataBrokerTest using the direct executor and create another version that uses a thread pool although I&apos;d rather not do that.&lt;/p&gt;</comment>
                            <comment id="51948" author="vorburger" created="Thu, 13 Jul 2017 21:01:09 +0000"  >&lt;p&gt;&amp;gt; create another version that uses a thread pool although I&apos;d rather not do that&lt;/p&gt;

&lt;p&gt;FTR: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/60022/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/60022/&lt;/a&gt; ultimately ended up having to do this in order not to break backward compatibility, and introduces an option to choose whether or not you want the DataTreeChangeListenerExecutor to be multi threaded or not.&lt;/p&gt;</comment>
                            <comment id="51949" author="vorburger" created="Thu, 13 Jul 2017 21:24:09 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/60312/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/60312/&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="23905">BGPCEP-665</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="13643" name="bug8163-jstack-1.txt" size="27484" author="vorburger" created="Wed, 5 Apr 2017 18:02:01 +0000"/>
                    </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>8163</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=8163]]></customfieldvalue>

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

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