Date: 27 Feb 2003 16:02:59 +0100 From: "Georg-W. Koltermann" <g.w.k@web.de> To: Greg Lewis <glewis@misty.eyesbeyond.com> Cc: Munehiro Matsuda <haro@h4.dion.ne.jp>, freebsd-java@FreeBSD.ORG Subject: Re: [REPOST] java/47397: [PATCH] java/jdk13 to enable HotSpot Message-ID: <1046358179.83934.37.camel@hunter.muc.mscsoftware.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/time.h> 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 <g.w.k@web.de>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1046358179.83934.37.camel>
