ConcurrentModificationException at karaf.FeaturesServiceImpl at opendaylight.controller.configpusherfeature...FeatureConfigPusher

Description

ConcurrentModificationException observed when installing bgpcep (master branch)

steps to reproduce it:
-run Karaf
-install -> feature:install odl-restconf odl-bgpcep-bgp

2016-09-22 16:32:50,282 | WARN | r - ConfigPusher | FeatureConfigPusher | 137 - config-persister-feature-adapter - 0.6.0.SNAPSHOT | Karaf featuresService.listInstalledFeatures() has thrown an exception, retry 0
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1437)[:1.8.0_101]
at java.util.HashMap$KeyIterator.next(HashMap.java:1461)[:1.8.0_101]
at java.util.AbstractCollection.toArray(AbstractCollection.java:196)[:1.8.0_101]
at org.apache.karaf.features.internal.FeaturesServiceImpl.listInstalledFeatures(FeaturesServiceImpl.java:840)[20:org.apache.karaf.features.core:3.0.8]
at Proxy9faf1ce0_0954_4724_860e_acc04c402866.listInstalledFeatures(Unknown Source)[:]
at org.opendaylight.controller.configpusherfeature.internal.FeatureConfigPusher.isInstalled(FeatureConfigPusher.java:96)[137:config-persister-feature-adapter:0.6.0.SNAPSHOT]
at org.opendaylight.controller.configpusherfeature.internal.FeatureConfigPusher.pushConfig(FeatureConfigPusher.java:77)[137:config-persister-feature-adapter:0.6.0.SNAPSHOT]
at org.opendaylight.controller.configpusherfeature.internal.FeatureConfigPusher.pushConfigs(FeatureConfigPusher.java:67)[137:config-persister-feature-adapter:0.6.0.SNAPSHOT]
at org.opendaylight.controller.configpusherfeature.internal.ConfigPushingRunnable.processFeatureEvent(ConfigPushingRunnable.java:65)[137:config-persister-feature-adapter:0.6.0.SNAPSHOT]
at org.opendaylight.controller.configpusherfeature.internal.ConfigPushingRunnable.run(ConfigPushingRunnable.java:47)[137:config-persister-feature-adapter:0.6.0.SNAPSHOT]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]

Environment

Operating System: All
Platform: All

Attachments

1
  • 22 Sep 2016, 02:59 PM

Activity

Michael Vorburger July 5, 2017 at 1:05 PM

> I believe this was fixed a few months ago

yes; https://git.opendaylight.org/gerrit/#/c/53341/ removed the confusing WARN log.

Tom Pantelis July 4, 2017 at 8:09 PM

I believe this was fixed a few months ago - also shouldn't be an issue with karaf 4.

Michael Vorburger March 15, 2017 at 8:38 PM

> PS: Do we have a generic Retryer utility?

org.opendaylight.genius.datastoreutils.TaskRetryLooper

Michael Vorburger March 15, 2017 at 8:33 PM

> (b) On looking at this code more closely, I've also found a 2nd place where I > guess this could happen and should be handled - in FeatureConfigPusher's
> pushConfig using featuresService.getFeature.

I've ignored this, for now; we'll handle it some other time, maybe.

PS: Do we have a generic Retryer utility?

Michael Vorburger March 15, 2017 at 6:23 PM

This, from the current implementation, also seems a bit stupid:

private static final int MAX_RETRIES = 100;
private static final int RETRY_PAUSE_MILLIS = 1;

I'm going to change it to:

private static final int MAX_RETRIES = 10;
private static final int RETRY_PAUSE_MILLIS = 100;

Done

Details

Assignee

Reporter

External issue ID

Components

Priority

Created September 22, 2016 at 2:51 PM
Updated July 25, 2023 at 8:24 AM
Resolved July 5, 2017 at 1:05 PM