Skip to content

ConcurrentModificationException in YamlThingProvider.retryCreateThing #5664

Description

@lolodomo

At first startup of 5.2 M6:

06:59:17.959 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.util.ConcurrentModificationException: null
        at java.util.ArrayList$ArrayListSpliterator.tryAdvance(Unknown Source) ~[?:?]
        at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:?]
        at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:?]
        at java.util.stream.ReferencePipeline.findFirst(Unknown Source) ~[?:?]
        at org.openhab.core.model.yaml.internal.things.YamlThingProvider.retryCreateThing(YamlThingProvider.java:337) ~[?:?]
        at org.openhab.core.model.yaml.internal.things.YamlThingProvider.lambda$28(YamlThingProvider.java:306) ~[?:?]
        at java.lang.Iterable.forEach(Unknown Source) ~[?:?]
        at org.openhab.core.model.yaml.internal.things.YamlThingProvider.lambda$26(YamlThingProvider.java:305) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) ~[?:?]
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) ~[?:?]
        at java.util.concurrent.ConcurrentHashMap$KeySpliterator.forEachRemaining(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:?]
        at java.util.stream.ReferencePipeline.forEach(Unknown Source) ~[?:?]
        at org.openhab.core.model.yaml.internal.things.YamlThingProvider.thingHandlerFactoryAdded(YamlThingProvider.java:299) ~[?:?]
        at org.openhab.core.model.yaml.internal.things.YamlThingProvider.lambda$24(YamlThingProvider.java:282) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) ~[?:?]
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) ~[?:?]
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:?]
        at java.util.stream.ReferencePipeline.forEach(Unknown Source) ~[?:?]
        at org.openhab.core.model.yaml.internal.things.YamlThingProvider.onReadyMarkerAdded(YamlThingProvider.java:281) ~[?:?]
        at org.openhab.core.internal.service.ReadyServiceImpl.lambda$0(ReadyServiceImpl.java:54) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) ~[?:?]
        at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[?:?]
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) ~[?:?]
        at java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:?]
        at java.util.stream.ReferencePipeline.forEach(Unknown Source) ~[?:?]
        at org.openhab.core.internal.service.ReadyServiceImpl.notifyTrackers(ReadyServiceImpl.java:78) ~[?:?]
        at org.openhab.core.internal.service.ReadyServiceImpl.markReady(ReadyServiceImpl.java:54) ~[?:?]
        at org.openhab.core.config.core.xml.osgi.XmlDocumentBundleTracker.registerReadyMarker(XmlDocumentBundleTracker.java:417) ~[?:?]
        at org.openhab.core.config.core.xml.osgi.XmlDocumentBundleTracker.finishBundle(XmlDocumentBundleTracker.java:360) ~[?:?]
        at org.openhab.core.config.core.xml.osgi.XmlDocumentBundleTracker.processBundle(XmlDocumentBundleTracker.java:383) ~[?:?]
        at org.openhab.core.config.core.xml.osgi.XmlDocumentBundleTracker$2.run(XmlDocumentBundleTracker.java:345) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:?]
        at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
        at java.lang.Thread.run(Unknown Source) [?:?]

This error is not systematic, I saw it only once, at very first startup of OH.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn unexpected problem or unintended behavior of the Core

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions