]
Mario Fusco commented on DROOLS-1103:
-------------------------------------
Are you able to provide a reproducer for this issue?
FireAllRules can trigger
java.util.concurrent.RejectedExecutionException from the JDKTimerService
-------------------------------------------------------------------------------------------------
Key: DROOLS-1103
URL:
https://issues.jboss.org/browse/DROOLS-1103
Project: Drools
Issue Type: Bug
Affects Versions: 6.3.0.Final
Reporter: Juan Carlos Garcia
Assignee: Mario Fusco
Under very rare circumstance we have found the following exception
*java.util.concurrent.RejectedExecutionException* in our production log.
Our guess is that the Drools Session is on its way to be dispose, while a new incoming
request is in the middle of a fireAllRules operation (race condition).
I will try to provide a reproducible testcase for this.
{code}
Caused by: java.util.concurrent.RejectedExecutionException: Task
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@3e896443 rejected
from java.util.concurrent.ScheduledThreadPoolExecutor@71cc2f4c[Terminated, pool size = 0,
active threads = 0, queued tasks = 0, completed tasks = 0]
at
java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
at
java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:326)
at
java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:549)
at
org.drools.core.time.impl.JDKTimerService.internalSchedule(JDKTimerService.java:118)
at
org.drools.core.time.impl.JDKTimerService.scheduleJob(JDKTimerService.java:101)
at
org.drools.core.phreak.PhreakTimerNode.scheduleTimer(PhreakTimerNode.java:304)
at
org.drools.core.phreak.PhreakTimerNode.scheduleLeftTuple(PhreakTimerNode.java:233)
at
org.drools.core.phreak.PhreakTimerNode.doLeftUpdates(PhreakTimerNode.java:131)
at org.drools.core.phreak.PhreakTimerNode.doNode(PhreakTimerNode.java:65)
at
org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:357)
at
org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161)
at
org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116)
at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:194)
at
org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:67)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200)
at
org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:957)
at
org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:936)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:260)
at XXXXXX.XXXXX.XXXXX.processEventDrools(EventProcessorImpl.java:128)
at XXXXXX.XXXXX.XXXXX.processEvent(EventProcessorImpl.java:101)
{code}