Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 2003 17:24:26 -0500
From:      Christopher Rued <c.rued@xsb.com>
To:        Greg Lewis <glewis@eyesbeyond.com>
Cc:        Christopher Rued <c.rued@xsb.com>, Munehiro Matsuda <haro@h4.dion.ne.jp>, freebsd-java@FreeBSD.ORG
Subject:   Re: [REPOST] java/47397: [PATCH] java/jdk13 to enable HotSpot
Message-ID:  <15966.36890.341229.23923@ool-18bacefa.dyn.optonline.net>
In-Reply-To: <20030227161330.A58544@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> <20030226050459.A51511@misty.eyesbeyond.com> <15965.32312.772849.720730@ool-18bacefa.dyn.optonline.net> <20030227161330.A58544@misty.eyesbeyond.com>

next in thread | previous in thread | raw e-mail | index | archive | help
 Greg Lewis wrote:
 > >     $ java -client -version
 > >     java version "1.3.1-p8"
 > >     Java(TM) 2 Runtime Environment, Standard Edition (build
 > >     1.3.1-p8-cbr-030226-09:3
 > >     5)
 > >     Java HotSpot(TM) Client VM (build 1.3.1-internal, mixed mode)
 > >     Unexpected Signal : 4 occurred at PC=0x80c2427
 > >     Function name=(N/A)
 > >     Library=(N/A)
 > >     NOTE: We are unable to locate the function name symbol for the error
 > >           just occurred. Please refer to release documentation for
 > >     possible
 > >           reason and solutions.
 > >     Current Java thread:
 > >     Error: Cannot print dynamic libraries. Function not implemented for
 > >     FreeBSD
 > >     Local Time = Wed Feb 26 21:46:31 2003
 > >     Elapsed Time = -2147483648
 > >     #
 > >     # HotSpot Virtual Machine Error : 4
 > >     # Error ID : 4F530E43505002CC
 > >     # Please report this error at
 > >     # http://java.sun.com/cgi-bin/bugreport.cgi
 > >     #
 > >     # Java VM: Java HotSpot(TM) Client VM (1.3.1-internal mixed mode)
 > >     #
 > >     # An error report file has been saved as hs_err_pid56235.log.
 > >     # Please refer to the file for further information.
 > >     #
 > >     Abort (core dumped)
 > >     
 > >     I'm running 4.7-STABLE FreeBSD 4.7-STABLE #1: Sat Feb 8 19:58:28
 > >     EST 2003, cvsupped earlier that day.  The processor is a 500 MHz
 > >     AMD K6-II.
 > 
 > Thats about the same date as my userland.  I've more recently updated
 > the kernel, but the differences aren't great.  Needless to say, it
 > works for me (or I wouldn't have posted the patch :).  The best I can
 > suggest is to pull out gdb and try and get some more information about
 > what is going on.

I ran gdb, doing the following:

$ export LD_BIND_NOW=true
$ export APPHOME=/usr/local/jdk1.3.1
$ export LD_LIBRARY_PATH=/usr/local/jdk1.3.1/jre/lib/i386/native_threads:/usr/local/jdk1.3.1/jre/lib/i386/hotspot:/usr/local/jdk1.3.1/jre/lib/i386
$ gdb53 /usr/local/jdk1.3.1/jre/bin/i386/native_threads/java_g

GNU gdb 5.3 (FreeBSD)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-portbld-freebsd4.7"...
(gdb) run -client -version
Starting program: /usr/local/jdk1.3.1/jre/bin/i386/native_threads/java_g -client -version
java version "1.3.1-p8"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-p8-cbr-030226-09:35)
Java HotSpot(TM) Client VM (build 1.3.1-internal-debug, mixed mode)

Program received signal SIGILL, Illegal instruction.
0x080edafb in ?? ()
(gdb) where
#0  0x080edafb in ?? ()
#1  0x286613dd in StubRoutines::_code1 () from /usr/local/jdk1.3.1/jre/lib/i386/client/libjvm_g.so
#2  0x282a739f in JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) ()
   from /usr/local/jdk1.3.1/jre/lib/i386/client/libjvm_g.so
