[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-847) Continously updating facts and firing rules leads to OutOfMemoryException

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Thu Jul 12 15:46:14 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBRULES-847?page=all ]

Edson Tirelli resolved JBRULES-847.
-----------------------------------

    Resolution: Done

The problem was a reference chain that was preventing all Tuples, Activations and PropagationContexts to be GC'ed.

I added a simple test case that was generating an OOME after 2.9 million rules were fired for the default 64Mb heap size.

I implemented a fix ( that needs to be reviewed ) that breaks the reference chain. All tests are green, so hopefully there will be no side effect to that. After applying the fix, JProfiler is reporting a completely stable memory footprint. Also, I run the same test to fire over 150 million rules and it did not raised the OOME anymore.

I'm closing the ticket, but if you see any side effect or if you continue to see the OOME, please reopen it.

Thank you for reporting and providing the information to reproduce.

> Continously updating facts and firing rules leads to OutOfMemoryException
> -------------------------------------------------------------------------
>
>                 Key: JBRULES-847
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-847
>             Project: JBoss Rules
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Reteoo
>    Affects Versions: 3.0.5
>         Environment: Linux, Eclipse 3.2, JDK 1.6, JBoss Rules from Maven rep
>            Reporter: Lars Ivar Igesund
>         Assigned To: Edson Tirelli
>             Fix For:  4.0.0.MR4
>
>
> The rules at the end are checked against two facts of type TextileUser. The facts are true for the first rule  when asserted. The action modfies the facts to make them true for the other rule, which again make the facts true for the first rule, creating an infinite loop.
> On my setup, this leads to an OutOfMemoryException after about 40 seconds. Increasing the number of facts to 100 didn't change this.
> --------------------
> rule "User needs textiles"
>  
>         when
>                 #conditions
>                 tu: TextileUser(wantTextile==true)
>         then 
>                 #actions
>                 tu.collectTextiles();
>                 modify( tu );
>  
> end
>  
> rule "User has dirty textiles"
>         #include attributes such as "salience" here...
>         when
>                 #conditions
>                 tu: TextileUser(hasDirtyTextiles == true);
>         then 
>                 #actions
>                 tu.returnTextiles();
>                 modify ( tu );
> end

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list