Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-211

Race condition causing jitting error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 5.5.1.Final, 6.0.0.Final
    • 5.5.1.Final
    • None
    • None
    • Hide

      test case attached

      Show
      test case attached

    Description

      When there is a rule that retracts a fact while a MvelConstraint.ConditionJitter task runs, then sometimes the jitting task fails with this error...

      java.lang.NullPointerException
      at org.drools.base.defaultpkg.Person13506221$getField10.getValue(Unknown Source)
      at org.drools.base.ClassFieldReader.getValue(ClassFieldReader.java:87)
      at org.drools.rule.Declaration.getValue(Declaration.java:233)
      at org.drools.base.mvel.MVELCompilationUnit.updateFactory(MVELCompilationUnit.java:344)
      at org.drools.base.mvel.MVELCompilationUnit.updateFactory(MVELCompilationUnit.java:289)
      at org.drools.rule.constraint.MvelConditionEvaluator.evaluate(MvelConditionEvaluator.java:62)
      at org.drools.rule.constraint.MvelConditionEvaluator.ensureBranchEvaluation(MvelConditionEvaluator.java:120)
      at org.drools.rule.constraint.MvelConditionEvaluator.ensureCompleteEvaluation(MvelConditionEvaluator.java:105)
      at org.drools.rule.constraint.MvelConditionEvaluator.ensureCompleteEvaluation(MvelConditionEvaluator.java:93)
      at org.drools.rule.constraint.MvelConditionEvaluator.getAnalyzedCondition(MvelConditionEvaluator.java:85)
      at org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:284)
      at org.drools.rule.constraint.MvelConstraint.access$200(MvelConstraint.java:54)
      at org.drools.rule.constraint.MvelConstraint$ConditionJitter.run(MvelConstraint.java:263)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)

      Attachments

        1. JittingTest.java
          2 kB
        2. test.drl
          0.8 kB

        Activity

          People

            mfusco@redhat.com Mario Fusco
            mingfang@mac.com Ming Fang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: