[OPNFLWPLUG-161] Statistics manager loses threads to uncaught exceptions Created: 14/May/14  Updated: 27/Sep/21  Due: 01/Jul/14  Resolved: 29/Jun/14

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Robert Varga Assignee: Anil Vishnoi
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: 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.



 Comments   
Comment by Anil Vishnoi [ 29/Jun/14 ]

Fixed through

https://git.opendaylight.org/gerrit/8438

Thanks
Anil

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