#3  0x282a6eb4 in JavaCalls::call(JavaValue*, methodHandle, JavaCallArguments*, Thread*) ()
   from /usr/local/jdk1.3.1/jre/lib/i386/client/libjvm_g.so
#4  0x282a6bce in JavaCalls::call_static(JavaValue*, KlassHandle, symbolHandle, symbolHandle, JavaCallArguments*, Thread*) ()
   from /usr/local/jdk1.3.1/jre/lib/i386/client/libjvm_g.so
#5  0x282a6c32 in JavaCalls::call_static(JavaValue*, KlassHandle, symbolHandle, symbolHandle, Thread*) ()
   from /usr/local/jdk1.3.1/jre/lib/i386/client/libjvm_g.so
#6  0x283e4686 in JavaThread::exit(long) () from /usr/local/jdk1.3.1/jre/lib/i386/client/libjvm_g.so
#7  0x283e8f23 in Threads::destroy_vm() () from /usr/local/jdk1.3.1/jre/lib/i386/client/libjvm_g.so
#8  0x282dfe23 in jni_DestroyJavaVM () from /usr/local/jdk1.3.1/jre/lib/i386/client/libjvm_g.so
#9  0x080493c3 in main (argc=1, argv=0xbfbff8ec) at ../../../../src/share/bin/java.c:345
#10 0x08048bc2 in _start ()
(gdb) q
The program is running.  Exit anyway? (y or n) y

...

It seems that in java.c, it's explicitly trying to destroy the JVM by
calling jni_DestroyJavaVM.  If you look farther up the stack, it goes
through Threads::exit, JavaCalls::call_*, and into
StubRoutines::_code1.

I was not able to locate the source file that contains the _code1
function -- any hints?


If I try to run javac, it also seems to fail miserably:

GNU gdb 5.3 (FreeBSD)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-portbld-freebsd4.7"...
(gdb) run TestMax.java
Starting program: /usr/local/jdk1.3.1/jre/bin/i386/native_threads/javac_g TestMax.java

Program received signal SIGSEGV, Segmentation fault.
0x281d9336 in NoHandleMark::NoHandleMark() () from /usr/local/jdk1.3.1/jre/lib/i386/hotspot/libjvm_g.so
(gdb) where
#0  0x281d9336 in NoHandleMark::NoHandleMark() () from /usr/local/jdk1.3.1/jre/lib/i386/hotspot/libjvm_g.so
#1  0x28247237 in JVM_GetInterfaceVersion () from /usr/local/jdk1.3.1/jre/lib/i386/hotspot/libjvm_g.so
#2  0x2808554e in JNI_OnLoad (vm=0x28893088, reserved=0x0) at ../../../src/share/native/common/check_version.c:17
#3  0x28834b01 in RunOnLoadHook (h=0x28063200) at ../../../src/share/javavm/runtime/classruntime.c:854
#4  0x28834c2d in LoadJavaLibrary () at ../../../src/share/javavm/runtime/classruntime.c:889
#5  0x288819ad in InitializeJavaVM (args=0xbfbfefe0) at ../../../src/share/javavm/runtime/javai.c:766
#6  0x288579c7 in JNI_CreateJavaVM (vm=0xbfbff884, penv=0xbfbff880, args=0xbfbfefe0) at ../../../src/share/javavm/runtime/jni.c:3254
#7  0x08049bff in InitializeJVM (pvm=0xbfbff884, penv=0xbfbff880, ifn=0xbfbff858) at ../../../../src/share/bin/java.c:532
#8  0x0804900c in main (argc=1, argv=0x8051088) at ../../../../src/share/bin/java.c:227
#9  0x08048bea in _start ()
(gdb) quit
The program is running.  Exit anyway? (y or n) y

Once again, I cannot find the NoHandleMark function.

I don't mean to be a pest, but there's quite a lot of code involved,
none of which I am familiar with :).

Thanks for all the help.

--
Chris

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?15966.36890.341229.23923>