Bug 1278059
Summary: | String.compareTo() in jitted constraint does not work correctly on Weblogic | ||
---|---|---|---|
Product: | [Retired] JBoss BRMS Platform 6 | Reporter: | Hiroko Miura <hmiura> |
Component: | BRE | Assignee: | Mario Fusco <mfusco> |
Status: | CLOSED EOL | QA Contact: | Marek Winkler <mwinkler> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 6.1.0 | CC: | agiertli, etirelli, hmiura, mwinkler |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-03-27 19:04:25 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Attachments: |
Is this Weblogic related or JVM related? By the description, I would guess it must be JVM, since the engine compiles down to bytecode without any "involvement" of weblogic in the process. Can you please: 1. let us know which JVM is being used? 2. clarify what do you mean by "becomes wrong"? Thank you 1. let us know which JVM is being used? => OracleJDK(HotSpot) 1.7.0_71 with both WLS and EAP. 2. clarify what do you mean by "becomes wrong"? => Please see screen shot attached. Created attachment 1089927 [details]
reproducer:RuleTestServlet result on WLS
Created attachment 1089928 [details]
reproducer:JitCompileTest servlet result on WLS
Created attachment 1089929 [details]
reproducer:RuleTestServlet result on EAP (good)
Created attachment 1089930 [details]
reproducer:JitCompileTest servlet result on EAP (good)
Here is a workaround we confirmed so far. - This does not happen if JIT is turned off like the following. kieBaseConfiguration.setProperty("drools.permgenThreshold", "0"); - This does not happen if the problematic constraint is changed from xxx.compareTo(yyy) <= 0 to xxx <= yyy In reality what is not working is a constraint in the form (xxx).compareTo(yyy) <= 0 If you change it in xxx.compareTo(yyy) <= 0 it works as expected. This problem has been already reported here https://issues.jboss.org/browse/DROOLS-900 and fixed by this commit https://github.com/droolsjbpm/drools/commit/a2ab9d4b96641f042187a5b833dd3ae4ef8bde64 I checked on eap that using Drools 6.2.0.Final the constraint "(xxx).compareTo(yyy) <= 0" generates the warning but "xxx.compareTo(yyy) <= 0" works correctly. Conversely on 6.3.0.Final, that contains that fix, also "(xxx).compareTo(yyy) <= 0" works without generating any warning. Marek, can you please confirm that the same commit also fixes the issue under WebLogic? Setting the ticket to MODIFIED as this is already fixed in 6.2 product as per Mario's comment. If the fix needs to be backported to 6.1 product, please open the appropriate BZ targeting the next update patch. |
Created attachment 1089740 [details] reproducer of jit compilation problem on wls Description of problem: When String.compareTO() is used in constraint of decision table(XLS), the result of it becomes wrong on weblogic once jit compilation takes place. It works on EAP. Version-Release number of selected component (if applicable): 6.1.x How reproducible: reproducer is attached. Steps to Reproduce: 1. deploy servlet application 2. fire rules more than 20 times with same fact(s) 3. Actual results: result of rule evaluation become wrong Expected results: result of rule evaluation is same even after jit compilation Additional info: