Description of problem: There seems to be infinite recursion in the following call: at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717) at java.util.regex.Pattern$BranchConn.match(Pattern.java:4568) at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777) at java.util.regex.Pattern$Branch.match(Pattern.java:4604) at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658) at java.util.regex.Pattern$Loop.match(Pattern.java:4785) Version-Release number of selected component (if applicable): 1.8.0.5-13.b13.fc21.i686 How reproducible: on Koji on i686. Not reproducible locally on x86_64. Steps to Reproduce: koji build --scratch f21 'git://pkgs.fedoraproject.org/jflex?#558dccaeb2000d132b209a27d2b24cea42971ea3' Actual results: Build fails with java.lang.StackOverflowError: null There is infinite recursion in java.util.regex.Pattern Expected results: No stach overflow
Created attachment 917823 [details] Full build.log
This is not a problem with the JDK. The pattern that the system ultimately tries to compile/search during the test is in Emitter.java: private static final Pattern JAVADOC_COMMENT_AND_MAYBE_ANNOTATIONS_PATTERN = Pattern.compile (".*/\\*\\*(.*)\\*/" // javadoc comment, embedded '*/' disallowed +"(?:\\s*@[a-z][a-z0-9_]*(?:\\.[a-z][a-z0-9_]*)*" // @[p.ack.age.]AnnotationClass +" (?:\\s*\\(\\s*(?:\"(?:\\\"|[^\"])*\"" // ignore close parens in double quotes +" |'(?:[^']|\\\\(?:'|u[0-9a-f]{4}))'" // ignore close parens in single quotes +" |[^)])+\\))?" // optional annotation params +")*\\s*", // zero or more annotations, followed by optional whitespace Pattern.DOTALL | Pattern.CASE_INSENSITIVE | Pattern.COMMENTS); That seems like a very complicated pattern that likely needs revision. The reason why this is happening on only x86 is because on x86, the default stack size is smaller (320k) compared to x86_64 where the stack size is 1024k. Patterns can always be created such that they will caused a stack overflow. Either the pattern needs to be updated or the stack size needs to be changed. Running the test with stack size 1024k (-Xss1024k) allows it to pass on i686 where it otherwise fails. See also: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=5050507
Thank you for quick reply. I will go with increasing stack size for running tests.