Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
Bugzilla Migration
-
None
-
Operating System: All
Platform: All
-
7768
Description
A java.util.ConcurrentModificationException is possible to happen due to the close() method of ServerSessionManager is not synchronized. The situation mostly likely will happen during a controller reboot. It may also happen when a PCEP config is updated.
When a controller is restarted, or the PCEP topology/configuration is changed, it is trying to modify the session manager's node map. However, if a PCEP session is opened during that time, a concurrent issue may happen.
Karaf log attached:
2017-02-01 21:20:33,282 | INFO | oupCloseable-3-8 | AbstractPCEPSessionNegotiator | 205 - org.opendaylight.bgpcep.pcep-impl - 0.5.2.Beryllium-SR2 | PCEP session with [id: 0xfb89d73b, /10.0.0.125:14432 => /10.74.1.6:4189] started, sent proposal Open [_deadTimer=120, _keepalive=30, _sessionId=0, _tlvs=Tlvs [augmentation=[Tlvs1 [_stateful=Stateful [_lspUpdateCapability=true, augmentation=[Stateful1 [_initiation=true], Stateful1 [_deltaLspSyncCapability=true, _includeDbVersion=true, _triggeredInitialSync=true, _triggeredResync=true]]]]]], augmentation=[]]
2017-02-01 21:20:33,286 | ERROR | config-pusher | PCEPTopologyProvider | 218 - org.opendaylight.bgpcep.pcep-topology-provider - 0.5.2.Beryllium-SR2 | Failed to shutdown session manager
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:922)[:1.7.0_76]
at java.util.HashMap$ValueIterator.next(HashMap.java:950)[:1.7.0_76]
at org.opendaylight.bgpcep.pcep.topology.provider.ServerSessionManager.close(ServerSessionManager.java:164)
at org.opendaylight.bgpcep.pcep.topology.provider.PCEPTopologyProvider.close(PCEPTopologyProvider.java:96)
at org.opendaylight.controller.config.spi.AbstractModule.getInstance(AbstractModule.java:76)
at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_76]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_76]
at org.opendaylight.controller.config.manager.impl.dependencyresolver.DependencyResolverManager$ModuleInvocationHandler.handleInvocation(DependencyResolverManager.java:149)
at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
at com.sun.proxy.$Proxy20.getInstance(Unknown Source)
at org.opendaylight.controller.config.manager.impl.ConfigTransactionControllerImpl.secondPhaseCommit(ConfigTransactionControllerImpl.java:421)
at org.opendaylight.controller.config.manager.impl.ConfigRegistryImpl.secondPhaseCommit(ConfigRegistryImpl.java:287)
at org.opendaylight.controller.config.manager.impl.ConfigRegistryImpl.commitConfig(ConfigRegistryImpl.java:227)
at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_76]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_76]
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)[:1.7.0_76]
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_76]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_76]
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)[:1.7.0_76]
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:193)[:1.7.0_76]
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:175)[:1.7.0_76]
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:117)[:1.7.0_76]
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:54)[:1.7.0_76]
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)[:1.7.0_76]
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)[:1.7.0_76]
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)[:1.7.0_76]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)[:1.7.0_76]