[CONTROLLER-342] Statistics manager is throwing IllegalStateException Created: 21/Apr/14  Updated: 05/May/15  Resolved: 05/May/15

Status: Resolved
Project: controller
Component/s: adsal
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Anil Vishnoi 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: PC


External issue ID: 781

 Description   

Statistics manager throwing following exception when switch reconnect frequently.

2014-04-22 03:46:37.406 IST [md-sal-binding-commit-0] ERROR o.o.c.m.s.c.i.service.TwoPhaseCommit - Unhandled exception when invoking listener AbstractObjectRegistration

{instance=org.opendaylight.controller.md.statistics.manager.FlowCapableTracker@1dfac44c}

java.lang.IllegalStateException: Timer already cancelled.
at java.util.Timer.sched(Timer.java:397) ~[na:1.7.0_51]
at java.util.Timer.schedule(Timer.java:248) ~[na:1.7.0_51]
at org.opendaylight.controller.md.statistics.manager.NodeStatisticsHandler.start(NodeStatisticsHandler.java:295) ~[na:na]
at org.opendaylight.controller.md.statistics.manager.StatisticsProvider.startNodeHandlers(StatisticsProvider.java:151) ~[na:na]
at org.opendaylight.controller.md.statistics.manager.FlowCapableTracker.onDataChanged(FlowCapableTracker.java:107) ~[na:na]
at org.opendaylight.controller.md.sal.common.impl.service.TwoPhaseCommit$1.run(TwoPhaseCommit.java:228) ~[na:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_51]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]



 Comments   
Comment by Anil Vishnoi [ 21/Apr/14 ]

Statistics Manager create one Timer Thread for sending periodic statistics request to all the connected switches and it usages TimerTask. Currently TimerTask is not catching exceptions.So when switches reconnect frequently, openflow plugin sometime throws exception in case Statistics Manager tries to send a stats request, but meanwhile openflow plugin gets switch disconnection message. This exception is eventually cancelling the Timer thread, but statistics manager is still scheduling the thread with new tasks and that's resulting in java.lang.IllegalStateException exception.

Comment by Anil Vishnoi [ 21/Apr/14 ]

Bug fixed through following gerrit commit

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

Comment by Carol Sanders [ 05/May/15 ]

This bug is part of the project to Move all ADSAL associated component bugs to ADSAL.

Generated at Wed Feb 07 19:52:47 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.