building java in i386 jail on amd64
Andriy Gapon
avg at icyb.net.ua
Tue Nov 25 06:58:52 PST 2008
OS: FreeBSD 7.1-PRERELEASE amd64
Jail system: FreeBSD 7.1-PRERELEASE i386
Java boot strap: diablo-jdk-1.5.0.07.01_12
Trying to compile: java/jdk15
Build proceeds for some time and then fails with:
>>>Recursively making pack all @ Tue 25 Nov 2008 14:05:25 UTC ...
gmake[2]: Entering directory
`/usr/obj/ports/usr/ports/java/jdk15/work/install/make/pack'
i586 Installer Build started: 1.5.0_14-p8-avg_25_nov_2008_14_05
gmake
PACK_OUTPUTDIR=/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/pack/pack-jre-jars
\
VAR_IMAGE_DIR=/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/j2re-image
\
JARS_TO_PACK="lib/rt.jar lib/jsse.jar lib/charsets.jar
lib/ext/localedata.jar lib/plugin.jar lib/javaws.jar lib/deploy.jar" \
EXTRA_PACKOPTS="--strip-debug" \
pack-jars
gmake[3]: Entering directory
`/usr/obj/ports/usr/ports/java/jdk15/work/install/make/pack'
/bin/mkdir -p
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/pack/pack-jre-jars
for i in lib/rt.jar lib/jsse.jar lib/charsets.jar lib/ext/localedata.jar
lib/plugin.jar lib/javaws.jar lib/deploy.jar ; do \
/bin/ls -l
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/j2re-image/$i
| /usr/bin/awk '{printf("Packing %s %s bytes\n",$9, $5)}' ; \
/bin/mkdir -p
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/pack/pack-jre-jars/`/usr/bin/dirname
$i` ; \
/bin/mkdir -p
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/j2re-image/`/usr/bin/dirname
$i` ; \
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/bin/pack200
-J-Xmx256m -J-esa -J-ea "--no-gzip" "--config-file=pack.all.properties"
--strip-debug
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/pack/pack-jre-jars/`/usr/bin/dirname
$i`/`/usr/bin/basename $i .jar`.pack
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/j2re-image/$i
|| exit 1 ; \
rm -f
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/j2re-image/$i
; \
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/bin/unpack200
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/pack/pack-jre-jars/`/usr/bin/dirname
$i`/`/usr/bin/basename $i .jar`.pack
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/j2re-image/$i
|| exit 1 ; \
done
Packing
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/j2re-image/lib/rt.jar
40297358 bytes
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# Internal Error (4E4D4554484F440E4350500529), pid=34669, tid=0x28201100
#
# Java VM: Java HotSpot(TM) Server VM (1.5.0_14-p8-avg_24_nov_2008_20_36
mixed mode)
# An error report file with more information is saved as hs_err_pid34669.log
#
# If you would like to submit a bug report, please write
# a letter to freebsd-java at FreeBSD.org mailing list
#
Abort trap (core dumped)
gmake[3]: *** [pack-jars] Error 1
gmake[3]: Leaving directory
`/usr/obj/ports/usr/ports/java/jdk15/work/install/make/pack'
Here's hs_err*.log file:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# Internal Error (4E4D4554484F440E4350500529), pid=34669, tid=0x28201100
#
# Java VM: Java HotSpot(TM) Server VM (1.5.0_14-p8-avg_24_nov_2008_20_36
mixed mode)
--------------- T H R E A D ---------------
Current thread (0x28242180): JavaThread "main" [_thread_in_Java,
id=673190144]
Stack: [0xffdff000,0xfffff000), sp=0xffffacd0, free space=2031k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
C=native code)
V [libjvm.so+0x525c2c]
V [libjvm.so+0x1de7eb]
V [libjvm.so+0x429edf]
V [libjvm.so+0x4b32fa]
V [libjvm.so+0x443d30]
V [libjvm.so+0x43ec76]
C 0xffffefd4
j
java.util.Arrays.mergeSort([Ljava/lang/Object;[Ljava/lang/Object;III)V+194
j
java.util.Arrays.mergeSort([Ljava/lang/Object;[Ljava/lang/Object;III)V+106
j java.util.Arrays.sort([Ljava/lang/Object;)V+17
j
com.sun.java.util.jar.pack.ConstantPool.sort(Lcom/sun/java/util/jar/pack/ConstantPool$Index;)V+8
j
com.sun.java.util.jar.pack.Package.buildGlobalConstantPool(Ljava/util/Set;)V+103
j com.sun.java.util.jar.pack.PackageWriter.setup()V+31
j com.sun.java.util.jar.pack.PackageWriter.write()V+18
j
com.sun.java.util.jar.pack.PackerImpl$DoPack.flushPackage(Ljava/io/OutputStream;I)V+312
j
com.sun.java.util.jar.pack.PackerImpl$DoPack.flushAll(Ljava/io/OutputStream;)V+18
j
com.sun.java.util.jar.pack.PackerImpl$DoPack.run(Ljava/util/jar/JarFile;Ljava/io/OutputStream;)V+353
j
com.sun.java.util.jar.pack.PackerImpl.pack(Ljava/util/jar/JarFile;Ljava/io/OutputStream;)V+98
j com.sun.java.util.jar.pack.Driver.main([Ljava/lang/String;)V+1623
v ~StubRoutines::call_stub
V [libjvm.so+0x28b864]
V [libjvm.so+0x43df79]
V [libjvm.so+0x28a91f]
V [libjvm.so+0x294755]
V [libjvm.so+0x2acaac]
C [pack200+0x422d] _init+0x3301
C [pack200+0x13cc] _init+0x4a0
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x28242780 JavaThread "Low Memory Detector" daemon [_thread_blocked,
id=673193984]
0x2823c560 JavaThread "CompilerThread1" daemon [_thread_blocked,
id=673193728]
0x2823c3d0 JavaThread "CompilerThread0" daemon [_thread_in_native,
id=673193472]
0x2823c240 JavaThread "AdapterThread" daemon [_thread_blocked,
id=673193216]
0x28242600 JavaThread "Signal Dispatcher" daemon [_thread_blocked,
id=673192960]
0x28242480 JavaThread "Finalizer" daemon [_thread_blocked, id=673192704]
0x28242300 JavaThread "Reference Handler" daemon [_thread_blocked,
id=673192448]
=>0x28242180 JavaThread "main" [_thread_in_Java, id=673190144]
Other Threads:
0x2820fe80 VMThread [id=673191936]
0x28210380 WatcherThread [id=673194240]
VM state:synchronizing (normal execution)
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x282052b0/0x2823aa00] Safepoint_lock - owner thread: 0x2820fe80
[0x282052e0/0x2823aac0] Threads_lock - owner thread: 0x2820fe80
Heap
PSYoungGen total 17920K, used 844K [0x3e230000, 0x3fea0000,
0x3fea0000)
eden space 9792K, 8% used [0x3e230000,0x3e303118,0x3ebc0000)
from space 8128K, 0% used [0x3f6b0000,0x3f6b0000,0x3fea0000)
to space 9664K, 0% used [0x3ebc0000,0x3ebc0000,0x3f530000)
PSOldGen total 233024K, used 135730K [0x2fea0000, 0x3e230000,
0x3e230000)
object space 233024K, 58% used [0x2fea0000,0x3832cac8,0x3e230000)
PSPermGen total 30976K, used 19557K [0x2bea0000, 0x2dce0000,
0x2fea0000)
object space 30976K, 63% used [0x2bea0000,0x2d1b9760,0x2dce0000)
Dynamic libraries:
0x08048000
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/bin/pack200
0x28085000 /lib/libz.so.4
0x28097000 /lib/libthr.so.3
0x280aa000 /lib/libc.so.7
0x28300000
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/lib/i386/server/libjvm.so
0x281b3000 /lib/libm.so.5
0x281c9000
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/lib/i386/native_threads/libhpi.so
0x281db000
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/lib/i386/libverify.so
0x288ee000
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/lib/i386/libjava.so
0x281e8000
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/lib/i386/libzip.so
0x28051000 /libexec/ld-elf.so.1
VM Arguments:
jvm_args: -Denv.class.path=
-Dapplication.home=/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586
-Xms64m -Xmx256m -esa -ea
java_command: com.sun.java.util.jar.pack.Driver --pack --no-gzip
--config-file=pack.all.properties --strip-debug
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/pack/pack-jre-jars/lib/rt.pack
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/j2re-image/lib/rt.jar
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=
CLASSPATH=
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/avg/bin
LD_LIBRARY_PATH=/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/lib/i386/server:/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/lib/i386:/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/../lib/i386:
SHELL=/bin/sh
DISPLAY=:0
HOSTTYPE=FreeBSD
OSTYPE=FreeBSD
ARCH=i586
MACHTYPE=unknown
Signal Handlers:
SIGSEGV: [libjvm.so+0x526540], sa_mask[0]=0xfffefeff, sa_flags=0x00000002
SIGBUS: [libjvm.so+0x526540], sa_mask[0]=0xfffefeff, sa_flags=0x00000002
SIGFPE: [libjvm.so+0x43ec50], sa_mask[0]=0xfffefeff, sa_flags=0x00000042
SIGPIPE: [libjvm.so+0x43ec50], sa_mask[0]=0xfffefeff, sa_flags=0x00000042
SIGILL: [libjvm.so+0x43ec50], sa_mask[0]=0xfffefeff, sa_flags=0x00000042
SIGUSR1: SIG_DFL, sa_mask[0]=0x20000000, sa_flags=0x00000002
SIGUSR2: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGHUP: [libjvm.so+0x440dc0], sa_mask[0]=0xfffefeff, sa_flags=0x00000002
SIGINT: [libjvm.so+0x440dc0], sa_mask[0]=0xfffefeff, sa_flags=0x00000002
SIGQUIT: [libjvm.so+0x440dc0], sa_mask[0]=0xfffefeff, sa_flags=0x00000002
SIGTERM: [libjvm.so+0x440dc0], sa_mask[0]=0xfffefeff, sa_flags=0x00000002
--------------- S Y S T E M ---------------
OS:FreeBSD
uname:FreeBSD 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #5 : Fri Nov 7
20:50:06 EET 2008 root@:/usr/obj/usr/src/sys/ODYSSEYgpart i386
rlimit: STACK 65536k, CORE infinity, NOFILE 11095
CPU:total 2 (cores per cpu 2, threads per core 1) family 6 model 7
stepping 6, cmov, cx8, fxsr, mmx
Memory: 4k page, physical 2337904k
vm_info: Java HotSpot(TM) Server VM (1.5.0_14-p8-avg_24_nov_2008_20_36)
for freebsd-x86, built on Nov 24 2008 20:48:57 by root with gcc 4.2.1
20070719 [FreeBSD]
GDB gives this information:
#0 0x280eef07 in thr_kill () from /lib/libc.so.7
#1 0x280a24e6 in pthread_kill () from /lib/libthr.so.3
#2 0x280a00b3 in raise () from /lib/libthr.so.3
#3 0x2817f249 in abort () from /lib/libc.so.7
#4 0x2873f9d4 in os::abort () from
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/lib/i386/server/libjvm.so
#5 0x28825cde in VMError::report_and_die () from
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/lib/i386/server/libjvm.so
#6 0x284de7eb in report_fatal () from
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/lib/i386/server/libjvm.so
#7 0x28729edf in nmethod::continuation_for_implicit_exception () from
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/lib/i386/server/libjvm.so
#8 0x287b32fa in SharedRuntime::continuation_for_implicit_exception ()
from
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/lib/i386/server/libjvm.so
#9 0x28743d30 in JVM_handle_bsd_signal () from
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/lib/i386/server/libjvm.so
#10 0x2873ec76 in signalHandler () from
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/lib/i386/server/libjvm.so
#11 <signal handler called>
#12 0x28efd9c1 in ?? ()
...
Here's a snippet from ktrace that I was able to obtain:
34746 100439 pack200 CALL nanosleep(0xff8f3e94,0xff8f3e8c)
34746 100377 pack200 RET _umtx_op -1 errno 60 Operation timed out
34746 100377 pack200 CALL clock_gettime(0,0xffcfbe80)
34746 100377 pack200 RET clock_gettime 0
34746 100377 pack200 CALL clock_gettime(0,0xffcfbe80)
34746 100377 pack200 RET clock_gettime 0
34746 100377 pack200 CALL mprotect(0x281c8000,0x1000,PROT_NONE)
34746 100377 pack200 RET mprotect 0
34746 100400 pack200 PSIG SIGSEGV caught handler=0x2873ec50 mask=0x4
code=0x2
34746 100377 pack200 CALL nanosleep(0xffcfbe24,0xffcfbe1c)
34746 100400 pack200 CALL sigaction(SIGSEGV,0xffffb9d8,0xffffb9c0)
34746 100400 pack200 RET sigaction 0
34746 100400 pack200 CALL sigaction(SIGBUS,0xffffb9d8,0xffffb9c0)
34746 100400 pack200 RET sigaction 0
34746 100400 pack200 CALL write(0x1,0xffffb0c8,0x2)
34746 100400 pack200 GIO fd 1 wrote 2 bytes
"#
"
34746 100400 pack200 RET write 2
34746 100400 pack200 CALL write(0x1,0xffffb0c8,0x44)
34746 100400 pack200 GIO fd 1 wrote 68 bytes
"# An unexpected error has been detected by HotSpot Virtual Machine:
Also, I ran the command several times from command line and it looks
like a chance of the crash is 50%.
BTW, the command was:
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/bin/pack200
-J-Xmx256m -J-esa -J-ea "--no-gzip" "--config-file=pack.all.properties"
--strip-debug
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/pack/pack-jre-jars/lib/rt.pack
/usr/obj/ports/usr/ports/java/jdk15/work/control/build/bsd-i586/j2re-image/lib/rt.jar
Working directory was:
/usr/obj/ports/usr/ports/java/jdk15/work/install/make/pack
Just in case: the machine has 4GB of RAM.
--
Andriy Gapon
More information about the freebsd-amd64
mailing list