Bug 986465 - Rule Engine Crashes when used Slide Window constraints and kAgent is configured as incremental processing
Rule Engine Crashes when used Slide Window constraints and kAgent is configur...
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion) (Show other bugs)
BRMS 5.3.1
Unspecified Unspecified
high Severity high
: GA
: ---
Assigned To: Mario Fusco
Marek Winkler
Depends On:
Blocks: 1031099 986451
  Show dependency treegraph
Reported: 2013-07-19 16:55 EDT by Alessandro Lazarotti
Modified: 2013-11-15 10:40 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1031099 (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)
Unit test (7.83 KB, text/x-java)
2013-07-19 16:58 EDT, Alessandro Lazarotti
no flags Details
Maven project with Alessandro's reproducer (5.59 KB, application/zip)
2013-09-13 12:07 EDT, Marek Winkler
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker DROOLS-195 Major Resolved Rule Engine Crashes when used Slide Window constraints and kAgent is configured as incremental processing 2014-05-21 12:21:36 EDT

  None (edit)
Description Alessandro Lazarotti 2013-07-19 16:55:11 EDT
Description of problem:

When there is a Slide Window constraint and the kbase is configured to receive incremental changes from the kagent (drools.agent.newInstance as false) - the engine crashes

How reproducible:
Running the unit test attached.

Actual results:
After some cycles the test hangs just after a changeset update and a next fact insert. 

Expected results:
No crash
Comment 1 Alessandro Lazarotti 2013-07-19 16:58:52 EDT
Created attachment 775963 [details]
Unit test
Comment 2 JBoss JIRA Server 2013-07-19 18:15:17 EDT
Davide Sottara <dsotty@gmail.com> made a comment on jira DROOLS-195

no crashes detected using 5.6.0-SNAPSHOT
Comment 3 Edson Tirelli 2013-07-23 10:06:30 EDT
Lukas, Alessandro, what is the context for this ticket? Is it for 5.3.x or 6.x? If it is for 5, was it reported by a customer and we need to backport the fixes?

Just trying to understand what needs to be done here.
Comment 5 Edson Tirelli 2013-07-23 10:20:14 EDT
Just got the e-mail from Alessandro:

They should be part of the Roll Up Patch BRMS_5.3.1_3_2013 - 
BZs to it should be added and committed until 09/Aug (3 weeks) - after 
that is started the productisation work. So an ETA to get it fixed is 
until 09-Aug.
Comment 6 Mario Fusco 2013-08-08 04:38:59 EDT
I ran the provided unit test on the 5.3.x branch twice doing 1000+ cycles for each run but I couldn't reproduce this issue, so I am assuming the fix has been already backported.
Comment 7 Marek Winkler 2013-09-13 12:02:54 EDT
I am able to reproduce that the engine gets stuck during the test on 5.3.1.BRMS-P04. Although I can see no exception (neither in any log, nor in the output), the main test thread execution hangs (the console keeps printing messages about updating the drl file in another thread).

To reproduce, please run the reproducer in the attached maven project ('mvn clean test').

It seems one of the engine threads gets stuck in the following stacktrace:

Name: Thread-0
Total blocked: 0  Total waited: 2

Stack trace: 
   - locked org.drools.reteoo.ReteooBuilder@622e199e
   - locked org.drools.agent.impl.KnowledgeAgentImpl$RegisteredResourceMap@4094066d
   - locked org.drools.agent.impl.KnowledgeAgentImpl$RegisteredResourceMap@4094066d
   - locked org.drools.agent.impl.KnowledgeAgentImpl$RegisteredResourceMap@4094066d
Comment 8 Marek Winkler 2013-09-13 12:07:45 EDT
Created attachment 797426 [details]
Maven project with Alessandro's reproducer
Comment 9 Alessandro Lazarotti 2013-09-18 13:58:27 EDT
Neil, why this issue was moved from ASSIGNED to ON_QA ? I think that Mario is still working over it to get a fix
Comment 10 Mario Fusco 2013-09-18 14:46:30 EDT
Fixed by https://github.com/droolsjbpm/drools/commit/8f3783dd1
Comment 11 JBoss JIRA Server 2013-09-19 03:01:50 EDT
Mario Fusco <mario.fusco@gmail.com> updated the status of jira DROOLS-195 to Resolved
Comment 12 Marek Winkler 2013-09-20 04:51:29 EDT
Verified on 5.3.1.BRMS-P04.

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