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

Statistics manager loses threads to uncaught exceptions

    XMLWordPrintable

Details

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

    • 1007

    Description

      During testing we have encountered the following:

      2014-05-14 09:46:42.603 PDT [request-monitor] ERROR o.o.c.l.b.i.UncaughtExceptionPolicy - Thread Thread[request-monitor,5,main] died because of an uncaught exception
      java.lang.IllegalArgumentException: Session for the cookie is invalid. Reason: the switch has been recently disconnected OR inventory provides outdated information.
      at org.opendaylight.openflowplugin.openflow.md.core.session.MessageDispatchServiceImpl.getConnectionAdapter(MessageDispatchServiceImpl.java:92) ~[na:na]
      at org.opendaylight.openflowplugin.openflow.md.core.session.MessageDispatchServiceImpl.multipartRequest(MessageDispatchServiceImpl.java:207) ~[na:na]
      at org.opendaylight.openflowplugin.openflow.md.core.sal.ModelDrivenSwitchImpl.getAllQueuesStatisticsFromAllPorts(ModelDrivenSwitchImpl.java:1575) ~[na:na]
      at org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.OpendaylightQueueStatisticsService$$Broker$Router.getAllQueuesStatisticsFromAllPorts(OpendaylightQueueStatisticsService$$Broker$Router.java) ~[na:na]
      at org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.OpendaylightQueueStatisticsService$$Broker$DirectProxy.getAllQueuesStatisticsFromAllPorts(OpendaylightQueueStatisticsService$$Broker$DirectProxy.java) ~[na:na]
      at org.opendaylight.controller.md.statistics.manager.QueueStatsTracker.request(QueueStatsTracker.java:91) ~[na:na]
      at org.opendaylight.controller.md.statistics.manager.StatisticsRequestScheduler.requestStatistics(StatisticsRequestScheduler.java:83) ~[na:na]
      at org.opendaylight.controller.md.statistics.manager.StatisticsRequestScheduler.access$100(StatisticsRequestScheduler.java:32) ~[na:na]
      at org.opendaylight.controller.md.statistics.manager.StatisticsRequestScheduler$1.run(StatisticsRequestScheduler.java:52) ~[na:na]
      at java.util.TimerThread.mainLoop(Timer.java:555) ~[na:1.7.0_51]
      at java.util.TimerThread.run(Timer.java:505) ~[na:1.7.0_51]

      While it is true OFP should not throw a runtimeexception here, the statistics manager should not kill its thread. Simple solution is to catch RuntimeException (except InterruptedException) in StatisticsRequestScheduler.run(), log it and continue on.

      Attachments

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

        Activity

          People

            Avishnoi Anil Vishnoi
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: