[JBoss JIRA] (DROOLS-2347) ProtobufOutputMarshaller.orderFacts causes a "Comparison method violates its general contract" error
by Martin Weiler (JIRA)
Martin Weiler created DROOLS-2347:
-------------------------------------
Summary: ProtobufOutputMarshaller.orderFacts causes a "Comparison method violates its general contract" error
Key: DROOLS-2347
URL: https://issues.jboss.org/browse/DROOLS-2347
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.6.0.Final
Reporter: Martin Weiler
Assignee: Mario Fusco
When marshalling kieSession in production (long running kieSession with a lot of fact insertion), we encountered the following error :
{noformat}
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.TimSort.mergeLo(TimSort.java:777)
at java.util.TimSort.mergeAt(TimSort.java:514)
at java.util.TimSort.mergeCollapse(TimSort.java:439)
at java.util.TimSort.sort(TimSort.java:245)
at java.util.Arrays.sort(Arrays.java:1438)
at org.drools.core.marshalling.impl.ProtobufOutputMarshaller.orderFacts(ProtobufOutputMarshaller.java:776)
at org.drools.core.marshalling.impl.ProtobufOutputMarshaller.writeFactHandles(ProtobufOutputMarshaller.java:707)
at org.drools.core.marshalling.impl.ProtobufOutputMarshaller.serializeSession(ProtobufOutputMarshaller.java:176)
at org.drools.core.marshalling.impl.ProtobufOutputMarshaller.writeSession(ProtobufOutputMarshaller.java:120)
at org.drools.core.marshalling.impl.ProtobufMarshaller.marshall(ProtobufMarshaller.java:164)
at org.drools.core.marshalling.impl.ProtobufMarshaller.marshall(ProtobufMarshaller.java:148)
{noformat}
Indeed, the orderFacts method in ProtobufoutputMarshaller uses a HandleSorter as comparator, which returns the result of o1.getId() - o2.getId() where o1 and o2 are InternalFactHandle.
Since the id of InternalFactHandle is an int, this comparator can cause "Comparison method violates its general contract!" IllegalArgumentException because Integer.MAX_INT + 1 < 0.
The comparator should return the result of Integer.compare(o1.getId(), o2.getId())
The root cause is that InternalFactHandle.getId() is an int and should be a long for long running kieSession.
This id is generated by the FactHandleFactory (in AbstractFactHandleFactory) and is an AtomicInteger incremented at each fact creation.
With long running kieSession a lot of fact handles can be created (inserted in memory or with "from") so this id can overflow Integer.MAX_INT and become negative, causing this issue when ordering.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFLY-9854) jgroups-cluster cannot use name which is already used by jgroups/stacks
by Kabir Khan (JIRA)
[ https://issues.jboss.org/browse/WFLY-9854?page=com.atlassian.jira.plugin.... ]
Kabir Khan commented on WFLY-9854:
----------------------------------
{quote}
I see Paul's point that the configuration is quite specific and unlikely. However the WildFly Continuous Delivery document \[1\] is strict about backward compatibility. Based on the document it is valid issue.
[~kabirkhan] [~msvehla] Who should make the final decision in these cases? When is it acceptable to relax the backward compatibility rules?
\[1\] https://docs.google.com/document/d/1dH-Mc4p_ZogZVWhc6dDdW1tfPIp45MBVeSxwS...
[~jason.greene] wdyt ^^?
> jgroups-cluster cannot use name which is already used by jgroups/stacks
> -----------------------------------------------------------------------
>
> Key: WFLY-9854
> URL: https://issues.jboss.org/browse/WFLY-9854
> Project: WildFly
> Issue Type: Bug
> Components: Clustering, JMS
> Affects Versions: 12.0.0.Beta1
> Reporter: Erich Duda
> Assignee: Paul Ferraro
> Priority: Blocker
>
> The configuration \[1\] results to an error \[2\]. This is backward compatibility issue since the configuration works with previous releases of Wildfly.
> \[1\]
> {code:xml}
> <broadcast-group name="bg-group1" jgroups-stack="udp" jgroups-cluster="udp" broadcast-period="2000" connectors="connector"/>
> {code}
> \[2\]
> {code}
> 10:52:29,982 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 15) WFLYCTL0013: Operation ("add") failed - address: ([
> ("subsystem" => "jgroups"),
> ("channel" => "udp")
> ]) - failure description: "WFLYCTL0436: Cannot register capability 'org.wildfly.clustering.jgroups.channel-factory.udp' at location '[
> (\"subsystem\" => \"jgroups\"),
> (\"channel\" => \"udp\")
> ]' as it is already registered in context 'global' at location(s) '[[
> (\"subsystem\" => \"jgroups\"),
> (\"stack\" => \"udp\")
> ]]'"
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (DROOLS-2346) ProtobufOutputMarshaller.orderFacts causes a "Comparison method violates its general contract" error
by Martin Weiler (JIRA)
Martin Weiler created DROOLS-2346:
-------------------------------------
Summary: ProtobufOutputMarshaller.orderFacts causes a "Comparison method violates its general contract" error
Key: DROOLS-2346
URL: https://issues.jboss.org/browse/DROOLS-2346
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.6.0.Final
Reporter: Martin Weiler
Assignee: Mario Fusco
When marshalling kieSession in production (long running kieSession with a lot of fact insertion), we encountered the following error :
{noformat}
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.TimSort.mergeLo(TimSort.java:777)
at java.util.TimSort.mergeAt(TimSort.java:514)
at java.util.TimSort.mergeCollapse(TimSort.java:439)
at java.util.TimSort.sort(TimSort.java:245)
at java.util.Arrays.sort(Arrays.java:1438)
at org.drools.core.marshalling.impl.ProtobufOutputMarshaller.orderFacts(ProtobufOutputMarshaller.java:776)
at org.drools.core.marshalling.impl.ProtobufOutputMarshaller.writeFactHandles(ProtobufOutputMarshaller.java:707)
at org.drools.core.marshalling.impl.ProtobufOutputMarshaller.serializeSession(ProtobufOutputMarshaller.java:176)
at org.drools.core.marshalling.impl.ProtobufOutputMarshaller.writeSession(ProtobufOutputMarshaller.java:120)
at org.drools.core.marshalling.impl.ProtobufMarshaller.marshall(ProtobufMarshaller.java:164)
at org.drools.core.marshalling.impl.ProtobufMarshaller.marshall(ProtobufMarshaller.java:148)
{noformat}
Indeed, the orderFacts method in ProtobufoutputMarshaller uses a HandleSorter as comparator, which returns the result of o1.getId() - o2.getId() where o1 and o2 are InternalFactHandle.
Since the id of InternalFactHandle is an int, this comparator can cause "Comparison method violates its general contract!" IllegalArgumentException because Integer.MAX_INT + 1 < 0.
The comparator should return the result of Integer.compare(o1.getId(), o2.getId())
The root cause is that InternalFactHandle.getId() is an int and should be a long for long running kieSession.
This id is generated by the FactHandleFactory (in AbstractFactHandleFactory) and is an AtomicInteger incremented at each fact creation.
With long running kieSession a lot of fact handles can be created (inserted in memory or with "from") so this id can overflow Integer.MAX_INT and become negative, causing this issue when ordering.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (DROOLS-2345) It is not possible to define parent and child service in the same kie.conf
by Tibor Zimányi (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2345?page=com.atlassian.jira.plugi... ]
Tibor Zimányi commented on DROOLS-2345:
---------------------------------------
I propose a fix, where multiple services could be defined on the same line in kie.conf. See PR: https://github.com/kiegroup/droolsjbpm-knowledge/pull/296
> It is not possible to define parent and child service in the same kie.conf
> --------------------------------------------------------------------------
>
> Key: DROOLS-2345
> URL: https://issues.jboss.org/browse/DROOLS-2345
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.6.0.Final
> Reporter: Tibor Zimányi
> Assignee: Tibor Zimányi
> Priority: Minor
> Fix For: 7.7.0.Final
>
>
> When using just one kie.conf file for all services, it is not possible to define parent and child service in the same file. This is mainly the case when having an uberjar with all kie dependencies bundled in. In such case such kie.conf file is needed for service registry to work.
> E.g. a user wants to add DMNAssemblerService to kie.conf,
> org.kie.api.internal.assembler.KieAssemblers = +org.kie.dmn.core.assembler.DMNAssemblerService
> In such case service discovery fails with an exception
> java.lang.RuntimeException: Child services [org.kie.api.internal.assembler.KieAssemblers] have no parent
> I have a proposed fix ready. Will create a PR with it and a reproducer.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (DROOLS-2345) It is not possible to define parent and child service in the same kie.conf
by Tibor Zimányi (JIRA)
Tibor Zimányi created DROOLS-2345:
-------------------------------------
Summary: It is not possible to define parent and child service in the same kie.conf
Key: DROOLS-2345
URL: https://issues.jboss.org/browse/DROOLS-2345
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.6.0.Final
Reporter: Tibor Zimányi
Assignee: Tibor Zimányi
Priority: Minor
Fix For: 7.7.0.Final
When using just one kie.conf file for all services, it is not possible to define parent and child service in the same file. This is mainly the case when having an uberjar with all kie dependencies bundled in. In such case such kie.conf file is needed for service registry to work.
E.g. a user wants to add DMNAssemblerService to kie.conf,
org.kie.api.internal.assembler.KieAssemblers = +org.kie.dmn.core.assembler.DMNAssemblerService
In such case service discovery fails with an exception
java.lang.RuntimeException: Child services [org.kie.api.internal.assembler.KieAssemblers] have no parent
I have a proposed fix ready. Will create a PR with it and a reproducer.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFLY-9888) Server log messages does not reflect the use of "distinct" naming for EJB's
by Wolf-Dieter Fink (JIRA)
Wolf-Dieter Fink created WFLY-9888:
--------------------------------------
Summary: Server log messages does not reflect the use of "distinct" naming for EJB's
Key: WFLY-9888
URL: https://issues.jboss.org/browse/WFLY-9888
Project: WildFly
Issue Type: Enhancement
Components: EJB
Reporter: Wolf-Dieter Fink
Priority: Minor
If an application (jboss-ejb3.xml) or server configuration is marked with the distinct flag
<jboss:ejb-jar .... version="3.1" impl-version="2.0">
<distinct-name>WOLF</distinct-name>
</jboss:ejb-jar>
The client need to use the the correct lookup with distinct name
"ejb:MyEAR/MyEjbJar/WOLF/MyBean!MyInterface
to get the bean proxy.
Unfortunately there is no hint whether an application is marked with this distinct flag.
The server log still show the same output as without like this:
INFO WFLYEJB0473: JNDI bindings for session bean named 'SimpleBean' in deployment unit 'subdeployment "ejb.jar" of deployment "EAP71-PLAYGROUND-server.ear"' are as follows:
java:global/EAP71-PLAYGROUND-server/ejb/SimpleBean!org.jboss.wfink.eap71.playground.Simple
It would be good if the log message show the correct JNDI name or a hint that the EJB has a distinct name applied.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFLY-9889) Server log messages does not reflect the use of "distinct" naming for EJB's
by Wolf-Dieter Fink (JIRA)
Wolf-Dieter Fink created WFLY-9889:
--------------------------------------
Summary: Server log messages does not reflect the use of "distinct" naming for EJB's
Key: WFLY-9889
URL: https://issues.jboss.org/browse/WFLY-9889
Project: WildFly
Issue Type: Enhancement
Components: EJB
Reporter: Wolf-Dieter Fink
Priority: Minor
If an application (jboss-ejb3.xml) or server configuration is marked with the distinct flag
<jboss:ejb-jar .... version="3.1" impl-version="2.0">
<distinct-name>WOLF</distinct-name>
</jboss:ejb-jar>
The client need to use the the correct lookup with distinct name
"ejb:MyEAR/MyEjbJar/WOLF/MyBean!MyInterface
to get the bean proxy.
Unfortunately there is no hint whether an application is marked with this distinct flag.
The server log still show the same output as without like this:
INFO WFLYEJB0473: JNDI bindings for session bean named 'SimpleBean' in deployment unit 'subdeployment "ejb.jar" of deployment "EAP71-PLAYGROUND-server.ear"' are as follows:
java:global/EAP71-PLAYGROUND-server/ejb/SimpleBean!org.jboss.wfink.eap71.playground.Simple
It would be good if the log message show the correct JNDI name or a hint that the EJB has a distinct name applied.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months