Bug 824830

Summary: Drools on Solaris triggers JDK bug
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Lukáš Petrovický <lpetrovi>
Component: BRE (Expert, Fusion)Assignee: Mario Fusco <mfusco>
Status: VERIFIED --- QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.0.GACC: mfusco, mvecera
Target Milestone: ER9   
Target Release: BRMS 5.3.0.GA   
Hardware: Unspecified   
OS: Solaris   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 824833 (view as bug list) Environment:
Last Closed: 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:
Bug Depends On:    
Bug Blocks: 824833    

Description Lukáš Petrovický 2012-05-24 11:49:51 UTC
When running Drools unit tests on Solaris with Sun JDK 6, the following test throws a SOE:

org.drools.jsr94.rules.StatefulRuleSessionTest.testContainsObject

java.lang.StackOverflowError
	at java.util.regex.Pattern$Loop.match(Pattern.java:4275)
	at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
	at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
	at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
	at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
	at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
	at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
...

Turns out this is because of a bug in Sun JDK that will never be fixed:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5050507

There is also a workaround that should be implemented in order to get this fixed.

Comment 1 JBoss JIRA Server 2012-06-07 16:49:36 UTC
Mario Fusco <mario.fusco> updated the status of jira JBRULES-3534 to Resolved

Comment 2 Mario Fusco 2012-06-07 17:04:59 UTC
The problem was indeed caused by a regular expression (used to remove comments from a DRL) containing an alternation. I fixed it by splitting that regexp in 2 parts.

Comment 3 Ryan Zhang 2012-06-13 09:32:40 UTC
This issue's fixes  have been picked by ER9. Please verify them on ER9.

Comment 4 Lukáš Petrovický 2012-06-15 10:01:39 UTC
Fixed in ER9.