Uploaded image for project: 'OpenFlowPlugin'
  1. OpenFlowPlugin
  2. OPNFLWPLUG-513

Exception at removeUnreportedFlows in StatisticsManagerImpl

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • General
    • None
    • Operating System: All
      Platform: All

    • 3957

    Description

      This bug is found in stable/lithium and also main.

      2015-07-07 14:37:15,748 | WARN | ds-oper-thread-0 | StatisticsManagerImpl | 264 - org.opendaylight.openflowplugin.applications.statistics-manager - 0.1.1.SNAPSHOT | Unhandled exception during processing statistics. Restarting transaction chain.
      java.lang.NullPointerException
      at org.opendaylight.openflowplugin.applications.statistics.manager.impl.StatListenCommitFlow$TableFlowUpdateState.removeUnreportedFlows(StatListenCommitFlow.java:464)[264:org.opendaylight.openflowplugin.applications.statistics-manager:0.1.1.SNAPSHOT]
      at org.opendaylight.openflowplugin.applications.statistics.manager.impl.StatListenCommitFlow.statsFlowCommitAll(StatListenCommitFlow.java:262)[264:org.opendaylight.openflowplugin.applications.statistics-manager:0.1.1.SNAPSHOT]
      at org.opendaylight.openflowplugin.applications.statistics.manager.impl.StatListenCommitFlow.access$000(StatListenCommitFlow.java:82)[264:org.opendaylight.openflowplugin.applications.statistics-manager:0.1.1.SNAPSHOT]
      at org.opendaylight.openflowplugin.applications.statistics.manager.impl.StatListenCommitFlow$2.applyOperation(StatListenCommitFlow.java:208)[264:org.opendaylight.openflowplugin.applications.statistics-manager:0.1.1.SNAPSHOT]

      After the exception, there were side-effect null pointer exceptions whenever there were statistics poll.

      The fix is simple:
      diff --git a/applications/statistics-manager/src/main/java/org/opendaylight/open
      index 71d34dc..2180e09 100644
      — a/applications/statistics-manager/src/main/java/org/opendaylight/openflowplu
      +++ b/applications/statistics-manager/src/main/java/org/opendaylight/openflowplu
      @@ -461,7 +461,7 @@ public class StatListenCommitFlow extends StatAbstractListen
      final InstanceIdentifier<Flow> flowRef = tableRef.child(Flow.cl
      if (nodeDeleteMap != null && flowKey.getId().getValue().startsW
      final Integer lifeIndex = nodeDeleteMap.get(flowRef);

      • if (lifeIndex > 0) {
        + if (lifeIndex != null && lifeIndex > 0) { break; }

        else {
        nodeDeleteMap.remove(flowRef);

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            monika.verma1@tcs.com Monika Verma
            henry.fung@live.com Henry Fung
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: