From drazzib at drazzib.com Thu Jun 23 14:27:44 2011 From: drazzib at drazzib.com (Damien Raude-Morvan) Date: Thu, 23 Jun 2011 23:27:44 +0200 Subject: OpenJDK7 on Debian GNU/kFreeBSD Message-ID: <201106232327.53814.drazzib@drazzib.com> Hi, I'm currently trying to port OpenJDK7 (ie. icedtea) to Debian GNU/kFreeBSD [1]. Debian GNU/kFreeBSD is a port that consists of GNU userland using the GNU C library on top of FreeBSD kernel with classic Debian package management software :) There is in fact two ports : kfreebsd-i386 and kfreebsd-amd64. My current WiP patch [2] consist mostly in : - Alter build system to consider GNU/kFreeBSD like mostly linux (ie. add many ifdef __GLIBC__) - Steal BSD network stack impl for bsd-port hg repository - Use sysctl call instead of sysinfo() - Disable build of alsa and sctp I'm able to compile a stage1 jdk (openjdk-boot) but first invocation of this jdk (with ZeroVM of course) just fail badly : # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (os_linux_zero.cpp:260), pid=96754, tid=1026 # fatal error: caught unhandled signal 11 # # JRE version: 7.0_136-b136 # Java VM: OpenJDK Zero VM (21.0-b07 interpreted mode linux-i386 ) # Derivative: IcedTea7 2.0pre # Distribution: Debian GNU/kFreeBSD unstable (sid), package 7~b136-2.0~pre1-3 I've attached hs_err_pid96754.log and put a GDB output online [3] => Did someone have a clue about this issue ? Or maybe a process to track down this segv signal ? PS: Please keep debian-bsd at l.d.o and 567992 at b.d.o in CC. [1] http://www.debian.org/ports/kfreebsd-gnu/ [2] http://people.debian.org/~drazzib/openjdk/kfreebsd-support.diff [3] http://paste.debian.net/120778/ Regards, -- Damien -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid96754.log Type: text/x-log Size: 13799 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/zero-dev/attachments/20110623/d69fb0fb/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://mail.openjdk.java.net/pipermail/zero-dev/attachments/20110623/d69fb0fb/attachment-0001.bin From ahughes at redhat.com Mon Jun 27 17:11:12 2011 From: ahughes at redhat.com (Andrew John Hughes) Date: Tue, 28 Jun 2011 01:11:12 +0100 Subject: OpenJDK7 on Debian GNU/kFreeBSD In-Reply-To: <201106232327.53814.drazzib@drazzib.com> References: <201106232327.53814.drazzib@drazzib.com> Message-ID: <20110628001112.GA3596@shelob.middle-earth.co.uk> On Thu, Jun 23, 2011 at 11:27:44PM +0200, Damien Raude-Morvan wrote: > Hi, > > I'm currently trying to port OpenJDK7 (ie. icedtea) These aren't the same thing. IcedTea wraps and expands OpenJDK7. > to Debian GNU/kFreeBSD > [1]. Debian GNU/kFreeBSD is a port that consists of GNU userland using the GNU > C library on top of FreeBSD kernel with classic Debian package management > software :) There is in fact two ports : kfreebsd-i386 and kfreebsd-amd64. > > My current WiP patch [2] consist mostly in : > - Alter build system to consider GNU/kFreeBSD like mostly linux (ie. add many > ifdef __GLIBC__) > - Steal BSD network stack impl for bsd-port hg repository > - Use sysctl call instead of sysinfo() > - Disable build of alsa and sctp > I'd be very surprised if you don't need more of the bsd work than just the network stack. What exactly have you ported across? > I'm able to compile a stage1 jdk (openjdk-boot) but first invocation of this > jdk (with ZeroVM of course) just fail badly : Why ZeroVM? You mention above that the port is to x86 and x86_64, both of which have full HotSpot ports with a JIT. > # > # A fatal error has been detected by the Java Runtime Environment: > # > # Internal Error (os_linux_zero.cpp:260), pid=96754, tid=1026 > # fatal error: caught unhandled signal 11 > # > # JRE version: 7.0_136-b136 > # Java VM: OpenJDK Zero VM (21.0-b07 interpreted mode linux-i386 ) > # Derivative: IcedTea7 2.0pre > # Distribution: Debian GNU/kFreeBSD unstable (sid), package 7~b136-2.0~pre1-3 > > I've attached hs_err_pid96754.log and put a GDB output online [3] > > => Did someone have a clue about this issue ? Or maybe a process to track down > this segv signal ? > > PS: Please keep debian-bsd at l.d.o and 567992 at b.d.o in CC. > No but given OpenJDK7 doesn't support *BSD, I'm not too surprised this doesn't work, especially when you're also throwing zero into the mix. Why not just build with the bsd-port? There's an option to do that, though it's not really maintained as I don't know of anyone running IcedTea on *BSD. > [1] http://www.debian.org/ports/kfreebsd-gnu/ > [2] http://people.debian.org/~drazzib/openjdk/kfreebsd-support.diff > [3] http://paste.debian.net/120778/ > > Regards, > -- > Damien > # > # A fatal error has been detected by the Java Runtime Environment: > # > # Internal Error (os_linux_zero.cpp:260), pid=96754, tid=1026 > # fatal error: caught unhandled signal 11 > # > # JRE version: 7.0_136-b136 > # Java VM: OpenJDK Zero VM (21.0-b07 interpreted mode linux-i386 ) > # Derivative: IcedTea7 2.0pre > # Distribution: Debian GNU/kFreeBSD unstable (sid), package 7~b136-2.0~pre1-3 > # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again > # > # If you would like to submit a bug report, please include > # instructions on how to reproduce the bug and visit: > # http://icedtea.classpath.org/bugzilla > # The crash happened outside the Java Virtual Machine in native code. > # See problematic frame for where to report the bug. > # > > --------------- T H R E A D --------------- > > Current thread (0x08051e78): JavaThread "main" [_thread_in_native, id=96756, stack(0x28785000,0x28904000)] > > Stack: [0x28785000,0x28904000], sp=0x288460e8, free space=772k > Java frames: > 0x28903af4: unboxed parameter[2] = 0x28903b50 > 0x28903af8: parameter[0] (JNIEnv) = 0x28846d3c > 0x28903afc: parameter[1] (mirror) = 0x28846d38 > 0x28903b00: parameter[2] = 0x28903af4 > 0x28903b04: istate->_thread = 0x08051e78 > 0x28903b08: istate->_bcp = 0x00000000 > 0x28903b0c: istate->_locals = 0x28903b50 > 0x28903b10: istate->_constants = 0x4a08d288 > 0x28903b14: istate->_method = java.lang.System.initProperties(Ljava/util/Properties;)Ljava/util/Properties; > 0x28903b18: istate->_mdx = 0x00000000 > 0x28903b1c: istate->_stack = 0x28903b00 > 0x28903b20: istate->_msg = 0x00000002 > 0x28903b24: istate->_result = 0x00000000 > 0x28903b28: (istate->_result) = 0x00000003 > 0x28903b2c: (istate->_result) = 0x00000000 > 0x28903b30: istate->_prev_link = 0x00000000 > 0x28903b34: istate->_oop_temp = 0x2aa10c20 > 0x28903b38: istate->_stack_base = 0x28903b04 > 0x28903b3c: istate->_stack_limit = 0x28903b00 > 0x28903b40: istate->_monitor_base = 0x28903b04 > 0x28903b44: istate->_self_link = 0x28903b04 > 0x28903b48: frame_type = INTERPRETER_FRAME > 0x28903b4c: next_frame = 0x28903b9c > > 0x28903b50: local[0] = 0x2aa150a0 > 0x28903b54: istate->_thread = 0x08051e78 > 0x28903b58: istate->_bcp = 0x4a028fa5 (bci 13) > 0x28903b5c: istate->_locals = 0x28903bac > 0x28903b60: istate->_constants = 0x4a08d288 > 0x28903b64: istate->_method = java.lang.System.initializeSystemClass()V > 0x28903b68: istate->_mdx = 0x00000000 > 0x28903b6c: istate->_stack = 0x28903b4c > 0x28903b70: istate->_msg = 0x00000008 > 0x28903b74: istate->_result = 0x4a0282a8 > 0x28903b78: (istate->_result) = 0x28990174 > 0x28903b7c: (istate->_result) = 0x00000003 > 0x28903b80: istate->_prev_link = 0x00000000 > 0x28903b84: istate->_oop_temp = 0x00000000 > 0x28903b88: istate->_stack_base = 0x28903b54 > 0x28903b8c: istate->_stack_limit = 0x28903b38 > 0x28903b90: istate->_monitor_base = 0x28903b54 > 0x28903b94: istate->_self_link = 0x28903b54 > 0x28903b98: frame_type = INTERPRETER_FRAME > 0x28903b9c: next_frame = 0x28903bb8 > > 0x28903ba0: local[3] = 0x00000000 > 0x28903ba4: local[2] = 0x00000000 > 0x28903ba8: local[1] = 0x00000000 > 0x28903bac: local[0] = 0x00000000 > 0x28903bb0: call_wrapper = 0x28903c38 > 0x28903bb4: frame_type = ENTRY_FRAME > 0x28903bb8: next_frame = 0x00000000 > > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x080d69c8 JavaThread "Finalizer" daemon [_thread_blocked, id=96759, stack(0x4e5e0000,0x4e760000)] > 0x080d1330 JavaThread "Reference Handler" daemon [_thread_blocked, id=96758, stack(0x4e460000,0x4e5e0000)] > =>0x08051e78 JavaThread "main" [_thread_in_native, id=96756, stack(0x28785000,0x28904000)] > > Other Threads: > 0x080ca290 VMThread [stack: 0x4e3e1000,0x4e460000] [id=96757] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 4800K, used 20K [0x2aa10000, 0x2af40000, 0x35160000) > eden space 4288K, 0% used [0x2aa10000, 0x2aa152d8, 0x2ae40000) > from space 512K, 0% used [0x2ae40000, 0x2ae40000, 0x2aec0000) > to space 512K, 0% used [0x2aec0000, 0x2aec0000, 0x2af40000) > tenured generation total 10752K, used 0K [0x35160000, 0x35be0000, 0x4a010000) > the space 10752K, 0% used [0x35160000, 0x35160000, 0x35160200, 0x35be0000) > compacting perm gen total 4096K, used 587K [0x4a010000, 0x4a410000, 0x4e010000) > the space 4096K, 14% used [0x4a010000, 0x4a0a2f30, 0x4a0a3000, 0x4a410000) > No shared spaces configured. > > Code Cache [0x28990000, 0x289b8000, 0x2a990000) > total_blobs=36 nmethods=0 adapters=22 free_code_cache=32700Kb largest_free_block=33485568 > > Dynamic libraries: > 08048000-08049000 r-xp 00003000 00:00 2096639 /srv/storage/drazzib/openjdk7/openjdk-7-7~b136-2.0~pre1/build/openjdk.build-boot/j2sdk-image/bin/java > 08049000-080f1000 rw-p 000a8000 00:00 0 > 28049000-28064000 r-xp 0001d000 00:00 26 /lib/i386-kfreebsd-gnu/ld-2.13.so > 28064000-28065000 r--p 0001d000 00:00 26 /lib/i386-kfreebsd-gnu/ld-2.13.so > 28065000-28068000 rw-p 00003000 00:00 0 > 28068000-28089000 r--p 00021000 00:00 47405 /etc/ld.so.cache > 28089000-2809c000 r-xp 00014000 00:00 1039205 /usr/lib/libz.so.1.2.3.4 > 2809c000-2809d000 rw-p 00014000 00:00 1039205 /usr/lib/libz.so.1.2.3.4 > 2809d000-280aa000 r-xp 00013000 00:00 901 /lib/i386-kfreebsd-gnu/libpthread-0.10.so > 280aa000-280ab000 r--p 00013000 00:00 901 /lib/i386-kfreebsd-gnu/libpthread-0.10.so > 280ab000-280ac000 rw-p 00013000 00:00 901 /lib/i386-kfreebsd-gnu/libpthread-0.10.so > 280ac000-280b3000 rw-p 00007000 00:00 0 > 280b3000-280be000 r-xp 0002b000 00:00 2096129 /srv/storage/drazzib/openjdk7/openjdk-7-7~b136-2.0~pre1/build/openjdk.build-boot/j2sdk-image/jre/lib/i386/jli/libjli.so > 280be000-280bf000 rw-p 0002b000 00:00 2096129 /srv/storage/drazzib/openjdk7/openjdk-7-7~b136-2.0~pre1/build/openjdk.build-boot/j2sdk-image/jre/lib/i386/jli/libjli.so > 280bf000-280c1000 r-xp 00003000 00:00 888 /lib/i386-kfreebsd-gnu/libdl-2.13.so > 280c1000-280c2000 r--p 00003000 00:00 888 /lib/i386-kfreebsd-gnu/libdl-2.13.so > 280c2000-280c3000 rw-p 00003000 00:00 888 /lib/i386-kfreebsd-gnu/libdl-2.13.so > 280c3000-281e7000 r-xp 00128000 00:00 33 /lib/i386-kfreebsd-gnu/libc-2.13.so > 281e7000-281e9000 r--p 00128000 00:00 33 /lib/i386-kfreebsd-gnu/libc-2.13.so > 281e9000-281ea000 rw-p 00128000 00:00 33 /lib/i386-kfreebsd-gnu/libc-2.13.so > 281ea000-281ee000 rw-p 00004000 00:00 0 > 281ee000-285af000 r-xp 06518000 00:00 2076376 /srv/storage/drazzib/openjdk7/openjdk-7-7~b136-2.0~pre1/build/openjdk.build-boot/j2sdk-image/jre/lib/i386/server/libjvm.so > 285af000-28644000 rw-p 06518000 00:00 2076376 /srv/storage/drazzib/openjdk7/openjdk-7-7~b136-2.0~pre1/build/openjdk.build-boot/j2sdk-image/jre/lib/i386/server/libjvm.so > 28644000-28651000 rw-p 0000d000 00:00 0 > 28651000-28733000 r-xp 000e8000 00:00 1154235 /usr/lib/i386-kfreebsd-gnu/libstdc++.so.6.0.16 > 28733000-28734000 ---p 000e8000 00:00 1154235 /usr/lib/i386-kfreebsd-gnu/libstdc++.so.6.0.16 > 28734000-28738000 r--p 000e8000 00:00 1154235 /usr/lib/i386-kfreebsd-gnu/libstdc++.so.6.0.16 > 28738000-28739000 rw-p 000e8000 00:00 1154235 /usr/lib/i386-kfreebsd-gnu/libstdc++.so.6.0.16 > 28739000-28740000 rw-p 00007000 00:00 0 > 28740000-28764000 r-xp 00025000 00:00 890 /lib/i386-kfreebsd-gnu/libm-2.13.so > 28764000-28765000 r--p 00025000 00:00 890 /lib/i386-kfreebsd-gnu/libm-2.13.so > 28765000-28766000 rw-p 00025000 00:00 890 /lib/i386-kfreebsd-gnu/libm-2.13.so > 28766000-28782000 r-xp 0001d000 00:00 418 /lib/i386-kfreebsd-gnu/libgcc_s.so.1 > 28782000-28783000 rw-p 0001d000 00:00 418 /lib/i386-kfreebsd-gnu/libgcc_s.so.1 > 28783000-28784000 ---p 00181000 00:00 0 > 28784000-28785000 rwxp 00181000 00:00 0 > 28785000-28788000 ---p 00181000 00:00 0 > 28788000-28904000 rwxp 00181000 00:00 0 > 28904000-2890a000 r-xp 00007000 00:00 903 /lib/i386-kfreebsd-gnu/librt-2.13.so > 2890a000-2890b000 r--p 00007000 00:00 903 /lib/i386-kfreebsd-gnu/librt-2.13.so > 2890b000-2890c000 rw-p 00007000 00:00 903 /lib/i386-kfreebsd-gnu/librt-2.13.so > 2890c000-28914000 rw-p 00007000 00:00 0 > 28914000-2891f000 r-xp 0002e000 00:00 2076380 /srv/storage/drazzib/openjdk7/openjdk-7-7~b136-2.0~pre1/build/openjdk.build-boot/j2sdk-image/jre/lib/i386/libverify.so > 2891f000-28920000 rw-p 0002e000 00:00 2076380 /srv/storage/drazzib/openjdk7/openjdk-7-7~b136-2.0~pre1/build/openjdk.build-boot/j2sdk-image/jre/lib/i386/libverify.so > 28920000-28946000 r-xp 00120000 00:00 2076381 /srv/storage/drazzib/openjdk7/openjdk-7-7~b136-2.0~pre1/build/openjdk.build-boot/j2sdk-image/jre/lib/i386/libjava.so > 28946000-28947000 rw-p 00120000 00:00 2076381 /srv/storage/drazzib/openjdk7/openjdk-7-7~b136-2.0~pre1/build/openjdk.build-boot/j2sdk-image/jre/lib/i386/libjava.so > 28947000-28948000 r--p 00120000 00:00 0 > 28948000-28949000 rw-p 00001000 00:00 0 > 28949000-2894f000 r-xp 00007000 00:00 894 /lib/i386-kfreebsd-gnu/libnss_compat-2.13.so > 2894f000-28950000 r--p 00007000 00:00 894 /lib/i386-kfreebsd-gnu/libnss_compat-2.13.so > 28950000-28951000 rw-p 00007000 00:00 894 /lib/i386-kfreebsd-gnu/libnss_compat-2.13.so > 28951000-28964000 r-xp 00014000 00:00 893 /lib/i386-kfreebsd-gnu/libnsl-2.13.so > 28964000-28965000 r--p 00014000 00:00 893 /lib/i386-kfreebsd-gnu/libnsl-2.13.so > 28965000-28966000 rw-p 00014000 00:00 893 /lib/i386-kfreebsd-gnu/libnsl-2.13.so > 28966000-28968000 rw-p 00014000 00:00 0 > 28968000-28971000 r-xp 0000a000 00:00 898 /lib/i386-kfreebsd-gnu/libnss_nis-2.13.so > 28971000-28972000 r--p 0000a000 00:00 898 /lib/i386-kfreebsd-gnu/libnss_nis-2.13.so > 28972000-28973000 rw-p 0000a000 00:00 898 /lib/i386-kfreebsd-gnu/libnss_nis-2.13.so > 28973000-2897d000 r-xp 0000b000 00:00 896 /lib/i386-kfreebsd-gnu/libnss_files-2.13.so > 2897d000-2897e000 r--p 0000b000 00:00 896 /lib/i386-kfreebsd-gnu/libnss_files-2.13.so > 2897e000-2897f000 rw-p 0000b000 00:00 896 /lib/i386-kfreebsd-gnu/libnss_files-2.13.so > 2897f000-28987000 rw-p 00008000 00:00 47106 > 28987000-2898f000 r-xp 00027000 00:00 2076382 /srv/storage/drazzib/openjdk7/openjdk-7-7~b136-2.0~pre1/build/openjdk.build-boot/j2sdk-image/jre/lib/i386/libzip.so > 2898f000-28990000 rw-p 00027000 00:00 2076382 /srv/storage/drazzib/openjdk7/openjdk-7-7~b136-2.0~pre1/build/openjdk.build-boot/j2sdk-image/jre/lib/i386/libzip.so > 28990000-289b8000 rwxp 00028000 00:00 0 > 289b8000-2a990000 rw-p 25865000 00:00 0 > 2a990000-2a991000 rw-p 00001000 00:00 0 > 2a991000-2aa10000 rw-p 25865000 00:00 0 > 2aa10000-2af40000 rw-p 00530000 00:00 0 > 2af40000-35160000 rw-p 25865000 00:00 0 > 35160000-35be0000 rw-p 25865000 00:00 0 > 35be0000-4a010000 rw-p 25865000 00:00 0 > 4a010000-4a410000 rw-p 00400000 00:00 0 > 4a410000-4e010000 rw-p 25865000 00:00 0 > 4e010000-4e013000 rw-p 00003000 00:00 0 > 4e013000-4e063000 rw-p 25865000 00:00 0 > 4e063000-4e069000 rw-p 00006000 00:00 0 > 4e069000-4e10b000 rw-p 25865000 00:00 0 > 4e10b000-4e10d000 rw-p 00002000 00:00 0 > 4e10d000-4e12c000 rw-p 25865000 00:00 0 > 4e12c000-4e132000 rw-p 25865000 00:00 0 > 4e132000-4e1d4000 rw-p 25865000 00:00 0 > 4e1d4000-4e1d7000 rw-p 00003000 00:00 0 > 4e1d7000-4e1f5000 rw-p 25865000 00:00 0 > 4e1f5000-4e398000 r--p 03eba000 00:00 2076408 /srv/storage/drazzib/openjdk7/openjdk-7-7~b136-2.0~pre1/build/openjdk.build-boot/j2sdk-image/jre/lib/rt.jar > 4e398000-4e3df000 rw-p 003c8000 00:00 0 > 4e3df000-4e3e0000 ---p 003c8000 00:00 0 > 4e3e0000-4e460000 rwxp 003c8000 00:00 0 > 4e460000-4e463000 ---p 003c8000 00:00 0 > 4e463000-4e5e0000 rwxp 003c8000 00:00 0 > 4e5e0000-4e5e3000 ---p 003c8000 00:00 0 > 4e5e3000-4e760000 rwxp 003c8000 00:00 0 > bfbe0000-bfc00000 rwxp 00020000 00:00 0 > > VM Arguments: > java_command: > Launcher Type: SUN_STANDARD > > Environment Variables: > PATH=/srv/storage/drazzib/openjdk7/openjdk-7-7~b136-2.0~pre1/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 > > Signal Handlers: > SIGSEGV: [libjvm.so+0x35a210], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > SIGBUS: [libjvm.so+0x35a210], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > SIGFPE: [libjvm.so+0x2a49f0], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > SIGPIPE: [libjvm.so+0x2a49f0], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > SIGXFSZ: [libjvm.so+0x2a49f0], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > SIGILL: [libjvm.so+0x2a49f0], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > SIGUSR1: SIG_DFL, sa_mask[0]=0x20000000, sa_flags=0x00000002 > SIGUSR2: [libjvm.so+0x2a4e50], sa_mask[0]=0x80000000, sa_flags=0x00000042 > SIGHUP: SIG_DFL, sa_mask[0]=0x00000001, sa_flags=0x00000002 > SIGINT: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 > SIGTERM: SIG_DFL, sa_mask[0]=0x00004000, sa_flags=0x00000002 > SIGQUIT: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 > > > --------------- S Y S T E M --------------- > > OS:wheezy/sid > > uname:GNU/kFreeBSD 8.2-1-686-smp #0 Sat Feb 19 22:31:15 UTC 2011 i686 > libc:glibc 2.13 linuxthreads-0.10 (floating stack) > rlimit: STACK 65536k, CORE 0k, NPROC 5547, NOFILE 1024, AS infinity > load average:0.94 1.09 1.17 > > /proc/meminfo: > total: used: free: shared: buffers: cached: > Mem: 1051033600 147451904 903581696 8658944 0 27402240 > Swap: 1073741824 12288 1073729536 > MemTotal: 1026400 kB > MemFree: 882404 kB > MemShared: 8456 kB > Buffers: 0 kB > Cached: 26760 kB > SwapTotal: 1048576 kB > SwapFree: 1048564 kB > > > CPU:total 2 > > Memory: 4k page, physical 1026400k(882404k free) > > vm_info: OpenJDK Zero VM (21.0-b07) for linux-i386 JRE (1.7.0_136-b136), built on Jun 22 2011 23:35:49 by "drazzib" with gcc 4.6.1 20110616 (prerelease) > > time: Thu Jun 23 00:01:28 2011 > elapsed time: 0 seconds > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From drazzib at drazzib.com Tue Jun 28 11:52:39 2011 From: drazzib at drazzib.com (Damien Raude-Morvan) Date: Tue, 28 Jun 2011 20:52:39 +0200 Subject: Bug#567992: OpenJDK7 on Debian GNU/kFreeBSD In-Reply-To: <20110628001112.GA3596@shelob.middle-earth.co.uk> References: <201106232327.53814.drazzib@drazzib.com> <20110628001112.GA3596@shelob.middle-earth.co.uk> Message-ID: <201106282052.43182.drazzib@drazzib.com> Hi Andrew, Thanks for your feedback. Le mardi 28 juin 2011 02:11:12, Andrew John Hughes a ?crit : > On Thu, Jun 23, 2011 at 11:27:44PM +0200, Damien Raude-Morvan wrote: > > Hi, > > > > I'm currently trying to port OpenJDK7 (ie. icedtea) > > These aren't the same thing. IcedTea wraps and expands OpenJDK7. Yes, I know that's not the same thing, sorry for abusing of "id est" abbreviation. BTW, since I've CC people not used to "openjdk" ecosystem, I prefer to talk about openjdk than icedtea, is this a problem ? > > My current WiP patch [2] consist mostly in : > > - Alter build system to consider GNU/kFreeBSD like mostly linux (ie. add > > many ifdef __GLIBC__) > > > > - Steal BSD network stack impl for bsd-port hg repository > > - Use sysctl call instead of sysinfo() > > - Disable build of alsa and sctp > > I'd be very surprised if you don't need more of the bsd work than just the > network stack. What exactly have you ported across? Right now, main backports from bsd-port branch are : - jdk/src/solaris/native/java/net/NetworkInterface.c (small changes in structs from kernel) - jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c (sendfile from kfreebsd) - hotspot/src/os/linux/vm/attachListener_linux.cpp (LOCAL_PEERCRED instead of SO_PEERCRED) > > I'm able to compile a stage1 jdk (openjdk-boot) but first invocation of > > this > > > jdk (with ZeroVM of course) just fail badly : > Why ZeroVM? You mention above that the port is to x86 and x86_64, both of > which have full HotSpot ports with a JIT. Because I thought (naively ?) that since Zero doesn't use any assembly/linux/gcc specific hacks it should be easier to port to GNU/kFreeBSD as a first step. > > I've attached hs_err_pid96754.log and put a GDB output online [3] > > > > => Did someone have a clue about this issue ? Or maybe a process to track > > down this segv signal ? > > > > PS: Please keep debian-bsd at l.d.o and 567992 at b.d.o in CC. > > No but given OpenJDK7 doesn't support *BSD, I'm not too surprised this > doesn't work, especially when you're also throwing zero into the mix. Why > not just build with the bsd-port? There's an option to do that, though > it's not really maintained as I don't know of anyone running IcedTea on > *BSD. Could you explain a little bit more why do you think zerovm can add complexity/errors to my porting work ? You think that it would be simplier to work on porting to Hotspot ? Right now, building bsd-port give a lot more errors since : - it expect a *BSD userland (whereas GNU/kFreeBSD has **GNU tools**) - it expect a *BSD libc (various diff from **GNU glibc**) - large part of source code is a copy/paste from linux directories (lots of duplicated code) so patches from icedtea are not applied... But maybe you're right, I'll try the other way around : I'll try to adapt bsd- port to GNU/kFreeBSD. Cheers, -- Damien -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://mail.openjdk.java.net/pipermail/zero-dev/attachments/20110628/90ddafd7/attachment.bin From ahughes at redhat.com Wed Jun 29 10:46:07 2011 From: ahughes at redhat.com (Andrew John Hughes) Date: Wed, 29 Jun 2011 18:46:07 +0100 Subject: Bug#567992: OpenJDK7 on Debian GNU/kFreeBSD In-Reply-To: <201106282052.43182.drazzib@drazzib.com> References: <201106232327.53814.drazzib@drazzib.com> <20110628001112.GA3596@shelob.middle-earth.co.uk> <201106282052.43182.drazzib@drazzib.com> Message-ID: <20110629174607.GH3268@shelob.middle-earth.co.uk> On Tue, Jun 28, 2011 at 08:52:39PM +0200, Damien Raude-Morvan wrote: > Hi Andrew, > > Thanks for your feedback. > > Le mardi 28 juin 2011 02:11:12, Andrew John Hughes a ?crit : > > On Thu, Jun 23, 2011 at 11:27:44PM +0200, Damien Raude-Morvan wrote: > > > Hi, > > > > > > I'm currently trying to port OpenJDK7 (ie. icedtea) > > > > These aren't the same thing. IcedTea wraps and expands OpenJDK7. > > Yes, I know that's not the same thing, sorry for abusing of "id est" > abbreviation. BTW, since I've CC people not used to "openjdk" ecosystem, I > prefer to talk about openjdk than icedtea, is this a problem ? > It depends where the problems are really. Referring to patches in IcedTea as OpenJDK patches, for example, would be very confusing and unhelpful. OpenJDK is a component of IcedTea. Where there are problems with code in the OpenJDK tree, then of course refer to it as OpenJDK. But issues with configure and IcedTea patches should refer to IcedTea for clarity. > > > My current WiP patch [2] consist mostly in : > > > - Alter build system to consider GNU/kFreeBSD like mostly linux (ie. add > > > many ifdef __GLIBC__) > > > > > > - Steal BSD network stack impl for bsd-port hg repository > > > - Use sysctl call instead of sysinfo() > > > - Disable build of alsa and sctp > > > > I'd be very surprised if you don't need more of the bsd work than just the > > network stack. What exactly have you ported across? > > Right now, main backports from bsd-port branch are : > - jdk/src/solaris/native/java/net/NetworkInterface.c (small changes in structs > from kernel) > - jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c (sendfile from kfreebsd) > - hotspot/src/os/linux/vm/attachListener_linux.cpp (LOCAL_PEERCRED instead of > SO_PEERCRED) > As we're talking about 7, there is a separate forest for IcedTea which extends the main (http://hg.openjdk.java.net/jdk7/jdk7) one maintained by Oracle with extra patches. Through this, we can add stuff we need more easily. I don't see any reason we couldn't review your additions and add them to the IcedTea OpenJDK forest as long as they don't break standard GNU/Linux builds. > > > I'm able to compile a stage1 jdk (openjdk-boot) but first invocation of > > > this > > > > > jdk (with ZeroVM of course) just fail badly : > > Why ZeroVM? You mention above that the port is to x86 and x86_64, both of > > which have full HotSpot ports with a JIT. > > Because I thought (naively ?) that since Zero doesn't use any > assembly/linux/gcc specific hacks it should be easier to port to GNU/kFreeBSD > as a first step. > > > > I've attached hs_err_pid96754.log and put a GDB output online [3] > > > > > > => Did someone have a clue about this issue ? Or maybe a process to track > > > down this segv signal ? > > > > > > PS: Please keep debian-bsd at l.d.o and 567992 at b.d.o in CC. > > > > No but given OpenJDK7 doesn't support *BSD, I'm not too surprised this > > doesn't work, especially when you're also throwing zero into the mix. Why > > not just build with the bsd-port? There's an option to do that, though > > it's not really maintained as I don't know of anyone running IcedTea on > > *BSD. > > Could you explain a little bit more why do you think zerovm can add > complexity/errors to my porting work ? You think that it would be simplier to > work on porting to Hotspot ? > > Right now, building bsd-port give a lot more errors since : > - it expect a *BSD userland (whereas GNU/kFreeBSD has **GNU tools**) > - it expect a *BSD libc (various diff from **GNU glibc**) > - large part of source code is a copy/paste from linux directories (lots of > duplicated code) so patches from icedtea are not applied... > > But maybe you're right, I'll try the other way around : I'll try to adapt bsd- > port to GNU/kFreeBSD. > Sorry, for some reason I had it in my head that you were doing a traditional BSD port, even though I know what GNU/kFreeBSD is... That's what I get for responding as I'm about to leave for the evening ;-) I still think Zero is not the best route though for x86 and x86_64, because, if you're going to put the effort in to getting something working, it would better for it to be the heavily-maintained and highly-performant JIT ports than Zero which gets only sporadic maintenance and is about 30x slower than the JIT version. So even if it is slightly easier to get working, you'll probably want to move to the JIT version anyway for any production use. As GNU/kFreeBSD is the same as GNU/Linux outside the kernel, I think cherry-picking from the BSD tree, as you have been, may be the right approach. Depending on how much of 'linux' in the HotSpot tree is the kernel and how much is GNU, we may want to either reuse the linux directories or create new ones. It may be just a case of conditional application of some of the linux stuff. Is there a recommended way of getting access to a GNU/kFreeBSD box e.g. an SSH login or a KVM image? I do wonder if building OpenJDK on its own might be easier to begin with, so you don't have the additional overhead of configure and passing things through to the underlying OpenJDK make invocation. > Cheers, > -- > Damien -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From drazzib at drazzib.com Thu Jun 30 07:39:55 2011 From: drazzib at drazzib.com (Damien Raude-Morvan) Date: Thu, 30 Jun 2011 16:39:55 +0200 Subject: Bug#567992: OpenJDK7 on Debian GNU/kFreeBSD In-Reply-To: <20110630122341.GA2854@ohm.aurel32.net> References: <201106232327.53814.drazzib@drazzib.com> <20110628001112.GA3596@shelob.middle-earth.co.uk> <201106282052.43182.drazzib@drazzib.com> <20110629174607.GH3268@shelob.middle-earth.co.uk> <20110630122341.GA2854@ohm.aurel32.net> Message-ID: <524809c6d8dc71bfbf5307c3bedb62c2@drazzib.com> Hi, On Thu, 30 Jun 2011 14:23:41 +0200, Aurelien Jarno wrote: > On Wed, Jun 29, 2011 at 08:21:35PM +0200, Robert Millan wrote: >> 2011/6/29 Andrew John Hughes : >> > Is there a recommended way of getting access to a GNU/kFreeBSD box >> > e.g. an SSH login or a KVM >> > image? >> >> There are two public development boxes (see http://io.debian.net and >> http://asdfasdf.debian.net) but AFAIK access is only granted to Debian >> developers. I'm using asdfasdf.debian.net for porting/testing my own OpenJDK7 patches on kfreebsd-amd64 and another private porting machine for kfreebsd-i386 (provided by kolter_AT_debian.org). > Access is also provided for non-Debian developers, provided it is to > work on GNU/kFreeBSD, which is clearly the case here. Please contact me > off-list if you are interested, or to the mail address you can find on > the URL above. Aur?lien, did you plan to update QEmu images published here : http://people.debian.org/~aurel32/qemu/ ? Is there a way to get your build scripts for those images ? I've used some of them previously for testing purpose and found this service really useful to get a quickly working kfreebsd-*. My workflow to get something uptodate was to download those images and dist-upgrade them latter (much faster than using debian-installer manually). Cheers, -- Damien