[jboss-jira] [JBoss JIRA] (JBRULES-3283) Concurrency issue: Invalid bytecode generated by KnowledgeBuilder.add()

RH Bugzilla Integration (JIRA) jira-events at lists.jboss.org
Mon Mar 18 16:10:42 EDT 2013


    [ https://issues.jboss.org/browse/JBRULES-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761673#comment-12761673 ] 

RH Bugzilla Integration commented on JBRULES-3283:
--------------------------------------------------

Shay Matasaro <smatasar at redhat.com> made a comment on [bug 851234|https://bugzilla.redhat.com/show_bug.cgi?id=851234]

Customer has asked for a patch on 5.3 for this item, here is their issue description:

The other issue, JBRULES-3283, is actually more important. We're loading KnowledgeBuilders and KnowledgeBases on demand in various 'rule engine' components in the system (to minimize the memory footprint, '.drl' files which are not required/requested are not loaded). These engines can be accessed in parallel. Furthermore, we have one engine in which we load 71 ".drl" files in parallel into different KnowlegdeBuilders to speed up initialization. Due to JBRULES-3283 we manually need to synchronize every 'KnowledgeBuilder.add()' call using a common monitor, even though we're using different KnowlegdeBuilders. This 'workaround' is quite error-prone and when one forgets to apply it, can lead to non-deterministic problems in our rule engines.
                
> Concurrency issue: Invalid bytecode generated by KnowledgeBuilder.add()
> -----------------------------------------------------------------------
>
>                 Key: JBRULES-3283
>                 URL: https://issues.jboss.org/browse/JBRULES-3283
>             Project: JBRULES
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-compiler (expert)
>    Affects Versions: 5.3.0.CR1, 5.3.0.Final
>         Environment: Oracle Java 6, Oracle Java 7, Linux, MacOS
> java version "1.6.0_26"
> Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
> Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
>            Reporter: Thomas Kruse
>            Assignee: Mario Fusco
>            Priority: Minor
>             Fix For: 5.4.0.Beta2
>
>         Attachments: drools53.tgz
>
>
> Since Drools 5.3.0.CR1 concurrent creation of different knowledgebases from filesystem DRL rule definition leads to illegal bytecode.
> Reproduceable with Janino and eclipse compiler.
> I have a maven based test project which executes the unit tests in parallel, this is the result:
> {code}
> runFirst(de.trion.drools53.TwoTest): -1
>   runFirst(de.trion.drools53.FourTest): (class: de/trion/drools53/Rule_When_a_user_is_young__print_his_name_DefaultConsequenceInvoker, method: equals signature: (Ljava/lang/Object;)Z) Expecting to find integer on stack
>   runSecond(de.trion.drools53.FourTest): (class: de/trion/drools53/Rule_When_a_user_is_young__print_his_name_DefaultConsequenceInvoker, method: equals signature: (Ljava/lang/Object;)Z) Expecting to find integer on stack
>   runFirst(de.trion.drools53.OneTest): (class: de/trion/drools53/Rule_When_a_user_is_young__print_his_name_DefaultConsequenceInvoker, method: equals signature: (Ljava/lang/Object;)Z) Expecting to find integer on stack
>   runFirst(de.trion.drools53.ThreeTest): (class: de/trion/drools53/Rule_When_a_user_is_young__print_his_name_DefaultConsequenceInvoker, method: equals signature: (Ljava/lang/Object;)Z) Incompatible object argument for function call
>   runSecond(de.trion.drools53.ThreeTest): (class: de/trion/drools53/Rule_When_there_is_god__the_light_always_shines_DefaultConsequenceInvoker, method: equals signature: (Ljava/lang/Object;)Z) Unable to pop operand off an empty stack
> {code}
> Workaround: synchronize access
> Not affected: Drools 5.3.0.Beta

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list