[GBP-2] NPE in SwitchManager Created: 16/Sep/14  Updated: 19/Oct/17  Due: 16/Sep/14  Resolved: 16/Sep/14

Status: Verified
Project: groupbasedpolicy
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Thomas Bachman Assignee: Unassigned
Resolution: Done 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: 1898
Priority: High

 Description   

The following exception occurred when running the groupbasedpolicy POC demo:

2014-09-15 17:23:50 PDT [com.google.common.util.concurrent.ExecutionList] SEVERE com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair execute RuntimeException while executing runnable com.google.common.util.concurrent.Futures$4@1eafbd09 with executor com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService@23a3a99c
java.lang.NullPointerException
at org.opendaylight.groupbasedpolicy.renderer.ofoverlay.SwitchManager$SwitchState.update(SwitchManager.java:420)
at org.opendaylight.groupbasedpolicy.renderer.ofoverlay.SwitchManager$SwitchState.setConfig(SwitchManager.java:437)
at org.opendaylight.groupbasedpolicy.renderer.ofoverlay.SwitchManager.updateSwitchConfig(SwitchManager.java:244)
at org.opendaylight.groupbasedpolicy.renderer.ofoverlay.SwitchManager.access$600(SwitchManager.java:54)
at org.opendaylight.groupbasedpolicy.renderer.ofoverlay.SwitchManager$4.onSuccess(SwitchManager.java:284)
at org.opendaylight.groupbasedpolicy.renderer.ofoverlay.SwitchManager$4.onSuccess(SwitchManager.java:275)
at com.google.common.util.concurrent.Futures$4.run(Futures.java:1149)
at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:293)
at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:150)
at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:106)
at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:170)
at com.google.common.util.concurrent.ForwardingListenableFuture.addListener(ForwardingListenableFuture.java:47)
at com.google.common.util.concurrent.Futures.addCallback(Futures.java:1152)
at com.google.common.util.concurrent.Futures.addCallback(Futures.java:1088)
at org.opendaylight.groupbasedpolicy.renderer.ofoverlay.SwitchManager.readSwitches(SwitchManager.java:308)
at org.opendaylight.groupbasedpolicy.renderer.ofoverlay.SwitchManager.access$400(SwitchManager.java:54)
at org.opendaylight.groupbasedpolicy.renderer.ofoverlay.SwitchManager$NodesConfigListener.onDataChanged(SwitchManager.java:202)
at org.opendaylight.controller.md.sal.binding.impl.AbstractForwardedDataBroker$TranslatingDataChangeInvoker.onDataChanged(AbstractForwardedDataBroker.java:146)
at org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore$1.invokeListener(InMemoryDOMDataStore.java:74)
at org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore$1.invokeListener(InMemoryDOMDataStore.java:68)
at org.opendaylight.yangtools.util.concurrent.QueuedNotificationManager$NotificationTask.notifyListener(QueuedNotificationManager.java:411)
at org.opendaylight.yangtools.util.concurrent.QueuedNotificationManager$NotificationTask.run(QueuedNotificationManager.java:382)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

This wasn't observed in previous versions, but there should be a NULL pointer check to guard against this.



 Comments   
Comment by Thomas Bachman [ 16/Sep/14 ]

Fixed in https://git.opendaylight.org/gerrit/#/c/11220/

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