Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-1308

Reactor failure with OpenROADM models

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Highest
    • Resolution: Done
    • 7.0.0, 7.0.3
    • 7.0.4
    • parser

    Description

      The reference counting machinery introduced in yang-parser-reactor seems to have a hole triggered by OpenROADM models.

      This is evident in https://git.opendaylight.org/gerrit/c/transportpce/+/96939 , where we end up with the following splat:

      [WARNING] Unexpected error processing source RevisionSourceIdentifier [name=org-openroadm-de-operations@2020-05-29]. Please file an issue with this model attached.
      com.google.common.base.VerifyException: Attempted to access reference count of SubstatementContext{definition=StatementDefinitionContext{statement=(urn:ietf:params:xml:ns:yang:yin:1)type}, rawArgument=string}
          at com.google.common.base.Verify.verify (Verify.java:181)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.ReactorStmtCtx.incRef (ReactorStmtCtx.java:686)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.ReplicaStatementContext.<init> (ReplicaStatementContext.java:42)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.StatementContextBase.replicaAsChildOf (StatementContextBase.java:825)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.InferredStatementContext.lambda$reusePrototypeReplicas$5 (InferredStatementContext.java:312)
          at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:195)
          at java.util.stream.ReferencePipeline$2$1.accept (ReferencePipeline.java:177)
          at java.util.Iterator.forEachRemaining (Iterator.java:133)
          at java.util.Spliterators$IteratorSpliterator.forEachRemaining (Spliterators.java:1801)
          at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:484)
          at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:474)
          at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining (StreamSpliterators.java:312)
          at com.google.common.collect.CollectSpliterators$FlatMapSpliterator.lambda$forEachRemaining$1 (CollectSpliterators.java:361)
          at java.util.Spliterators$ArraySpliterator.forEachRemaining (Spliterators.java:948)
          at com.google.common.collect.CollectSpliterators$FlatMapSpliterator.forEachRemaining (CollectSpliterators.java:357)
          at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:484)
          at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:474)
          at java.util.stream.ReduceOps$ReduceOp.evaluateSequential (ReduceOps.java:913)
          at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:234)
          at java.util.stream.ReferencePipeline.collect (ReferencePipeline.java:578)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.InferredStatementContext.reusePrototypeReplicas (InferredStatementContext.java:316)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.InferredStatementContext.reusePrototypeReplicas (InferredStatementContext.java:306)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.InferredStatementContext.tryToReuseSubstatements (InferredStatementContext.java:287)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.InferredStatementContext.tryToReusePrototype (InferredStatementContext.java:228)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.InferredStatementContext.createEffective (InferredStatementContext.java:217)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.StatementContextBase.createEffective (StatementContextBase.java:412)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.ReactorStmtCtx.loadEffective (ReactorStmtCtx.java:382)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.ReactorStmtCtx.buildEffective (ReactorStmtCtx.java:372)
          at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:195)
          at java.util.ArrayList$ArrayListSpliterator.forEachRemaining (ArrayList.java:1655)
          at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:484)
          at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:474)
          at java.util.stream.ReduceOps$ReduceOp.evaluateSequential (ReduceOps.java:913)
          at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:234)
          at java.util.stream.ReferencePipeline.collect (ReferencePipeline.java:578)
          at org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport.buildEffectiveSubstatements (AbstractStatementSupport.java:141)
          at org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport.createEffective (AbstractStatementSupport.java:85)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.StatementContextBase.createEffective (StatementContextBase.java:426)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.StatementContextBase.createEffective (StatementContextBase.java:420)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.StatementContextBase.createEffective (StatementContextBase.java:412)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.ReactorStmtCtx.loadEffective (ReactorStmtCtx.java:382)
          at org.opendaylight.yangtools.yang.parser.stmt.reactor.ReactorStmtCtx.buildEffective (ReactorStmtCtx.java:372)
      

      i.e. we are trying to increment reference count on a statement which has had its processing completed:

              verify(current >= REFCOUNT_NONE, "Attempted to access reference count of %s", this);
      

      The error reproduces most of the time, but the reported model may differ. With some luck the assembly may even finish without an issue.

      Attachments

        1. log.txt.xz
          621 kB
          Robert Varga

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              rovarga Robert Varga
              rovarga Robert Varga
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: