xom FTBFS in Jaunty on the i386 buildd but not on personal amd64

Bug #329903 reported by Alessio Treglia on 2009-02-16
4
Affects Status Importance Assigned to Milestone
Iced Tea
Invalid
Medium
openjdk-6 (Ubuntu)
Low
Unassigned
xom (Ubuntu)
Medium
Unassigned

Bug Description

xom FTBFS in Jaunty:

http://launchpadlibrarian.net/21057436/buildlog_ubuntu-jaunty-i386.xom_1.1-3ubuntu2_FAILEDTOBUILD.txt.gz

To solve this, it's only needed to rebuild the package (I'm setting Ubuntu Core Dev as Maintainer with my no-change patch).

Related branches

Alessio Treglia (quadrispro) wrote :
Alessio Treglia (quadrispro) wrote :
Changed in xom:
importance: Undecided → Medium
status: New → Confirmed
Luke Yelavich (themuso) wrote :

This was uploaded a while back, but was not marked as fixed. Please remember to add an LP: #xxxxxx tag to your diff next time.

Changed in xom:
status: Confirmed → Fix Released
status: Fix Released → Confirmed
Daniel Holbach (dholbach) wrote :

Still broken, unsubscribing sponsors team for now.

Chris Cheney (ccheney) wrote :

This is failing to build due to the buildd or some bug in the openjdk-6. It builds fine on my local machine. I have attached the build log.

Chris Cheney (ccheney) wrote :

Matthias,

This definitely looks like a bug in openjdk-6 after I have dug into it a bit more. I can compile fine on amd64 seemingly every time but compiling on i386 seems to fail every time. And since the buildds are i386 it fails there.

Chris

Martin Pitt (pitti) on 2009-03-11
Changed in openjdk-6:
status: New → Confirmed
Matthias Klose (doko) wrote :
Download full text (5.1 KiB)

compile-core:
    [javac] Compiling 239 source files to /build/buildd/xom-1.1/build/classes
    [javac]
    [javac]
    [javac] The system is out of resources.
    [javac] Consult the following stack trace for details.
    [javac] java.lang.StackOverflowError
    [javac] at com.sun.tools.javac.parser.Scanner.nextToken(Scanner.java:792)
    [javac] at com.sun.tools.javac.parser.Parser.term3(Parser.java:883)
    [javac] at com.sun.tools.javac.parser.Parser.term2(Parser.java:699)
    [javac] at com.sun.tools.javac.parser.Parser.term1(Parser.java:670)
    [javac] at com.sun.tools.javac.parser.Parser.term(Parser.java:626)
    [javac] at com.sun.tools.javac.parser.Parser.term(Parser.java:608)
    [javac] at com.sun.tools.javac.parser.Parser.expression(Parser.java:598)
    [javac] at com.sun.tools.javac.parser.Parser.arguments(Parser.java:1172)
    [javac] at com.sun.tools.javac.parser.Parser.arguments(Parser.java:1187)
    [javac] at com.sun.tools.javac.parser.Parser.term3(Parser.java:1003)
    [javac] at com.sun.tools.javac.parser.Parser.term2(Parser.java:699)
    [javac] at com.sun.tools.javac.parser.Parser.term1(Parser.java:670)
    [javac] at com.sun.tools.javac.parser.Parser.term(Parser.java:626)
    [javac] at com.sun.tools.javac.parser.Parser.term(Parser.java:608)
    [javac] at com.sun.tools.javac.parser.Parser.blockStatements(Parser.java:1580)
    [javac] at com.sun.tools.javac.parser.Parser.block(Parser.java:1497)
    [javac] at com.sun.tools.javac.parser.Parser.block(Parser.java:1511)
    [javac] at com.sun.tools.javac.parser.Parser.statement(Parser.java:1641)
    [javac] at com.sun.tools.javac.parser.Parser.statement(Parser.java:1645)
    [javac] at com.sun.tools.javac.parser.Parser.statement(Parser.java:1649)

    [javac] at com.sun.tools.javac.parser.Parser.statement(Parser.java:1649)
    repeated some hundred times

    [javac] at com.sun.tools.javac.parser.Parser.blockStatements(Parser.java:1534)
    [javac] at com.sun.tools.javac.parser.Parser.block(Parser.java:1497)
    [javac] at com.sun.tools.javac.parser.Parser.block(Parser.java:1511)
    [javac] at com.sun.tools.javac.parser.Parser.methodDeclaratorRest(Parser.java:2566)
    [javac] at com.sun.tools.javac.parser.Parser.classOrInterfaceBodyDeclaration(Parser.java:2515)
    [javac] at com.sun.tools.javac.parser.Parser.classOrInterfaceBody(Parser.java:2442)
    [javac] at com.sun.tools.javac.parser.Parser.classDeclaration(Parser.java:2287)
    [javac] at com.sun.tools.javac.parser.Parser.classOrInterfaceOrEnumDeclaration(Parser.java:2225)
    [javac] at com.sun.tools.javac.parser.Parser.typeDeclaration(Parser.java:2214)
    [javac] at com.sun.tools.javac.parser.Parser.compilationUnit(Parser.java:2160)
    [javac] at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:523)
    [javac] at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:564)
    [javac] at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:815)
    [javac] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:741)
    [javac] at com.sun.tools.javac.main.Main.compile(Main.java:380)
    [javac] at com.sun.tools.javac.main.Main.c...

Read more...

Download full text (5.2 KiB)

seen with IcedTea 1.4.1 on ix86, works on amd64, works on ix86 using the Cacao JVM.

