[rules-users] How is this possible?

Greg Barton greg_barton at yahoo.com
Tue Jul 6 12:05:16 EDT 2010


Does the amount of heap allocated affect it?  I'm wondering if there's a hidden OutOfMemoryError happening. (Which, if you're catching Throwable anywhere, is a possibility.  Use the HeapDumpOnOutOfMemoryError VM flag to diagnose this.) And this should be easy to reproduce in your unit tests:  just insert many unrelated objects into working memory during the test.  In fact you could construct tests thst show the same code succeeding without the excess objects then failing with them.  That would be essential if you think this is a core drools problem and want it fixed.

GreG

On Jul 6, 2010, at 10:28 AM, "Axelrod, Nelson" <naxelrod at jcvi.org> wrote:

Hi,

We’re having some troubling problems that can be best explained by the following two rules.  Based on the facts inserted into the stateful knowledge session, we expected both rules to fire for an Hmm Hit to TIGR00549, but only the “Test” rule fires.  Can anyone explain how this could possibly occur?  There are no other rules added to the knowledge base.  This was tested using Drools 5.0 on Windows XP and Linux environments.

 

rule "HMM Hit"

      when

            hit : HmmHit( aboveTrustedHit == true )

            p     : FeatureProperty( id == hit.hitId )

            f     : Feature ( featureId == hit.queryId, properties not contains p )

      then

            if (hit.getHitId().equals("TIGR00549")) {

                  System.err.println("HMM Hit rule: " + hit.getHitId() + " " + hit.getQueryId());

            }

 end

 

rule "Test"

      when

            hit : HmmHit( aboveTrustedHit == true, hitId == "TIGR00549")

            p     : FeatureProperty( id == hit.hitId )

            f     : Feature ( featureId == hit.queryId, properties not contains p )

      then

            System.err.println("Test rule: " + hit.getHitId() + " " + hit.getQueryId());

end

 

Notably, this error is dependent on the amount and/or order of facts loaded into the knowledge session although we’re talking < 20k facts total.  We have repeatedly found problems when running system-level tests of our production rules that do not appear when we run our unit tests, with issues such as this one that only show up after loading some number of facts that are unrelated to the particular fact in question.   It’s difficult to debug because we can see that fact handles that satisfy the when conditions are in the knowledge session (i.e. the same facts that fulfill the Test rule), but we do not have any obvious way to debug why the expected HMM Hit rule does not fire.

 

Nelson

 

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100706/62ba0396/attachment-0001.html 


More information about the rules-users mailing list