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

Jitting process may randomly fail during multithreaded execution

XMLWordPrintable

    • 2017 Week 34-35
    • NEW
    • NEW

      The jitting process assumes that the mvel constraint has been evaluated at least once before it kicks in. This may not be the case during a multithreaded execution (especially when running with many threads and a very low jitting threshold) because the jitting process may start when other threads have already requested the constraint evaluation using the mvel interpreted constraint (thus incrementing the jitting counter) but none of them had enough time to complete it. When this happens the jitting process trying to work on an uncompleted AST throwing internally an exception like the following:

      Exception in thread "drools-worker-1" java.lang.RuntimeException: java.lang.RuntimeException: Null accessor on node: firings
      	at org.drools.core.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:346)
      	at org.drools.core.rule.constraint.MvelConstraint.access$200(MvelConstraint.java:82)
      	at org.drools.core.rule.constraint.MvelConstraint$ConditionJitter.run(MvelConstraint.java:313)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.RuntimeException: Null accessor on node: firings
      	at org.drools.core.rule.constraint.ConditionAnalyzer.analyzeNode(ConditionAnalyzer.java:302)
      	at org.drools.core.rule.constraint.ConditionAnalyzer.analyzeSingleCondition(ConditionAnalyzer.java:159)
      	at org.drools.core.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:138)
      	at org.drools.core.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:109)
      	at org.drools.core.rule.constraint.MvelConditionEvaluator.getAnalyzedCondition(MvelConditionEvaluator.java:129)
      	at org.drools.core.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:333)
      	... 5 more
      

              mfusco@redhat.com Mario Fusco
              mfusco@redhat.com Mario Fusco
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: