<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:35:36 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>[OVSDB-140] When large JSON responses are received by the switch in response to ODL queries, ODL&apos;s OVSDB interface becomes unusable.</title>
                <link>https://jira.opendaylight.org/browse/OVSDB-140</link>
                <project id="10158" key="OVSDB">ovsdb</project>
                    <description>&lt;p&gt;A little more detail:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;It appears to me that the ODL OVSDB subsystem sends an initial query to the switch when an OVSDB connection comes up&lt;/li&gt;
	&lt;li&gt;If the response to this query is &apos;too large&apos; (current 100,000 bytes), ODL closes the connection.&lt;/li&gt;
	&lt;li&gt;If the switch is configured to open the OVSDB connection, this process repeats indefinitely and the OVSDB subsystem isn&apos;t usable (at least for that switch)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;A lot of detail:&lt;/p&gt;

&lt;p&gt;Running code that I built myself from the stable/helium branch  (more or less at stable helium 2).&lt;/p&gt;

&lt;p&gt;I had one switch in my system with A LOT of ovsdb rows and I hit this problem&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;My switch is configured to connect to my controller when the controller starts up.&lt;/li&gt;
	&lt;li&gt;My controller starts and the switch connects&lt;/li&gt;
	&lt;li&gt;The OVSDB subsystem begins pulling information from my switch&lt;/li&gt;
	&lt;li&gt;My controller closes the OVSDB connection&lt;/li&gt;
	&lt;li&gt;My switch attempts to reconnect&lt;/li&gt;
	&lt;li&gt;repeat forever &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I eventually was able to set a break point and get a stack trace.  The problem is in &lt;br/&gt;
    ovsdb/library/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoder.java around line 116 (in the decode(ChannelHandlerContext ctx, ByteBuf buf, List&amp;lt;Object&amp;gt; out) method)&lt;/p&gt;

&lt;p&gt;        for (; i &amp;lt; buf.writerIndex(); i++) {&lt;br/&gt;
            switch (buf.getByte&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/information.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;) {&lt;br/&gt;
                case &apos;&lt;/p&gt;
{&apos;:
                    if (!inS) leftCurlies++;
                    break;
                case &apos;}
&lt;p&gt;&apos;:&lt;br/&gt;
                    if (!inS) rightCurlies++;&lt;br/&gt;
                    break;&lt;br/&gt;
                case &apos;&quot;&apos;: &lt;/p&gt;
{
                    if (buf.getByte(i - 1) != &apos;\\&apos;) inS = !inS;
                    break;
                }
&lt;p&gt;            }&lt;/p&gt;

&lt;p&gt;            if (leftCurlies != 0 &amp;amp;&amp;amp; leftCurlies == rightCurlies &amp;amp;&amp;amp; !inS) &lt;/p&gt;
{
                ByteBuf slice = buf.readSlice(1 + i - buf.readerIndex());
                JsonParser jp = jacksonJsonFactory.createParser(new ByteBufInputStream(slice));
                JsonNode root = jp.readValueAsTree();
                out.add(root);
                leftCurlies = rightCurlies = lastRecordBytes = 0;
                recordsRead++;
                break;
            }

&lt;p&gt;            if (i - buf.readerIndex() &amp;gt;= maxFrameLength) &lt;/p&gt;
{
                fail(ctx, i - buf.readerIndex());
            }
&lt;p&gt;                  ...&lt;/p&gt;

&lt;p&gt;    private void fail(ChannelHandlerContext ctx, long frameLength) {&lt;br/&gt;
        logger.error(&quot;JSON too big.  JSON content exceeded limit of {} bytes&quot;, maxFrameLength);&lt;br/&gt;
        if (frameLength &amp;gt; 0) &lt;/p&gt;
{
            ctx.fireExceptionCaught(
                    new TooLongFrameException(
                            &quot;frame length exceeds &quot; + maxFrameLength +
                                    &quot;: &quot; + frameLength + &quot; - discarded&quot;));
        }
&lt;p&gt; else &lt;/p&gt;
{
            ctx.fireExceptionCaught(
                    new TooLongFrameException(
                            &quot;frame length exceeds &quot; + maxFrameLength +
                                    &quot; - discarding&quot;));
        }
&lt;p&gt;    }&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="21832">OVSDB-140</key>
            <summary>When large JSON responses are received by the switch in response to ODL queries, ODL&apos;s OVSDB interface becomes unusable.</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="10002">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="jimw@a-bb.net">Jim West</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Feb 2015 15:45:24 +0000</created>
                <updated>Thu, 19 Oct 2017 21:28:15 +0000</updated>
                            <resolved>Tue, 12 Jan 2016 23:26:55 +0000</resolved>
                                    <version>unspecified</version>
                                                    <component>API</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="40772" author="shague@redhat.com" created="Tue, 12 Jan 2016 23:25:52 +0000"  >&lt;p&gt;We should add a config param to use a value different than 100k for the buffer size.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="21826">OVSDB-134</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_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2732</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=2732]]></customfieldvalue>

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

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