<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:53: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-447] Concurrency Issue in NetconfDevice</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-447</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;There are concurrency issues that were introduced with &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-317&quot; title=&quot;NETCONF client fails to detect commit failure&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-317&quot;&gt;&lt;del&gt;CONTROLLER-317&lt;/del&gt;&lt;/a&gt; / gerrit 6253 in the NetconfDevice.java. Specifically, in the &quot;bringUp&quot; method we set the value of a number of class scoped variables, but those variables are not synchronized or volatile. This can result in a race condition with the other locations where these member variables are used.&lt;/p&gt;

&lt;p&gt;See gerrit 6253 for one example.&lt;/p&gt;

&lt;p&gt;Offending Code:&lt;/p&gt;

&lt;p&gt;void bringUp(final SchemaSourceProvider&amp;lt;String&amp;gt; delegate, final Set&amp;lt;QName&amp;gt; capabilities, final boolean rollbackSupported) {&lt;br/&gt;
        // This has to be called from separate thread, not from netty thread calling onSessionUp in DeviceListener.&lt;br/&gt;
        // Reason: delegate.getSchema blocks thread when waiting for response&lt;br/&gt;
        // however, if the netty thread is blocked, no incoming message can be processed&lt;br/&gt;
        // ... netty should pick another thread from pool to process incoming message, but it does not &lt;a href=&quot;http://netty.io/wiki/thread-model.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://netty.io/wiki/thread-model.html&lt;/a&gt;&lt;br/&gt;
        // TODO redesign +refactor&lt;br/&gt;
        processingExecutor.submit(new Runnable() {&lt;br/&gt;
            @Override&lt;br/&gt;
            public void run() {&lt;br/&gt;
                NetconfDevice.this.rollbackSupported = rollbackSupported;&lt;br/&gt;
                remoteSourceProvider = schemaSourceProvider.createInstanceFor(delegate);&lt;br/&gt;
                deviceContextProvider = new NetconfDeviceSchemaContextProvider(NetconfDevice.this, remoteSourceProvider);&lt;br/&gt;
                deviceContextProvider.createContextFromCapabilities(capabilities);&lt;br/&gt;
                if (mountInstance != null &amp;amp;&amp;amp; getSchemaContext().isPresent()) &lt;/p&gt;
{
                    mountInstance.setSchemaContext(getSchemaContext().get());
                }

&lt;p&gt;                updateDeviceState(true, capabilities);&lt;/p&gt;

&lt;p&gt;                if (mountInstance != null) {&lt;br/&gt;
                    confReaderReg = mountInstance.registerConfigurationReader(ROOT_PATH, NetconfDevice.this);&lt;br/&gt;
                    operReaderReg = mountInstance.registerOperationalReader(ROOT_PATH, NetconfDevice.this);&lt;br/&gt;
                    commitHandlerReg = mountInstance.registerCommitHandler(ROOT_PATH, NetconfDevice.this);&lt;/p&gt;

&lt;p&gt;                    List&amp;lt;RpcRegistration&amp;gt; rpcs = new ArrayList&amp;lt;&amp;gt;();&lt;br/&gt;
                    // TODO same condition twice&lt;br/&gt;
                    if (mountInstance != null &amp;amp;&amp;amp; getSchemaContext().isPresent()) {&lt;br/&gt;
                        for (RpcDefinition rpc : mountInstance.getSchemaContext().getOperations()) &lt;/p&gt;
{
                            rpcs.add(mountInstance.addRpcImplementation(rpc.getQName(), NetconfDevice.this));
                        }
&lt;p&gt;                    }&lt;br/&gt;
                    rpcReg = rpcs;&lt;br/&gt;
                }&lt;br/&gt;
            }&lt;br/&gt;
        });&lt;br/&gt;
    }&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Mac OS&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="25001">CONTROLLER-447</key>
            <summary>Concurrency Issue in NetconfDevice</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="devin.avery@brocade.com">Devin Avery</reporter>
                        <labels>
                    </labels>
                <created>Fri, 2 May 2014 13:00:43 +0000</created>
                <updated>Thu, 19 Oct 2017 22:13:15 +0000</updated>
                            <resolved>Mon, 23 Jun 2014 08:12:08 +0000</resolved>
                                    <version>Helium</version>
                                                    <component>netconf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="48244" author="mmarsale@cisco.com" created="Tue, 10 Jun 2014 12:57:31 +0000"  >&lt;p&gt;This problem should be fixed now, as &lt;a href=&quot;https://bugs.opendaylight.org/show_bug.cgi?id=832&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.opendaylight.org/show_bug.cgi?id=832&lt;/a&gt; was merged into master. Please review the code for sal-netconf-connector in master.&lt;/p&gt;</comment>
                            <comment id="48245" author="mmarsale@cisco.com" created="Mon, 23 Jun 2014 08:12:08 +0000"  >&lt;p&gt;Fixed by &lt;a href=&quot;https://bugs.opendaylight.org/show_bug.cgi?id=832&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.opendaylight.org/show_bug.cgi?id=832&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>945</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=945]]></customfieldvalue>

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

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