Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
2861
Description
Seeing these continually throughout our logs:
2015-03-17 05:11:30,428 | WARN | ds-oper-thread-0 | StatisticsManagerImpl | 246 - org.opendaylight.openflowplugin.applications.statistics-manager - 0.1.0.SNAPSHOT | Unhandled exception during processing statistics. Restarting transaction chain.
java.lang.NullPointerException
at org.opendaylight.openflowplugin.applications.statistics.manager.impl.helper.MatchComparatorFactory$11.areObjectsEqual(MatchComparatorFactory.java:211)[246:org.opendaylight.openflowplugin.applications.statistics-manager:0.1.0.SNAPSHOT]
at org.opendaylight.openflowplugin.applications.statistics.manager.impl.helper.MatchComparatorFactory$11.areObjectsEqual(MatchComparatorFactory.java:205)[246:org.opendaylight.openflowplugin.applications.statistics-manager:0.1.0.SNAPSHOT]
On further investigation:
FlowComparatorFactory Line144 calls
-> matchComp.areObjectsEqual(statsMatch, storedMatch) where storedMatch==null.
MatchComparatorFactory Line211 tries to access storedMatch.getEthernetMatch() where storedMatch==null.
The real question is whether the case where storedMatch should ever be null…
I think it is, as it is all kicked off by StatListenCommitFlow Line360, for which our cfgFlow is a “drop|null” which won’t have a match…
Actually this repeated pattern of “areObjectsEqual()” doesn’t seem to check if parameters are null before accessing their getters.
areObjectsEqual should
if(storedMatch==null) return false;
Submitting patch for fix with UnitTest