Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-2518

NullPointerException under load

XMLWordPrintable

    • NEW
    • NEW

      I put my Optaplanner under some load, running several multithreaded solvers at once, and ran into this for one of the jobs. I have not been able to reproduce, and not sure if it is fixable. Just wanted to report it. Quarkus 2.0.0.

      OptaPlanner generated an exception for job 5bfccb37-bc93-4959-9e69-f133fa6ae2bf: java.lang.IllegalStateException: The move thread with moveThreadIndex (0) has thrown an exception. Relayed here in the parent thread.OptaPlanner generated an exception for job 5bfccb37-bc93-4959-9e69-f133fa6ae2bf: java.lang.IllegalStateException: The move thread with moveThreadIndex (0) has thrown an exception. Relayed here in the parent thread. at org.optaplanner.core.impl.heuristic.thread.OrderByMoveIndexBlockingQueue.take(OrderByMoveIndexBlockingQueue.java:147) at org.optaplanner.core.impl.constructionheuristic.decider.MultiThreadedConstructionHeuristicDecider.forageResult(MultiThreadedConstructionHeuristicDecider.java:187) at org.optaplanner.core.impl.constructionheuristic.decider.MultiThreadedConstructionHeuristicDecider.decideNextStep(MultiThreadedConstructionHeuristicDecider.java:158) at org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase.solve(DefaultConstructionHeuristicPhase.java:75) at org.optaplanner.core.impl.solver.AbstractSolver.runPhases(AbstractSolver.java:99) at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:175) at org.optaplanner.core.impl.solver.DefaultSolverJob.call(DefaultSolverJob.java:101) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)

      Caused by: Exception executing consequence for rule "RULE NAME" in my.package.domain: java.lang.NullPointerException at org.drools.statics.StaticComponentsSupplier$StaticConsequenceExceptionHandler.handleException(StaticComponentsSupplier.java:77) at org.drools.core.common.DefaultAgenda.handleException(DefaultAgenda.java:1056) at org.drools.core.phreak.RuleExecutor.innerFireActivation(RuleExecutor.java:455) at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:96) at org.drools.core.concurrent.AbstractRuleEvaluator.internalEvaluateAndFire(AbstractRuleEvaluator.java:33) at org.drools.core.concurrent.SequentialRuleEvaluator.evaluateAndFire(SequentialRuleEvaluator.java:43) at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:869) at org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:816) at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:808) at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1345) at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1336) at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1320) at org.optaplanner.core.impl.score.director.stream.DroolsConstraintStreamScoreDirector.calculateScore(DroolsConstraintStreamScoreDirector.java:87) at org.optaplanner.core.impl.score.director.AbstractScoreDirector.doAndProcessMove(AbstractScoreDirector.java:220) at org.optaplanner.core.impl.heuristic.thread.MoveThreadRunner.run(MoveThreadRunner.java:147) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ... 4 more

      Caused by: java.lang.NullPointerException at org.optaplanner.core.impl.score.stream.drools.common.AbstractRuleContext.runConsequence(AbstractRuleContext.java:51) at org.optaplanner.core.impl.score.stream.drools.common.UniRuleContext.lambda$newRuleBuilder$49013618$1(UniRuleContext.java:43) at org.drools.model.functions.Block3$Impl.execute(Block3.java:40) at org.drools.modelcompiler.consequence.LambdaConsequence.evaluate(LambdaConsequence.java:75) at org.drools.core.phreak.RuleExecutor.innerFireActivation(RuleExecutor.java:448) ... 17 more

              lpetrovi@redhat.com Lukáš Petrovický (Inactive)
              magnus.vage Magnus Våge (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: