[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-792) Some "collect" rules cause hang during assertion

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Mon May 28 19:20:08 EDT 2007


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

Edson Tirelli resolved JBRULES-792.
-----------------------------------

    Fix Version/s:  4.0.0.MR3
       Resolution: Done

Dirk,

Thank you very much for reporting and providing a test case. There was indeed a subtle problem in collect and accumulate nodes.
Fixed in trunk and fix will be included in the next milestone release.

Please let me know if you face any other problem.

Edson

> Some "collect" rules cause hang during assertion
> ------------------------------------------------
>
>                 Key: JBRULES-792
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-792
>             Project: JBoss Rules
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 4.0.0.MR2
>            Reporter: Dirk Bergstrom
>         Assigned To: Edson Tirelli
>             Fix For:  4.0.0.MR3
>
>         Attachments: drools-bug-no-libs.tgz, stacktraces.txt
>
>
> Some combinations of collect rules and objects result in an endless
> busy loop during assertion (100% CPU usage for 18 hours and counting).
> The problem doesn't happen for every object, but it is repeatable for
> a given object.
> For instance, with the following rule:
> rule "Find all RLIs for user"
> when
>   $user : User( )
>   $rli_list : RecordSet( size > 0 ) from
>    collect( RLIRecord( $resp : responsible -> ( $user.hasReport($resp) ) ) )
> then
>  $user.setRecords($rli_list, DataSource.RLI);
> end
> With 92 Users asserted, my code asserts the first 1368 RLI objects at 6-8
> miliseconds per assertion, then hangs hard on #1369 (always the same
> object).  It has sat there occupying a cpu full time for the last 18
> hours, with no visible progress.
> On the other hand, with these two rules:
> when
>   $release : ReleaseRecord( $relname : relname )
>   $user : User( )
>   $pr_list : RecordSet( size > 0 ) from
>    collect( PRRecord( releases contains $relname,
>     $resp : responsible -> ( $user.hasReport($resp) ) ) )
> then
>  $user.setRecords($pr_list, $release, DataSource.GNATS);
> end
> rule "Find all PRs for user"
> when
>   $user : User( )
>   $pr_list : RecordSet( size > 0 ) from
>    collect( PRRecord( $resp : responsible -> ( $user.hasReport($resp) ) ) )
> then
>  $user.setRecords($pr_list, DataSource.GNATS);
> end
> With 92 Users and 37 ReleaseRecords asserted, I can assert all 10600
> PR objects, at between 10 and 100 msec per (it slows down a bit
> towards the end).  Then on the next cycle the app asserts several
> hundred more User objects, and later asserts another 1500 Users,
> without a hitch.
> If need be, I have examples of other rule/object combinations that do
> and don't work.  Note that a version of the RLIRecord class is
> attached to JBRULES 740.
> I'm using trunk, at revision 108xx -- forgot to note the exact
> revision, but it includes tirelli's hashcode caching, and a few other
> changes after that.
> This is a follow-on to JBRULES 740.

-- 
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