Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-272

KieSession.fireUntilHalt() consumes 100% CPU

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 6.0.0.CR5
    • 6.0.0.CR3
    • None
    • None

    Description

      When I run a KieSession.fireUntilHalt(), my 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.

      I've created a small test that shows the problem. 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, I let the main thread sleep for 30 seconds (3 * 10) and during this time period, CPU load increases to 100%. I then halt the session and sleep for another 10 seconds, which causes the CPU load to back to normal. The test project can be found here: https://github.com/DuncanDoyle/DroolsFireUntilHalt/
      Just run 'mvn clean test' on the project.

      Attachments

        Activity

          People

            etirelli@redhat.com Edson Tirelli
            rhn-gps-ddoyle Duncan Doyle (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: