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

Dirk Bergstrom (JIRA) jira-events at lists.jboss.org
Thu Apr 12 19:47:01 EDT 2007


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

Dirk Bergstrom updated JBRULES-792:
-----------------------------------

    Attachment: stacktraces.txt

Some stacktraces of the hung thread (taken with `kill -3`) while the app was hung.

> 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: 3.1-m2
>            Reporter: Dirk Bergstrom
>         Assigned To: Mark Proctor
>         Attachments: 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