compile-core:
    [javac] Compiling 239 source files to /build/buildd/xom-1.1/build/classes
    [javac]
    [javac]
    [javac] The system is out of resources.
    [javac] Consult the following stack trace for details.
    [javac] java.lang.StackOverflowError
    [javac] at com.sun.tools.javac.parser.Scanner.nextToken(Scanner.java:792)
    [javac] at com.sun.tools.javac.parser.Parser.term3(Parser.java:883)
    [javac] at com.sun.tools.javac.parser.Parser.term2(Parser.java:699)
    [javac] at com.sun.tools.javac.parser.Parser.term1(Parser.java:670)
    [javac] at com.sun.tools.javac.parser.Parser.term(Parser.java:626)
    [javac] at com.sun.tools.javac.parser.Parser.term(Parser.java:608)
    [javac] at com.sun.tools.javac.parser.Parser.expression(Parser.java:598)
    [javac] at com.sun.tools.javac.parser.Parser.arguments(Parser.java:1172)
    [javac] at com.sun.tools.javac.parser.Parser.arguments(Parser.java:1187)
    [javac] at com.sun.tools.javac.parser.Parser.term3(Parser.java:1003)
    [javac] at com.sun.tools.javac.parser.Parser.term2(Parser.java:699)
    [javac] at com.sun.tools.javac.parser.Parser.term1(Parser.java:670)
    [javac] at com.sun.tools.javac.parser.Parser.term(Parser.java:626)
    [javac] at com.sun.tools.javac.parser.Parser.term(Parser.java:608)
    [javac] at com.sun.tools.javac.parser.Parser.blockStatements(Parser.java:1580)
    [javac] at com.sun.tools.javac.parser.Parser.block(Parser.java:1497)
    [javac] at com.sun.tools.javac.parser.Parser.block(Parser.java:1511)
    [javac] at com.sun.tools.javac.parser.Parser.statement(Parser.java:1641)
    [javac] at com.sun.tools.javac.parser.Parser.statement(Parser.java:1645)
    [javac] at com.sun.tools.javac.parser.Parser.statement(Parser.java:1649)

    [javac] at com.sun.tools.javac.parser.Parser.statement(Parser.java:1649)
    repeated some hundred times

    [javac] at com.sun.tools.javac.parser.Parser.blockStatements(Parser.java:1534)
    [javac] at com.sun.tools.javac.parser.Parser.block(Parser.java:1497)
    [javac] at com.sun.tools.javac.parser.Parser.block(Parser.java:1511)
    [javac] at com.sun.tools.javac.parser.Parser.methodDeclaratorRest(Parser.java:2566)
    [javac] at com.sun.tools.javac.parser.Parser.classOrInterfaceBodyDeclaration(Parser.java:2515)
    [javac] at com.sun.tools.javac.parser.Parser.classOrInterfaceBody(Parser.java:2442)
    [javac] at com.sun.tools.javac.parser.Parser.classDeclaration(Parser.java:2287)
    [javac] at com.sun.tools.javac.parser.Parser.classOrInterfaceOrEnumDeclaration(Parser.java:2225)
    [javac] at com.sun.tools.javac.parser.Parser.typeDeclaration(Parser.java:2214)
    [javac] at com.sun.tools.javac.parser.Parser.compilationUnit(Parser.java:2160)
    [javac] at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:523)
    [javac] at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:564)
    [javac] at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:815)
    [javac] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:741)
    [javac] at com.sun.tools.javac.main.Main.compile(Main.java:380)
...

Read more...

Changed in icedtea:
status: Unknown → Confirmed

sources, including used jar files at http://people.ubuntu.com/~doko/tmp/xom.tar.bz2
adjust and call the do-build.sh

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xom - 1.1-3ubuntu4

---------------
xom (1.1-3ubuntu4) jaunty; urgency=low

  * Revert "Update default-jdk -> default-jdk-builddep to resolve FTBFS",
    gcj isn't used in this package.
  * Workaround hotspot error by using the cacao VM. LP: #329903.

 -- Matthias Klose <email address hidden> Tue, 17 Mar 2009 13:30:45 +0100

Changed in xom:
status: Confirmed → Fix Released

Created attachment 173
Script to build a simpler test case

javac uses recursion to parse the source file; the large number of 'else' statements in /src/nu/xom/UnicodeUtil.java cause a StackOverflowError in the jvm. The attached script produces a simpler testcase.

doing a
$ export ANT_OPTS=-Xss1024k
and then running ant fixes the problem for me

UnicodeUtil.java is a classic compiler torture test. From:
http://cafe.elharo.com/blogroll/eclipse-classpath-insanity/

Eclipse failed to compile one file in nu.xom, UnicodeUtil. That one file is extremely challenging and a real torture test for various tools. It includes some huge lookup tables that cause stack overflows in weak compilers and analyzers. It is legal Java code, and it fits within the bounds of maximum method size, but just barely. Eclipse used to be able to compile it, but it’s been weakening from milestone to milestone. A lot of tools can’t handle this class, and it looks likes between 3.2M4 or thereabouts and 3.2 final Eclipse joined that number. Previously it couldn’t analyze that class, but at least it could compile it. Now it can’t even compile it.

Matthias Klose (doko) wrote :

another workaround is to pass -Xss1024k when running ant.

Changed in openjdk-6 (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged

This isn't a bug. javac necessarily runs with a finite stack size, but there is no limit in the JLS on the nesting complexity of a Java program, so javac will always run out of stack space with some inputs. The need to set the stack size explicitly when building particularly complex source files is well-known, and this is even done while building OpenJDK itself.

Changed in icedtea:
status: Confirmed → Invalid
Matthias Klose (doko) on 2009-03-21
Changed in openjdk-6 (Ubuntu):
status: Triaged → Invalid
Changed in icedtea:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Patches

Remote bug watches

Bug watches keep track of this bug in other bug trackers.