[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: openjdk-6 build failure on m68k - problem with fork="true" ant javac target



made a new testcase for ant this morning and found the early ant exit bug in the exec ant target as well.

testing ant exec target with this simple testcase:

<?xml version="1.0" encoding="UTF-8"?>
<project name="antexectest" default="build">
   <target name="build">
       <echo message="running exec with the executable='w'"/>
       <exec executable="w"/>
       <echo message="done"/>
   </target>
</project>


============================================== output from debian m68k (fail)

xerxes@aranym-m68k:~/antexectest$ ant
Buildfile: build.xml

build:
    [echo] running exec with the executable='w'
    [exec]  11:21:51 up 46 days, 22:19,  2 users,  load average: 0.87, 0.39, 0.21
xerxes@aranym-m68k:~/antexectest$


============================================== output from ubuntu x86 (success)

xerxes@labb:~/antexectest$ ant
Buildfile: build.xml

build:
    [echo] running exec with the executable='w'
    [exec]  11:18:55 up 76 days,  2:06,  2 users,  load average: 0,46, 0,20, 0,15
    [exec] USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
    [exec] xerxes   pts/0    192.168.1.25     30Oct08  1.00s  1.13s  0.86s /usr/bin/java -
    [exec] xerxes   pts/1    :1.0             19Sep08 46days  4days 19:27m gnome-terminal
    [echo] done

BUILD SUCCESSFUL
Total time: 0 seconds
xerxes@labb:~/antexectest$


cheers.
Xerxes

Xerxes Rånby skrev:
The same problem found with ant javac targets exist with ant java targets with fork="true"

this simple ant task makes ant quit directly after running the class.on m68k.
<java classname="HelloWorld" fork="true" />

I suspect i am observing a bug in libgcj with fork and not in ant itself.

I have tested using the testcase found in my previous mail with following jvms on debian m68k with various results:
Someone know a jvm working on debian m68k sid  that i have not tested?

/usr/bin/gij-4.3 and /usr/lib/jvm/java-gcj/jre/bin/java bug present with fork="true"
java version "1.5.0"
gij (GNU libgcj) version 4.3.2

/etc/alternatives/kaffe-system/bin/java segfaults ant exit with failure.
java full version "kaffe-1.4.2"
kaffe VM "1.1.8"

/usr/bin/java-sablevm throws java/lang/IllegalMonitorStateException and then exit with failue.
SableVM version 1.13

Have a great day!
Xerxes

8 nov 2008 kl. 22.34 skrev Xerxes Rånby:

I have spotted a problem with ant javac target on debian m68k.

ant javac targets with fork="true" on m68k makes the whole ant build exit directly after the javac task ends. This screws the openjdk6 build on m68k since the langtools classes and bootstrap files are not fully built.

I have created a testcase to reproduce this bug that can be downloaded from:
http://labb.zafena.se/m68k-ant/antforktruetest.tar.gz

This ant bug is present on the m68k buildd machines and can be spotted in the m68k openjdk6 buildd log by looking for the missing BUILD SUCCESSFUL after all ant builds. The first ant build in openjdk6 is run directly after sanity check is done.
search for
make[3]: Entering directory `/build/buildd/openjdk-6-6b11/openjdk-ecj/langtools/make' to see the ant bug in action in the m68k buildd log : http://buildd.debian.org/fetch.cgi?pkg=openjdk-6;ver=6b11-9;arch=m68k;stamp=1223969321

I have stored my ant -diagnostics log here for reference:
http://labb.zafena.se/m68k-ant/ant-diagnostics.m68k.log

=============================================================
Output from testcase on m68k:
xerxes@aranym-m68k:~/antforktruetest$ ant
Buildfile: build.xml

build:
[echo] running testcase to see if ant javac work, javac task with fork='true' makes ant exit after compile on debian m68k without running all remaining tasks and targets
    [mkdir] Created dir: /home/xerxes/antforktruetest/destforkfalse
    [mkdir] Created dir: /home/xerxes/antforktruetest/destforktrue
[echo] removing compiled classfiles if they exist or else they will hide the bug
     [echo] compiling hello world using javac task with fork='false'
[javac] Compiling 1 source file to /home/xerxes/antforktruetest/destforkfalse
     [echo] compiling hello world using javac task with fork='true'
[javac] Compiling 1 source file to /home/xerxes/antforktruetest/destforktrue
xerxes@aranym-m68k:~/antforktruetest$ echo $?
0
xerxes@aranym-m68k:~/antforktruetest$ ls destforktrue
HelloWorld.class
xerxes@aranym-m68k:~/antforktruetest$ cd destforktrue
xerxes@aranym-m68k:~/antforktruetest/destforktrue$ java HelloWorld
Hello World!
xerxes@aranym-m68k:~/antforktruetest/destforktrue$

It is quite tricky to spot that ant have failed here since the classes are compiled with javac (works fine with java too) and ant exited with success yet ant have not run all its tasks! Compare with the output below to see that ant is broken.

=============================================================
Expected output from testcase (here run successfully on a ubuntu x86 installation):
xerxes@labb:~/antforktruetest$ ant
Buildfile: build.xml

build:
[echo] running testcase to see if ant javac work, javac task with fork='true' makes ant exit after compile on debian m68k without running all remaining tasks and targets
    [mkdir] Created dir: /home/xerxes/antforktruetest/destforkfalse
    [mkdir] Created dir: /home/xerxes/antforktruetest/destforktrue
[echo] removing compiled classfiles if they exist or else they will hide the bug
     [echo] compiling hello world using javac task with fork='false'
[javac] Compiling 1 source file to /home/xerxes/antforktruetest/destforkfalse
     [echo] compiling hello world using javac task with fork='true'
[javac] Compiling 1 source file to /home/xerxes/antforktruetest/destforktrue
     [echo] success working ant with javac tasks!

BUILD SUCCESSFUL
Total time: 9 seconds
xerxes@labb:~/antforktruetest$

=====================================================================

Cheers
Xerxes


15 sep 2008 kl. 12.19 skrev Xerxes Rånby:

On my machine i hit another build error a bit further: see the attached log
My icedtea6 build is configured with ./configure --with-jar=gjar-4.3
For some reason JAVAC_CMD is unset when compiling the classlist for the openjdk-ecj bootstrap part.

xerxes@aranym-m68k:~/zero/icedtea6$ hg tip
changeset:   1040:c46e727121a8
tag:         tip
user:        doko@ubuntu.com
date:        Sat Sep 13 09:32:12 2008 +0200
summary:     2008-09-12  Matthias Klose  <doko@ubuntu.com>

../../../src/share/classes/sun/reflect/Reflection.java
# Running javac:
-sourcepath /home/xerxes/zero/icedtea6/generated:../../../src/solaris/classes:../../../src/share/classes -bootclasspath /home/xerxes/zero/icedtea6/bootstrap/jdk1.7.0/jre/lib/rt-closed.jar::/home/xerxes/zero/icedtea6/openjdk-ecj/control/build/linux-m68k/classes -d /home/xerxes/zero/icedtea6/openjdk-ecj/control/build/linux-m68k/classes @/home/xerxes/zero/icedtea6/openjdk-ecj/control/build/linux-m68k/tmp/java/java.lang/java/.classes.list
/bin/sh: line 6: -sourcepath: command not found
make[4]: *** [.compile.classlist] Error 127
make[4]: Leaving directory `/home/xerxes/zero/icedtea6/openjdk-ecj/jdk/make/java/java'
make[3]: *** [all] Error 1
make[3]: Leaving directory `/home/xerxes/zero/icedtea6/openjdk-ecj/jdk/make/java'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/home/xerxes/zero/icedtea6/openjdk-ecj/jdk/make'
make[1]: *** [jdk-build] Error 2
make[1]: Leaving directory `/home/xerxes/zero/icedtea6/openjdk-ecj/control/make'
make: *** [stamps/icedtea-ecj.stamp] Error 2
xerxes@aranym-m68k:~/zero/icedtea6$





Reply to: