From owner-freebsd-java Thu Feb 27 7: 3:28 2003 Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EBF9F37B401 for ; Thu, 27 Feb 2003 07:03:23 -0800 (PST) Received: from smtp.web.de (smtp03.web.de [217.72.192.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CA1443FD7 for ; Thu, 27 Feb 2003 07:03:22 -0800 (PST) (envelope-from g.w.k@web.de) Received: from [213.148.149.130] (helo=hunter.muc.mscsoftware.com) by smtp.web.de with asmtp (WEB.DE(Exim) 4.95 #31) id 18oPYw-0001Vk-00; Thu, 27 Feb 2003 16:03:06 +0100 Subject: Re: [REPOST] java/47397: [PATCH] java/jdk13 to enable HotSpot From: "Georg-W. Koltermann" To: Greg Lewis Cc: Munehiro Matsuda , freebsd-java@FreeBSD.ORG In-Reply-To: <20030225182018.GA62141@misty.eyesbeyond.com> References: <15962.16668.753657.116140@ool-18bacefa.dyn.optonline.net> <20030225.014627.41626713.haro@h4.dion.ne.jp> <20030225154141.A48569@misty.eyesbeyond.com> <20030225.225404.74756090.haro@h4.dion.ne.jp> <20030225182018.GA62141@misty.eyesbeyond.com> Content-Type: text/plain Organization: Message-Id: <1046358179.83934.37.camel@hunter.muc.mscsoftware.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.0 Date: 27 Feb 2003 16:02:59 +0100 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Am Di, 2003-02-25 um 19.20 schrieb Greg Lewis: > ... > > Ok. Attached gzipped and uuencoded patch should fix these issues as > well as the one you posted regarding in threads_bsd.c. > > In addition this patch includes fixes for InetAddressImpl.c which should > fix problems people are seeing on 5-CURRENT (based on a patch by > Georg-W. Koltermann). It also includes a fix from Mike Meyer to make > DEVTOOL_PATH respect LOCALBASE. > > Please test, especially on FreeBSD 5.x. I want to get this committed > before the ports freeze for 4.8. Hi Greg, here are my observations. I run 5.0-R with the libc_r patch that was distributed as part of jdk1.4.1-p2. I could build the jdk without incident. I used make NODEBUG=1 WITH_HOTSPOT=1. After installing, I got a version which behaves as follows: hunter[12]$ java -version java version "1.3.1-p8" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-p8-gwk-030227-09:23) Classic VM (build 1.3.1-p8-gwk-030227-09:23, native threads, nojit) hunter[13]$ java -client -version java version "1.3.1-p8" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-p8-gwk-030227-09:23) Java HotSpot(TM) Client VM (build 1.3.1-internal, mixed mode) hunter[14]$ java -classic -version java version "1.3.1-p8" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-p8-gwk-030227-09:23) Classic VM (build 1.3.1-p8-gwk-030227-09:23, green threads, nojit) hunter[15]$ javac Gwk.java Segmentation fault hunter[16]$ javac -client Gwk.java hunter[17]$ javac -classic Gwk.java hunter[18]$ It is unfortunate that the default version, w/o explicit VM selection, does not work. I remember having read a while ago that the combination of Classic VM and native threads is not expected to work, and basically I can confirm that :-). I have edited jre/lib/jvm.cfg and placed -classic last, and now I get a beautifully working hotspot version: hunter[7]$ java -version java version "1.3.1-p8" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-p8-gwk-030227-09:23) Java HotSpot(TM) Client VM (build 1.3.1-internal, mixed mode) hunter[8]$ java -client -version java version "1.3.1-p8" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-p8-gwk-030227-09:23) Java HotSpot(TM) Client VM (build 1.3.1-internal, mixed mode) hunter[9]$ java -classic -version An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x285a2b8d Function name=_atomic_lock Library=/usr/lib/libc_r.so.5 Current Java thread: Error: Cannot print dynamic libraries. Function not implemented for FreeBSD Local Time = Thu Feb 27 15:38:42 2003 Elapsed Time = -2147483648 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.3.1-internal mixed mode) # # An error report file has been saved as hs_err_pid92451.log. # Please refer to the file for further information. # Abort trap hunter[10]$ javac Gwk.java hunter[11]$ Note that it now defaults to the hotspot VM w/o any switches, and works beautifully. I have run Tomcat 4.1.18 and Together briefly, no incident. Thanks!!! In this version, when I try to select -classic, I get sig11 as you can see above. I assume it is again trying to utilize incompatible pieces, in a similar way as in my first case (unchanged jvm.cfg, no JVM selection switches). I don't care. I have then copied (actually symlinked for the most part, except for some dirs and the .java_wrapper) the /usr/local/jdk1.3.1 tree, and have made the following changes to the copy: * have -classic at the top of jvm.cfg * remove any subdirectories that are named hotspot, client, server, native*, at any depth in the tree I put this at jdk1.3.1.classic. When I set my JAVA_HOME and PATH to use this version, I get a beautifully working -classic JVM, w/o the need to set any JVM selection switches. The last issue is the Mozilla plugin. If I simply run Mozilla with either my hotspot version (-client at the top of jvm.cfg) or my classic version (the modified tree as described above), I get hunter[1]$ mozilla No running window found. An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x285a1b8d Function name=_atomic_lock Library=/usr/lib/libc_r.so.5 Current Java thread: Error: Cannot print dynamic libraries. Function not implemented for FreeBSD Local Time = Thu Feb 27 15:49:58 2003 Elapsed Time = -2147483648 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.3.1-internal mixed mode) # # An error report file has been saved as /tmp/hs_err_pid92604.log. # Please refer to the file for further information. # INTERNAL ERROR on Browser End: Could not read ack from browser and Mozilla aborts. However, if I set THREADS_FLAG=native in the environment as Munehiro Matsuda suggested, then even the plugin works. :-) :-) :-) :-) :-) :-) When I get time I will also try it out with 4.7-STABLE on my other computer at home and report back. -- Regards, Georg. -- Georg-W. Koltermann To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message