Created attachment 803047 [details] Maven Eclipse project demonstrating the issue Description of problem: When we run a KieSession.fireUntilHalt(), our application starts consuming 100% CPU, without anything actually happening inside the app (no events/facts are being inserted, no rules are activated/fired, etc.). We've tested this on multiple machines, different OSs, different JDKs, etc., and they all show the same behaviour. Version-Release number of selected component (if applicable): Drools 6.0.0.CR3 Mac OS-X 1.8.5 + Hotspot JDK 1.7.0_40 RHEL 6.4 + OpenJDK 1.7.0_25 Fedora 18 + Java 6. How reproducible: A small test demonstrating the problem has been created. The test loads a simple DRL via KieClasspathContainer, retrieves a new KieSession and runs a KieSession.fireUntilHalt() in a separate thread. After launching the thread, we let the main thread sleep for 30 seconds (3 * 10) and during this time period, CPU load increases to 100%. We then halt the session and sleep for another 10 seconds, which causes the CPU load to back to normal. Steps to Reproduce: 1. run 'mvn clean test' on the project 2. monitor the CPU load on your system Actual results: Expected results: Additional info: This case is the same as the following: https://issues.jboss.org/browse/DROOLS-272
The current fireUntilHalt() implementation is using a busy wait loop. We need to replace it by a wait/notify in the PathMemory.doLinkRule().
This is a blocker from engineering perspective.
+1 from QE.
Just an update, I fixed the 100% CPU problem in a local branch, but that broke a list of other tests. I've been going through each of those tests and fixing the side effects of the code changes. I will keep you posted.
Fixed. 6.0.x: http://github.com/droolsjbpm/drools/commit/a0ec3c66d master: http://github.com/droolsjbpm/drools/commit/fc269f7cf
Edson Tirelli <ed.tirelli> updated the status of jira DROOLS-272 to Resolved
Edson Tirelli <ed.tirelli> updated the status of jira DROOLS-272 to Closed
Verified on BRMS 6.0.0.ER5.