[MDSAL-222] NullPointerException at org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry.toYangInstanceIdentifier Created: 18/Jan/17  Updated: 09/Mar/18  Resolved: 19/Jan/17

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

Type: Bug
Reporter: Michael Vorburger Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 7579

 Description   

https://git.opendaylight.org/gerrit/#/c/50536/ build, a totally unrelated minor change, just failed with what looks like a regression in yangtools:

15:17:00 Running org.opendaylight.odlparent.featuretest.SingleFeatureTest
15:21:29 Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 267.974 sec <<< FAILURE! - in org.opendaylight.odlparent.featuretest.SingleFeatureTest
15:21:29 installFeature(org.opendaylight.odlparent.featuretest.SingleFeatureTest)[repoUrl: file:/w/workspace/netvirt-verify-carbon-mvn33-openjdk8/openstack/net-virt-sfc/features/target/classes/features.xml, Feature: odl-ovsdb-sfc-test 1.4.0-SNAPSHOT] Time elapsed: 57.158 sec <<< FAILURE!
15:21:29 java.lang.AssertionError: diag: Failure

{Installed=0, Resolved=4, Unknown=0, GracePeriod=3, Waiting=0, Starting=0, Active=416, Stopping=0, Failure=4}

15:21:29 1. NOK org.opendaylight.openflowjava.blueprint-config: OSGi state = Active, Karaf bundleState = Failure, due to: Blueprint
15:21:29 1/17/17 3:21 PM
15:21:29 Exception:
15:21:29 null
15:21:29 java.lang.NullPointerException
15:21:29 at org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry.toYangInstanceIdentifier(BindingNormalizedNodeCodecRegistry.java:87)
15:21:29 at org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec.toYangInstanceIdentifierBlocking(BindingToNormalizedNodeCodec.java:98)
15:21:29 at org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataTreeChangeServiceAdapter.toDomTreeIdentifier(BindingDOMDataTreeChangeServiceAdapter.java:66)
15:21:29 at org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataTreeChangeServiceAdapter.registerDataTreeChangeListener(BindingDOMDataTreeChangeServiceAdapter.java:51)
15:21:29 at org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter.registerDataTreeChangeListener(BindingDOMDataBrokerAdapter.java:104)
15:21:29 at Proxyacbaf020_f64c_4471_89a0_42c77cc4e511.registerDataTreeChangeListener(Unknown Source)
15:21:29 at org.opendaylight.controller.blueprint.ext.DataStoreAppConfigMetadata.retrieveInitialAppConfig(DataStoreAppConfigMetadata.java:204)
15:21:29 at org.opendaylight.controller.blueprint.ext.DataStoreAppConfigMetadata.lambda$retrieveDataBrokerService$1(DataStoreAppConfigMetadata.java:189)
15:21:29 at org.opendaylight.controller.blueprint.ext.StaticServiceReferenceRecipe.retrack(StaticServiceReferenceRecipe.java:75)
15:21:29 at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.start(AbstractServiceReferenceRecipe.java:140)
15:21:29 at org.opendaylight.controller.blueprint.ext.StaticServiceReferenceRecipe.startTracking(StaticServiceReferenceRecipe.java:46)
15:21:29 at org.opendaylight.controller.blueprint.ext.AbstractDependentComponentFactoryMetadata.retrieveService(AbstractDependentComponentFactoryMetadata.java:117)
15:21:29 at org.opendaylight.controller.blueprint.ext.AbstractDependentComponentFactoryMetadata.retrieveService(AbstractDependentComponentFactoryMetadata.java:103)
15:21:29 at org.opendaylight.controller.blueprint.ext.DataStoreAppConfigMetadata.retrieveDataBrokerService(DataStoreAppConfigMetadata.java:189)
15:21:29 at org.opendaylight.controller.blueprint.ext.DataStoreAppConfigMetadata.lambda$startTracking$0(DataStoreAppConfigMetadata.java:180)
15:21:29 at org.opendaylight.controller.blueprint.ext.StaticServiceReferenceRecipe.retrack(StaticServiceReferenceRecipe.java:75)
15:21:29 at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.start(AbstractServiceReferenceRecipe.java:140)
15:21:29 at org.opendaylight.controller.blueprint.ext.StaticServiceReferenceRecipe.startTracking(StaticServiceReferenceRecipe.java:46)
15:21:29 at org.opendaylight.controller.blueprint.ext.AbstractDependentComponentFactoryMetadata.retrieveService(AbstractDependentComponentFactoryMetadata.java:117)
15:21:29 at org.opendaylight.controller.blueprint.ext.AbstractDependentComponentFactoryMetadata.retrieveService(AbstractDependentComponentFactoryMetadata.java:103)
15:21:29 at org.opendaylight.controller.blueprint.ext.DataStoreAppConfigMetadata.startTracking(DataStoreAppConfigMetadata.java:178)
15:21:29 at org.opendaylight.controller.blueprint.ext.AbstractDependentComponentFactoryMetadata.startTracking(AbstractDependentComponentFactoryMetadata.java:184)
15:21:29 at org.apache.aries.blueprint.di.DependentComponentFactoryRecipe.start(DependentComponentFactoryRecipe.java:55)
15:21:29 at org.apache.aries.blueprint.container.BlueprintContainerImpl.trackServiceReferences(BlueprintContainerImpl.java:636)
15:21:29 at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:360)
15:21:29 at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)
15:21:29 at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)
15:21:29 at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)
15:21:29 at org.apache.aries.blueprint.container.BlueprintExtender.access$900(BlueprintExtender.java:68)
15:21:29 at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintContainerServiceImpl.createContainer(BlueprintExtender.java:602)
15:21:29 at org.opendaylight.controller.blueprint.BlueprintBundleTracker.modifiedBundle(BlueprintBundleTracker.java:210)
15:21:29 at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:191)
15:21:29 at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:51)
15:21:29 at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:467)
15:21:29 at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:414)
15:21:29 at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
15:21:29 at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
15:21:29 at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:443)
15:21:29 at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
15:21:29 at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
15:21:29 at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
15:21:29 at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1568)
15:21:29 at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1504)
15:21:29 at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1499)
15:21:29 at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:391)
15:21:29 at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
15:21:29 at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:292)
15:21:29 at org.apache.karaf.features.internal.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:516)
15:21:29 at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:474)
15:21:29 at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:415)
15:21:29 at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:390)
15:21:29 at Proxy7c279105_764c_4e57_a4e6_222eb4b8565f.installFeature(Unknown Source)
15:21:29 at org.opendaylight.odlparent.featuretest.SingleFeatureTest.installFeature(SingleFeatureTest.java:332)
15:21:29 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:21:29 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:21:29 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:21:29 at java.lang.reflect.Method.invoke(Method.java:498)
15:21:29 at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
15:21:29 at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
15:21:29 at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
15:21:29 at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
15:21:29 at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
15:21:29 at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
15:21:29 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
15:21:29 at java.lang.Thread.run(Thread.java:745)



 Comments   
Comment by Martin Ciglan [ 18/Jan/17 ]

Hi

Can you mvnDebug transition between Blueprint & MDSAL and post results? Thanks.

Can you replicate this issue?

Comment by Michael Vorburger [ 18/Jan/17 ]

> Can you mvnDebug transition between Blueprint & MDSAL and post results?

Sorry, how do you mean - didn't get you..

> Can you replicate this issue?

so far I've only seen it on that Gerrit.. not locally (but if this is the result of a recent yangtools merge, then this will start affecting people in 24h... I could try a mvn -U though). If this isn't happening elsewhere, then maybe it's a transient "blip" ... I've just recheck'd https://git.opendaylight.org/gerrit/#/c/50536/ - let's first see if it happens again.

Comment by Martin Ciglan [ 18/Jan/17 ]

(In reply to Michael Vorburger from comment #2)
> > Can you mvnDebug transition between Blueprint & MDSAL and post results?
>
> Sorry, how do you mean - didn't get you..

Just simply put breakpoint on line 87 in BindingNormalizedNodeCodecRegistry, setup debug configuration in your IDE and run: mvnDebug clean install
of your build from console. When it stops on line 87, just past variables values here. Looks like issue with BindingCodecContext or BindingRuntimeContext. Thanks.

>
> > Can you replicate this issue?
>
> so far I've only seen it on that Gerrit.. not locally (but if this is the
> result of a recent yangtools merge, then this will start affecting people in
> 24h... I could try a mvn -U though). If this isn't happening elsewhere,
> then maybe it's a transient "blip" ... I've just recheck'd
> https://git.opendaylight.org/gerrit/#/c/50536/ - let's first see if it
> happens again.

Comment by Martin Ciglan [ 18/Jan/17 ]

(In reply to Michael Vorburger from comment #2)
> > Can you mvnDebug transition between Blueprint & MDSAL and post results?
>
> Sorry, how do you mean - didn't get you..
>
> > Can you replicate this issue?
>
> so far I've only seen it on that Gerrit.. not locally (but if this is the
> result of a recent yangtools merge, then this will start affecting people in
> 24h... I could try a mvn -U though). If this isn't happening elsewhere,
> then maybe it's a transient "blip" ... I've just recheck'd
> https://git.opendaylight.org/gerrit/#/c/50536/ - let's first see if it
> happens again.

NPE is coming from mdsal, not yangtools... please post debug info

Comment by Robert Varga [ 18/Jan/17 ]

Binding involved -> not yangtools.

As far as I can tell either codec context is not initialized or it is not supplying an instance identifier codec.

Moving to mdsal to have it hashed out with controller as to what is going on.

Comment by Michael Vorburger [ 18/Jan/17 ]

>> Can you replicate this issue?

> so far I've only seen it on that Gerrit.. not locally
> maybe it's a transient "blip" ... I've just recheck'd
> https://git.opendaylight.org/gerrit/#/c/50536/ -
> let's first see if it happens again.

https://git.opendaylight.org/gerrit/#/c/50536/ just passed, so.. no reproducer.

Thus reduced importance from blocker to minor. Feel free to close.

> Just simply put breakpoint on line 87 in BindingNormalizedNodeCodecRegistry, setup debug configuration in your IDE and run: mvnDebug clean install

Would do if I could locally repro it, but cannot.

Generated at Wed Feb 07 20:09:07 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.