[
https://issues.jboss.org/browse/DROOLS-987?page=com.atlassian.jira.plugin...
]
Mario Fusco commented on DROOLS-987:
------------------------------------
I believe that this problem is caused by drools/jbpm interaction and in particular by the
fact that jbpm is triggering a reentrant flushing of the propagation queue as demonstrated
by the following stack trace. We need to figure out if we can avoid this reentrant
flushing or even better if we can make it safer.
{code}
org.jbpm.workflow.instance.WorkflowRuntimeException: [droolsTest.RFGAB:47 - :4] -- null
at
org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:179)
at
org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:366)
at
org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:325)
at
org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:44)
at
org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:341)
at
org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:318)
at
org.jbpm.workflow.instance.node.RuleSetNodeInstance.signalEvent(RuleSetNodeInstance.java:124)
at
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:490)
at
org.jbpm.process.instance.event.DefaultSignalManager.internalSignalEvent(DefaultSignalManager.java:82)
at
org.jbpm.process.instance.event.DefaultSignalManager$SignalAction.execute(DefaultSignalManager.java:181)
at
org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:78)
at
org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:68)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.flushPropagations(StatefulKnowledgeSessionImpl.java:2003)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.executeQueuedActions(StatefulKnowledgeSessionImpl.java:1548)
at
org.jbpm.process.instance.event.DefaultSignalManager.signalEvent(DefaultSignalManager.java:74)
at
org.jbpm.process.instance.ProcessRuntimeImpl$3.afterRuleFlowGroupDeactivated(ProcessRuntimeImpl.java:458)
at
org.drools.core.event.AgendaEventSupport.fireAfterRuleFlowGroupDeactivated(AgendaEventSupport.java:180)
at org.drools.core.common.DefaultAgenda.getNextFocus(DefaultAgenda.java:552)
at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1341)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1284)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1303)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1293)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1274)
at
org.drools.test.RulesJUnitTest$1.afterRuleFlowGroupActivated(RulesJUnitTest.java:87)
at
org.drools.core.event.AgendaEventSupport.fireAfterRuleFlowGroupActivated(AgendaEventSupport.java:152)
at
org.drools.core.common.DefaultAgenda.activateRuleFlowGroup(DefaultAgenda.java:707)
at
org.drools.core.common.DefaultAgenda.activateRuleFlowGroup(DefaultAgenda.java:695)
at
org.jbpm.workflow.instance.node.RuleSetNodeInstance.internalTrigger(RuleSetNodeInstance.java:88)
at
org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:173)
at
org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:366)
at
org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:325)
at
org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:73)
at
org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:44)
at
org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:173)
at
org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
at
org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:236)
at
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:439)
at
org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:208)
at
org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:191)
at
org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:183)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:1797)
at org.drools.test.RulesJUnitTest$ThreadAB.run(RulesJUnitTest.java:174)
Caused by: java.lang.NullPointerException
at org.drools.core.common.TupleSetsImpl.setNextTuple(TupleSetsImpl.java:343)
at org.drools.core.common.TupleSetsImpl.removeInsert(TupleSetsImpl.java:158)
at org.drools.core.common.TupleSetsImpl.addDelete(TupleSetsImpl.java:97)
at
org.drools.core.reteoo.LeftInputAdapterNode.doDeleteSegmentMemory(LeftInputAdapterNode.java:285)
at
org.drools.core.reteoo.LeftInputAdapterNode.doDeleteObject(LeftInputAdapterNode.java:256)
at
org.drools.core.reteoo.LeftInputAdapterNode.retractLeftTuple(LeftInputAdapterNode.java:351)
at org.drools.core.reteoo.ObjectTypeNode.doRetractObject(ObjectTypeNode.java:333)
at org.drools.core.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:317)
at
org.drools.core.reteoo.EntryPointNode.propagateRetract(EntryPointNode.java:357)
at
org.drools.core.phreak.PropagationEntry$Delete.execute(PropagationEntry.java:173)
at
org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:78)
at
org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:68)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.flushPropagations(StatefulKnowledgeSessionImpl.java:2003)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.executeQueuedActions(StatefulKnowledgeSessionImpl.java:1548)
at
org.jbpm.process.instance.event.DefaultSignalManager.signalEvent(DefaultSignalManager.java:74)
at
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:377)
at
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:384)
at
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.nodeInstanceCompleted(WorkflowProcessInstanceImpl.java:592)
at
org.jbpm.workflow.instance.node.EndNodeInstance.internalTrigger(EndNodeInstance.java:72)
at
org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:173)
... 41 more
{code}
Errors in Phreak under heavy and multi threaded load
-----------------------------------------------------
Key: DROOLS-987
URL:
https://issues.jboss.org/browse/DROOLS-987
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 6.3.0.Final
Environment: linux
Java 7
kernel 3.16
Reporter: Jose Cavieres
Assignee: Mario Fusco
Attachments: jbpm-bussinesruletask-concurrent-6-3-NEW.tgz,
jbpm-bussinesruletask-concurrent-6-3.tgz
Several threads are started, each one starts 1 jbpm process containing rule(s) task(s).
If the threads are few, everything works fine. Under heavy load nullPointerExceptions are
thown most of the time, less frequently fireAllRules never ends and CPU remains at 100%.
Aparently the setFocus method used by rule tasks is related to the problem.
The most comon error is:
Caused by: java.lang.NullPointerException
at
org.drools.core.common.LeftTupleSetsImpl.removeInsert(LeftTupleSetsImpl.java:141)
at org.drools.core.common.LeftTupleSetsImpl.addDelete(LeftTupleSetsImpl.java:80)
at
org.drools.core.reteoo.LeftInputAdapterNode.doDeleteSegmentMemory(LeftInputAdapterNode.java:295)
at
org.drools.core.reteoo.LeftInputAdapterNode.doDeleteObject(LeftInputAdapterNode.java:266)
at
org.drools.core.reteoo.LeftInputAdapterNode.retractLeftTuple(LeftInputAdapterNode.java:361)
at
org.drools.core.reteoo.ObjectTypeNode.doRetractObject(ObjectTypeNode.java:334)
at org.drools.core.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:317)
at
org.drools.core.reteoo.EntryPointNode.propagateRetract(EntryPointNode.java:358)
at
org.drools.core.phreak.PropagationEntry$Delete.execute(PropagationEntry.java:172)
at
org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:96)
at
org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:69)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.flushPropagations(StatefulKnowledgeSessionImpl.java:1993)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)