[CONTROLLER-1334] UnsupportedOperationException occurred in data change event listener Created: 22/May/15  Updated: 25/Jul/23  Resolved: 03/Jun/15

Status: Resolved
Project: controller
Component/s: mdsal
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Hideyuki Tai Assignee: Tony Tkacik
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Text File VTN-IT-backtrace.txt    
Issue Links:
Duplicate
is duplicated by OPNFLWPLUG-480 org.opendaylight.controller.sal-distr... Resolved
is duplicated by YANGTOOLS-459 java.lang.UnsupportedOperationExcepti... Resolved
External issue ID: 3344

 Description   

I'm using a controller built on the latest code on the master branch of the integration.git.
It means that I'm using artifacts for Lithium release.

When I connected OpenDaylight Controller to OpenFlow switches, I observed UnsupportedOperationException occurred on a thread calling AsyncDataChangeEvent.getCreatedData().

java.lang.UnsupportedOperationException: \
Could not create Binding data representation for root \
at org.opendaylight.yangtools.binding.data.codec.impl.SchemaRootCodecContext.deserialize(SchemaRootCodecContext.java:154)[106:org.opendaylight.yangtools.binding-data-codec:0.7.0.SNAPSHOT]

At this time, inventory-manager updated nodes information.
As the result, a data change event (AsyncDataChangeEvent) happened, and then the above exception occurred.

I've never observed this exception before 05/20, but I frequently observed this exception after 05/20.

Error message on karaf.log
==========================

2015-05-22 05:22:57,442 | ERROR | ult-dispatcher-4 | NodeListener | 345 - org.opendaylight.vtn.manager.implementation - 0.3.0.SNAPSHOT | Unexpected exception in data change event listener.
java.lang.UnsupportedOperationException: Could not create Binding data representation for root
at org.opendaylight.yangtools.binding.data.codec.impl.SchemaRootCodecContext.deserialize(SchemaRootCodecContext.java:154)[106:org.opendaylight.yangtools.binding-data-codec:0.7.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry.fromNormalizedNode(BindingNormalizedNodeCodecRegistry.java:190)[106:org.opendaylight.yangtools.binding-data-codec:0.7.0.SNAPSHOT]
at org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec.toBinding(BindingToNormalizedNodeCodec.java:194)[157:org.opendaylight.controller.sal-binding-broker-impl:1.2.0.SNAPSHOT]
at org.opendaylight.controller.md.sal.binding.impl.AbstractForwardedDataBroker.toBinding(AbstractForwardedDataBroker.java:80)[157:org.opendaylight.controller.sal-binding-broker-impl:1.2.0.SNAPSHOT]
at org.opendaylight.controller.md.sal.binding.impl.AbstractForwardedDataBroker$TranslatedDataChangeEvent.getCreatedData(AbstractForwardedDataBroker.java:164)[157:org.opendaylight.controller.sal-binding-broker-impl:1.2.0.SNAPSHOT]
at org.opendaylight.vtn.manager.internal.util.AbstractDataChangeListener.onDataChanged(AbstractDataChangeListener.java:301)[345:org.opendaylight.vtn.manager.implementation:0.3.0.SNAPSHOT]
at org.opendaylight.controller.md.sal.binding.impl.AbstractForwardedDataBroker$TranslatingDataChangeInvoker.onDataChanged(AbstractForwardedDataBroker.java:134)[157:org.opendaylight.controller.sal-binding-broker-impl:1.2.0.SNAPSHOT]
at org.opendaylight.controller.cluster.datastore.DataChangeListener.dataChanged(DataChangeListener.java:66)[179:org.opendaylight.controller.sal-distributed-datastore:1.2.0.SNAPSHOT]
at org.opendaylight.controller.cluster.datastore.DataChangeListener.handleReceive(DataChangeListener.java:39)[179:org.opendaylight.controller.sal-distributed-datastore:1.2.0.SNAPSHOT]
at org.opendaylight.controller.cluster.common.actor.AbstractUntypedActor.onReceive(AbstractUntypedActor.java:34)[171:org.opendaylight.controller.sal-clustering-commons:1.2.0.SNAPSHOT]
at akka.actor.UntypedActor$$anonfun$receive$1.applyOrElse(UntypedActor.scala:167)[164:com.typesafe.akka.actor:2.3.10]
at akka.actor.Actor$class.aroundReceive(Actor.scala:467)[164:com.typesafe.akka.actor:2.3.10]
at akka.actor.UntypedActor.aroundReceive(UntypedActor.scala:97)[164:com.typesafe.akka.actor:2.3.10]
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)[164:com.typesafe.akka.actor:2.3.10]
at akka.actor.ActorCell.invoke(ActorCell.scala:487)[164:com.typesafe.akka.actor:2.3.10]
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:254)[164:com.typesafe.akka.actor:2.3.10]
at akka.dispatch.Mailbox.run(Mailbox.scala:221)[164:com.typesafe.akka.actor:2.3.10]
at akka.dispatch.Mailbox.exec(Mailbox.scala:231)[164:com.typesafe.akka.actor:2.3.10]
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)[161:org.scala-lang.scala-library:2.10.4.v20140209-180020-VFINAL-b66a39653b]
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)[161:org.scala-lang.scala-library:2.10.4.v20140209-180020-VFINAL-b66a39653b]
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)[161:org.scala-lang.scala-library:2.10.4.v20140209-180020-VFINAL-b66a39653b]
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)[161:org.scala-lang.scala-library:2.10.4.v20140209-180020-VFINAL-b66a39653b]



 Comments   
Comment by Hideyuki Tai [ 22/May/15 ]

Due to this issue, VTN Manager cannot work correctly.

Comment by Hideyuki Tai [ 22/May/15 ]

How to reproduce the issue
==========================

1. Run a controller built for Lithium.

$ bin/karaf

2. Install VTN Manager features.

feature:install odl-vtn-manager-rest

3. Run Mininet and Connect it to the controller.
sudo mn --controller=remote,ip=192.168.2.62 --topo tree,3

You may observe UnsupportedOperationException in karaf.log.

What I used
===========

I used the latest code on the master branch of the integration.git on 22nd May, 2015.

$ git log --oneline | head -1
687d993 Round-robin load-balancing for flow_config_blaster

I executed "mvn clean install" in the distribution/karaf directory of the integration.git code tree.

$ cd distributions/karaf
$ mvn clean install

Comment by Tony Tkacik [ 24/May/15 ]

https://git.opendaylight.org/gerrit/21026

Comment by Hideyuki Tai [ 26/May/15 ]

(In reply to Tony Tkacik from comment #3)
> https://git.opendaylight.org/gerrit/21026

Hi Tony,

Thank you for creating the patch (Gerrit 21026).

However, it seems to me that the patch does not fix the problem.

I pulled the patch, built the sal-binding-broker-impl-1.2.0-SNAPSHOT.jar, and put the jar file into my local Karaf distribution.
And, I did the same steps which I mentioned above, and then I observed the same error.

2015-05-26 04:25:26,068 | ERROR | lt-dispatcher-24 | NodeListener | 345 - org.opendaylight.vtn.manager.implementation - 0.3.0.SNAPSHOT | Unexpected exception in data change event listener.
java.lang.UnsupportedOperationException: Could not create Binding data representation for root
at org.opendaylight.yangtools.binding.data.codec.impl.SchemaRootCodecContext.deserialize(SchemaRootCodecContext.java:154)[106:org.opendaylight.yangtools.binding-data-codec:0.7.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry.fromNormalizedNode(BindingNormalizedNodeCodecRegistry.java:190)[106:org.opendaylight.yangtools.binding-data-codec:0.7.0.SNAPSHOT] at org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec.toBinding(BindingToNormalizedNodeCodec.java:194)[157:org.opendaylight.controller.sal-binding-broker-impl:1.2.0.SNAPSHOT]
at org.opendaylight.controller.md.sal.binding.impl.AbstractForwardedDataBroker.toBinding(AbstractForwardedDataBroker.java:81)[157:org.opendaylight.controller.sal-binding-broker-impl:1.2.0.SNAPSHOT]

Comment by Tony Tkacik [ 27/May/15 ]

Is this single node or multi-node claster?

Comment by Shigeru Yasuda [ 27/May/15 ]

(In reply to Tony Tkacik from comment #5)
> Is this single node or multi-node claster?

Single node. VTN does not support multi-node cluster yet.

I guess that clustering is irrelevant to this issue because this exception is sometimes observed in VTN's IT. VTN's IT uses in-memory datastore.

Comment by Shigeru Yasuda [ 27/May/15 ]

Attachment VTN-IT-backtrace.txt has been added with description: UnsupportedOperationException in VTN's IT

Comment by Hideyuki Tai [ 02/Jun/15 ]

This bug has not been fixed yet.

I observed this bug with the latest artifacts at 10 AM on 06/02 (PDT).

I did the exactly same steps which I wrote in the comment 2 of this report. I tried the steps two times, and I observed the issues all times (100%).

What I used
===========

I used the latest code on the master branch of the integration.git on 2nd June, 2015.

$ git log --oneline | head -1
f82e612 Robot Test Suites for Southbound API.

Comment by Tony Tkacik [ 03/Jun/15 ]

https://git.opendaylight.org/gerrit/21791

Comment by Tony Tkacik [ 03/Jun/15 ]

Alternate fix: https://git.opendaylight.org/gerrit/#/c/21795/

Comment by Hideyuki Tai [ 03/Jun/15 ]

I've confirmed that after the following patch is merged, the CONTROLLER-1334 is not occurred at all.

https://git.opendaylight.org/gerrit/#/c/21795/

Thanks for the patch!

Generated at Wed Feb 07 19:55:16 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.