Bug 1288009 - [GSS](6.2.z) Drools execution stuck due to infinite loop
[GSS](6.2.z) Drools execution stuck due to infinite loop
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
Unspecified Unspecified
high Severity high
: CR1
: 6.2.1
Assigned To: Mario Fusco
Marek Winkler
Depends On:
Blocks: 1288021 1288023 1295521
  Show dependency treegraph
Reported: 2015-12-03 05:14 EST by Martin Weiler
Modified: 2016-01-18 09:49 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1295521 (view as bug list)
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Martin Weiler 2015-12-03 05:14:25 EST
Description of problem:
Executing a process with multiple BusinessRulesTask is getting stuck in an infinite loop.

A sucessfully validated DRL  is executed by a jbpm process . The execution stops at the node where the business rule task should be executed; the java process consumes all available CPU time and the BPM Suite execution is not possible for any other process.

If the complete DRL is used, the behaviour desribed above occurs. If one of the rules is ommitted, the rule execution works! Here is a simplified version of those rules:

rule r1 ruleflow-group "group1"
    salience 100
    $person: Person( $addressList : addresses ) 
    Address( zipCode == "10243" ) from $addressList
    $cheese : Cheese( )
    System.out.println("r1 executed");

rule r2 ruleflow-group "group1"
    salience 5
    $person: Person( $addressList : addresses ) 
    Address( zipCode == "10318" ) from $addressList
    $cheese : Cheese( )  
    System.out.println("r2 executed");

Note the usage of the 'from' keyword. Its usage with very similar fact attributes seems to confuse the whole evaluation algorithm.

We have simulated the problem in a unit test and have found that the evaluation of rules repeatedly (infinited)  executes the method org.drools.core.reteoo.FromNode.createPeer() 


Taking a heap dump after the infinite loop is entered showed a huge number of FromNodeLeftTuple instances.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. See reproducer

Actual results:
Drools enters an infinite loop

Expected results:
Process and rules execution finishes normally

Additional info:
This is fixed by the changes related to DROOLS-992:
Comment 3 Mario Fusco 2015-12-04 08:43:16 EST
Fix backported to 6.3.x branch with https://github.com/droolsjbpm/drools/commit/245acce2f
Comment 4 Marek Winkler 2016-01-18 09:49:02 EST
Verified in BRMS 6.2.1 CR1 by using the attached reproducer.

Note You need to log in before you can comment on or make changes to this bug.