[JBoss JIRA] (JBRULES-3283) Concurrency issue: Invalid bytecode generated by KnowledgeBuilder.add()
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/JBRULES-3283?page=com.atlassian.jira.plug... ]
RH Bugzilla Integration commented on JBRULES-3283:
--------------------------------------------------
Shay Matasaro <smatasar(a)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
13 years, 4 months
[JBoss JIRA] (AS7-6681) ClusteredSingleSignOn ClassCastException with non-distributable apps
by Dennis Reed (JIRA)
[ https://issues.jboss.org/browse/AS7-6681?page=com.atlassian.jira.plugin.s... ]
Dennis Reed commented on AS7-6681:
----------------------------------
The behavior is a little different in AS 7.1.3 and AS 7.2.
In both, this will cause some sessions to not be expired correctly.
In 7.1.3 this will also cause an error in the request (the error happened during the prepare phase and caused a rollback)
In 7.2 it will no longer cause an error in the request (side effect of https://issues.jboss.org/browse/ISPN-2054 causes the notification to happen during the commit instead of the prepare phase).
> ClusteredSingleSignOn ClassCastException with non-distributable apps
> --------------------------------------------------------------------
>
> Key: AS7-6681
> URL: https://issues.jboss.org/browse/AS7-6681
> Project: Application Server 7
> Issue Type: Bug
> Components: Web
> Affects Versions: 7.1.3.Final (EAP)
> Reporter: Dennis Reed
> Assignee: Dennis Reed
> Attachments: test.war
>
>
> When ClusteredSingleSignOn is enabled, and a user has an active session in a non-distributable web application, invalidating any session in the same SSO from a different AS instance in the cluster causes the following exception (logged numerous times in various ways):
> ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (OOB-20,null) ISPN000136: Execution error: org.infinispan.CacheException: Caught exception [java.lang.ClassCastException] while invoking method [public void org.jboss.as.clustering.web.sso.infinispan.SSOClusterManager.cacheEntryRemoved(org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent)] on listener instance: org.jboss.as.clustering.web.sso.infinispan.SSOClusterManager@28e13c84
> ...
> Caused by: java.lang.ClassCastException: org.apache.catalina.session.StandardSession cannot be cast to org.jboss.as.web.session.ClusteredSession
> at org.jboss.as.web.sso.ClusteredSingleSignOn.deregisterLocal(ClusteredSingleSignOn.java:523) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
> ...
--
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
13 years, 4 months
[JBoss JIRA] (AS7-4126) double values cannot be read from dmr response
by Heiko Braun (JIRA)
[ https://issues.jboss.org/browse/AS7-4126?page=com.atlassian.jira.plugin.s... ]
Heiko Braun commented on AS7-4126:
----------------------------------
DataInput.java, readDouble()
return IEEE754.toDouble(JsArrayUtils.readOnlyJsArray(doubleBytes));
IEEE754.toDouble() now:
public static native double toDouble(JsArrayInteger bytes)
> double values cannot be read from dmr response
> ----------------------------------------------
>
> Key: AS7-4126
> URL: https://issues.jboss.org/browse/AS7-4126
> Project: Application Server 7
> Issue Type: Bug
> Components: Console
> Affects Versions: 7.1.0.Final
> Reporter: Rob Cernich
> Assignee: Heiko Braun
> Fix For: 7.1.2.Final (EAP)
>
>
> This appears to be a bug in the GWT compiler. The compiler turns the following:
> {code:java|title=DataInput.readDouble()}
> return IEEE754.toDouble(bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++]);
> {code}
> into: (effectively; the GWT compiler is adding a set of parentheses around the parameters passed to the native function)
> {code:java|title=DataInput.readDouble() compiled}
> return IEEE754.toDouble(new byte[] {bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++]});
> {code}
> This results in all double values in the model being interpreted as NaN.
> I've patched the code I'm using in SwitchYard as follows:
> {code:java|title=DataInput.java}
> public double readDouble() throws IOException {
> byte doubleBytes[] = new byte[8];
> readFully(doubleBytes);
> return IEEE754.toDouble(doubleBytes);
> }
> {code}
> {code:java|title=IEEE754.java}
> public static native double toDouble(byte[] bytes) /*-{
> var ebits = 11;
> var fbits = 52;
> // Bytes to bits
> var bits = [];
> //snip...
> }
> {code}
--
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
13 years, 4 months
[JBoss JIRA] (AS7-4126) double values cannot be read from dmr response
by Rob Cernich (JIRA)
[ https://issues.jboss.org/browse/AS7-4126?page=com.atlassian.jira.plugin.s... ]
Rob Cernich commented on AS7-4126:
----------------------------------
I recommend changing the signature to use JsArrayInteger, as this works in both dev and production modes. The current input can easily be converting using JsArrayUtils.readOnlyJsArray(doubleBytes).
> double values cannot be read from dmr response
> ----------------------------------------------
>
> Key: AS7-4126
> URL: https://issues.jboss.org/browse/AS7-4126
> Project: Application Server 7
> Issue Type: Bug
> Components: Console
> Affects Versions: 7.1.0.Final
> Reporter: Rob Cernich
> Assignee: Heiko Braun
> Fix For: 7.1.2.Final (EAP)
>
>
> This appears to be a bug in the GWT compiler. The compiler turns the following:
> {code:java|title=DataInput.readDouble()}
> return IEEE754.toDouble(bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++]);
> {code}
> into: (effectively; the GWT compiler is adding a set of parentheses around the parameters passed to the native function)
> {code:java|title=DataInput.readDouble() compiled}
> return IEEE754.toDouble(new byte[] {bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++]});
> {code}
> This results in all double values in the model being interpreted as NaN.
> I've patched the code I'm using in SwitchYard as follows:
> {code:java|title=DataInput.java}
> public double readDouble() throws IOException {
> byte doubleBytes[] = new byte[8];
> readFully(doubleBytes);
> return IEEE754.toDouble(doubleBytes);
> }
> {code}
> {code:java|title=IEEE754.java}
> public static native double toDouble(byte[] bytes) /*-{
> var ebits = 11;
> var fbits = 52;
> // Bytes to bits
> var bits = [];
> //snip...
> }
> {code}
--
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
13 years, 4 months
[JBoss JIRA] (AS7-4126) double values cannot be read from dmr response
by Rob Cernich (JIRA)
[ https://issues.jboss.org/browse/AS7-4126?page=com.atlassian.jira.plugin.s... ]
Rob Cernich reopened AS7-4126:
------------------------------
This is back in 1.5.1.Final
> double values cannot be read from dmr response
> ----------------------------------------------
>
> Key: AS7-4126
> URL: https://issues.jboss.org/browse/AS7-4126
> Project: Application Server 7
> Issue Type: Bug
> Components: Console
> Affects Versions: 7.1.0.Final
> Reporter: Rob Cernich
> Assignee: Heiko Braun
> Fix For: 7.1.2.Final (EAP)
>
>
> This appears to be a bug in the GWT compiler. The compiler turns the following:
> {code:java|title=DataInput.readDouble()}
> return IEEE754.toDouble(bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++]);
> {code}
> into: (effectively; the GWT compiler is adding a set of parentheses around the parameters passed to the native function)
> {code:java|title=DataInput.readDouble() compiled}
> return IEEE754.toDouble(new byte[] {bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++], bytes[pos++]});
> {code}
> This results in all double values in the model being interpreted as NaN.
> I've patched the code I'm using in SwitchYard as follows:
> {code:java|title=DataInput.java}
> public double readDouble() throws IOException {
> byte doubleBytes[] = new byte[8];
> readFully(doubleBytes);
> return IEEE754.toDouble(doubleBytes);
> }
> {code}
> {code:java|title=IEEE754.java}
> public static native double toDouble(byte[] bytes) /*-{
> var ebits = 11;
> var fbits = 52;
> // Bytes to bits
> var bits = [];
> //snip...
> }
> {code}
--
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
13 years, 4 months
[JBoss JIRA] (AS7-6746) "Problems un-registering MBeans: CacheException: Failure while unregistering mbeans" on server shutdown
by Radoslav Husar (JIRA)
Radoslav Husar created AS7-6746:
-----------------------------------
Summary: "Problems un-registering MBeans: CacheException: Failure while unregistering mbeans" on server shutdown
Key: AS7-6746
URL: https://issues.jboss.org/browse/AS7-6746
Project: Application Server 7
Issue Type: Enhancement
Components: Clustering
Affects Versions: No Release
Reporter: Radoslav Husar
Assignee: Paul Ferraro
Fix For: 8.0.0.Alpha1
Just saw this when i was closely checking logs from clustering testsuite.
Affected: master 8a6aac3c8eb6bc94b7eddfa4d090c9ac05c7e37b
{code}
15:09:34,380 INFO [org.apache.catalina.core] (MSC service thread 1-6) JBWEB001079: Container org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/] has not been started
15:09:34,381 INFO [org.apache.coyote.http11] (MSC service thread 1-1) JBWEB003075: Coyote HTTP/1.1 pausing on: http-/127.0.0.1:8180
15:09:34,381 INFO [org.apache.coyote.http11] (MSC service thread 1-1) JBWEB003077: Coyote HTTP/1.1 stopping on : http-/127.0.0.1:8180
15:09:34,385 INFO [org.jboss.web] (ServerService Thread Pool -- 55) JBAS018224: Unregister web context: /stateful
15:09:34,397 INFO [org.infinispan.eviction.PassivationManagerImpl] (ServerService Thread Pool -- 6) ISPN000029: Passivating all entries to disk
15:09:34,398 INFO [org.infinispan.eviction.PassivationManagerImpl] (ServerService Thread Pool -- 6) ISPN000030: Passivated 0 entries in 0 milliseconds
15:09:34,403 INFO [org.infinispan.eviction.PassivationManagerImpl] (ServerService Thread Pool -- 54) ISPN000029: Passivating all entries to disk
15:09:34,404 INFO [org.infinispan.eviction.PassivationManagerImpl] (ServerService Thread Pool -- 54) ISPN000030: Passivated 0 entries in 0 milliseconds
15:09:34,407 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 6) JBAS010282: Stopped org.jboss.as.test.clustering.cluster.ejb3.xpc.bean.StatefulBean cache from ejb container
15:09:34,407 INFO [org.apache.coyote.ajp] (MSC service thread 1-8) JBWEB003048: Pausing Coyote AJP/1.3 on ajp-/127.0.0.1:8109
15:09:34,408 INFO [org.apache.coyote.ajp] (MSC service thread 1-8) JBWEB003051: Stopping Coyote AJP/1.3 on ajp-/127.0.0.1:8109
15:09:34,411 INFO [org.infinispan.eviction.PassivationManagerImpl] (MSC service thread 1-2) ISPN000029: Passivating all entries to disk
15:09:34,411 INFO [org.infinispan.eviction.PassivationManagerImpl] (MSC service thread 1-2) ISPN000030: Passivated 0 entries in 0 milliseconds
15:09:34,413 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 54) JBAS010282: Stopped org.jboss.as.test.clustering.cluster.ejb3.xpc.bean.SecondBean cache from ejb container
15:09:34,419 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-2) JBAS010282: Stopped default-host/stateful cache from web container
15:09:34,437 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 54) JBAS011403: Stopping Persistence Unit Service 'stateful.war#mypc'
15:09:34,440 INFO [org.infinispan.eviction.PassivationManagerImpl] (MSC service thread 1-3) ISPN000029: Passivating all entries to disk
15:09:34,440 INFO [org.infinispan.eviction.PassivationManagerImpl] (MSC service thread 1-3) ISPN000030: Passivated 0 entries in 0 milliseconds
15:09:34,445 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 54) JBAS010282: Stopped stateful.war#mypc.org.jboss.as.test.clustering.cluster.ejb3.xpc.bean.Employee cache from hibernate container
15:09:34,449 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) JBAS010282: Stopped repl cache from web container
15:09:34,451 INFO [org.infinispan.eviction.PassivationManagerImpl] (MSC service thread 1-8) ISPN000029: Passivating all entries to disk
15:09:34,451 INFO [org.infinispan.eviction.PassivationManagerImpl] (MSC service thread 1-8) ISPN000030: Passivated 0 entries in 0 milliseconds
15:09:34,452 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-1) JBAS010282: Stopped remote-connector-client-mappings cache from ejb container
15:09:34,459 INFO [org.infinispan.jmx.CacheJmxRegistration] (ServerService Thread Pool -- 54) ISPN000031: MBeans were successfully registered to the platform MBean server.
15:09:34,460 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-3) ISPN000080: Disconnecting and closing JGroups Channel
15:09:34,460 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 54) JBAS010281: Started local-query cache from hibernate container
15:09:34,461 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 54) HHH000227: Running hbm2ddl schema export
15:09:34,457 WARN [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-8) ISPN000032: Problems un-registering MBeans: org.infinispan.CacheException: Failure while unregistering mbeans
at org.infinispan.jmx.ComponentsJmxRegistration.unregisterMBeans(ComponentsJmxRegistration.java:105)
at org.infinispan.jmx.AbstractJmxRegistration.unregisterMBeans(AbstractJmxRegistration.java:70)
at org.infinispan.jmx.CacheJmxRegistration.stop(CacheJmxRegistration.java:107)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_17]
at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:203)
at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:886)
at org.infinispan.factories.AbstractComponentRegistry.internalStop(AbstractComponentRegistry.java:693)
at org.infinispan.factories.AbstractComponentRegistry.stop(AbstractComponentRegistry.java:571)
at org.infinispan.factories.ComponentRegistry.stop(ComponentRegistry.java:242)
at org.infinispan.CacheImpl.stop(CacheImpl.java:604)
at org.infinispan.CacheImpl.stop(CacheImpl.java:599)
at org.infinispan.AbstractDelegatingCache.stop(AbstractDelegatingCache.java:348)
at org.jboss.as.clustering.infinispan.subsystem.CacheService.stop(CacheService.java:96)
at org.jboss.as.clustering.msc.AsynchronousService.stop(AsynchronousService.java:114) [jboss-as-clustering-common-8.0.0.Alpha1-SNAPSHOT.jar:8.0.0.Alpha1-SNAPSHOT]
at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:2080) [jboss-msc-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:2041) [jboss-msc-1.1.1.Final.jar:1.1.1.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
Caused by: javax.management.InstanceNotFoundException: jboss.infinispan:type=Cache,name="repl(repl_sync)",manager="ejb",component=StateTransferManager
at org.jboss.as.jmx.PluggableMBeanServerImpl.findDelegate(PluggableMBeanServerImpl.java:94)
at org.jboss.as.jmx.PluggableMBeanServerImpl.unregisterMBean(PluggableMBeanServerImpl.java:360)
at org.infinispan.jmx.JmxUtil.unregisterMBean(JmxUtil.java:112)
at org.infinispan.jmx.ComponentsJmxRegistration.unregisterMBeans(ComponentsJmxRegistration.java:101)
... 21 more
{code}
Same as https://issues.jboss.org/browse/AS7-4247
--
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
13 years, 4 months