Uploaded image for project: 'JBoss BRMS Platform'
  1. JBoss BRMS Platform
  2. RHBRMS-2669

NPE happens in TupleSetsImpl.setNextTuple()

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 6.4.0
    • 6.3.3.GA
    • BRE
    • Release Notes
    • CR1
    • Hide
      The fix to this issue has changed the previous (wrong) rule firing behaviour in the following scenario:
      - there is a rule R1 with a duration D,
      - event E is inserted into working memory, causing the rule R1 to fire,
      - after time T < D, the event E expires from the working memory, therefore the rule should no longer fire:
        -- in 6.4.0 CR1, the rule would not fire (correct),
        -- in previous versions, the rule would still fire (incorrect behaviour according to the definition of duration - "The duration dictates that the rule will fire after a specified duration, if it is still true." [2]).

      [1] https://github.com/droolsjbpm/drools/commit/3274d4456183b9d7a6a7109929b010836a6efe7c#diff-877d052095c6ef90a71d6c53f0bd2010R225
      [2] https://docs.jboss.org/drools/release/6.5.0.Final/drools-docs/html/ch08.html#d0e9196
      Show
      The fix to this issue has changed the previous (wrong) rule firing behaviour in the following scenario: - there is a rule R1 with a duration D, - event E is inserted into working memory, causing the rule R1 to fire, - after time T < D, the event E expires from the working memory, therefore the rule should no longer fire:   -- in 6.4.0 CR1, the rule would not fire (correct),   -- in previous versions, the rule would still fire (incorrect behaviour according to the definition of duration - "The duration dictates that the rule will fire after a specified duration, if it is still true." [2]). [1] https://github.com/droolsjbpm/drools/commit/3274d4456183b9d7a6a7109929b010836a6efe7c#diff-877d052095c6ef90a71d6c53f0bd2010R225 [2] https://docs.jboss.org/drools/release/6.5.0.Final/drools-docs/html/ch08.html#d0e9196
    • Hide

      rum mvn test with reproducer customer provided.
      (I can't attach it to the ticket as it contains customer's private data.)

      Show
      rum mvn test with reproducer customer provided. (I can't attach it to the ticket as it contains customer's private data.)

      In customer's performance test case, NPE happens in TupleSetsImpl.setNextTuple() with the following stack.

      java.lang.NullPointerException
      at org.drools.core.common.TupleSetsImpl.setNextTuple(TupleSetsImpl.java:352)
      at org.drools.core.common.TupleSetsImpl.removeInsert(TupleSetsImpl.java:168)
      at org.drools.core.phreak.RuleNetworkEvaluator.deleteChildLeftTuple(RuleNetworkEvaluator.java:729)
      at org.drools.core.phreak.RuleNetworkEvaluator.unlinkAndDeleteChildLeftTuple(RuleNetworkEvaluator.java:721)
      at org.drools.core.phreak.PhreakNotNode.doRightUpdates(PhreakNotNode.java:343)
      at org.drools.core.phreak.PhreakNotNode.doNode(PhreakNotNode.java:74)
      at org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:524)
      at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:505)
      at org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:341)
      at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:301)
      at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:136)
      at org.drools.core.phreak.AddRemoveRule.forceFlushLeftTuple(AddRemoveRule.java:692)
      at org.drools.core.phreak.AddRemoveRule.flushLeftTupleIfNecessary(AddRemoveRule.java:629)
      at org.drools.core.reteoo.NotNode.assertObject(NotNode.java:161)
      at org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:494)
      at org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:384)
      at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:134)
      at org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:494)
      at org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:384)
      at org.drools.core.reteoo.ObjectTypeNode.propagateAssert(ObjectTypeNode.java:304)
      at org.drools.core.phreak.PropagationEntry$Insert.execute(PropagationEntry.java:132)
      at org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:82)
      at org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:72)
      at org.drools.core.impl.StatefulKnowledgeSessionImpl.flushPropagations(StatefulKnowledgeSessionImpl.java:2053)
      at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:128)
      at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:74)
      at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:960)
      at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1303)
      at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1241)
      at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1336)
      at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1327)
      at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1308)

              mfusco@redhat.com Mario Fusco
              rhn-support-hmiura Hiroko Miura
              Archiver:
              rhn-support-ceverson Clark Everson
              Martin Cimbalek Martin Cimbalek (Inactive)
              Martin Cimbalek Martin Cimbalek (Inactive)

                Created:
                Updated:
                Resolved:
                Archived: