[jboss-jira] [JBoss JIRA] Updated: (JBRULES-792) Some "collect" rules cause hang during assertion
Dirk Bergstrom (JIRA)
jira-events at lists.jboss.org
Mon May 14 23:16:54 EDT 2007
[ http://jira.jboss.com/jira/browse/JBRULES-792?page=all ]
Dirk Bergstrom updated JBRULES-792:
-----------------------------------
Attachment: drools-bug-no-libs.tgz
A drastically pared-down version of my app that demonstrates the bug. It's an eclipse project, just add a "lib" directory containing the following:
antlr-3.0b7.jar
core-3.2.1.v_677_R32x.jar
drools-compiler-4.0.0.SNAPSHOT.jar
drools-core-4.0.0.SNAPSHOT.jar
janino-2.5.5.jar
log4j-1.2.14.jar
mvel14-1.2beta16.jar
It asserts ten User objects, then hangs while asserting the third PRRecord object.
> 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
> 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