JDK-4763938 : fieldacc003,fieldacc004: watchpoint on inherited field crashes VM
  • Type: Bug
  • Component: vm-legacy
  • Sub-Component: jvmdi
  • Affected Version: 1.4.0,1.4.1,1.4.2,5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2002-10-16
  • Updated: 2008-05-20
  • Resolved: 2003-10-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 tigerFixed
Related Reports
Relates :  
Relates :  
Relates :  
Description

Name: pvR10198			Date: 10/16/2002


The following tests from testbase_nsk crash Hotspot VM (build 1.4.2-beta-b03):

    nsk/jvmdi/events/fieldacc003
    nsk/jvmdi/events/fieldacc004

The tests crashes Hotspot VM (build 1.4.0-b92) and
Hotspot VM (build 1.4.1-b21) as well.

The tests exercise JVMDI event JVMDI_EVENT_FIELD_ACCESS.
The tests set access watches on fields which are defined in
superclass (fieldacc003) and superinterface (fieldacc004),
then trigger access watch events on these fields
and check if clazz, method, location, field_clazz, field and
object fields of the event structure contain expected values.

To reproduce the bug run script in GammaBase/Bugs/<this bug number>
directory for fieldacc003:

    sh doit1.sh <JAVA_HOME>

and for fieldacc004:

    sh doit2.sh <JAVA_HOME>

Running the tests produce the same output:

java version "1.4.2-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b03)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b03, mixed mode)

Unexpected Signal : 11 occurred at PC=0xFE4A2060
Function=JVM_Close+0x4F1E0
Library=/net/koori.sfbay/p/jdk01/jdk/1.4.2/beta/b03/binaries/solaris-sparc/jre/l
ib/sparc/client/libjvm.so

Current Java thread:
        at fieldacc004.run(fieldacc004.java:30)
        at fieldacc004.main(fieldacc004.java:26)

Dynamic libraries:
0x10000         
/net/koori.sfbay/p/jdk01/jdk/1.4.2/beta/b03/binaries/solaris-sparc/bin/java
0xff360000      /usr/lib/libthread.so.1
0xff3a0000      /usr/lib/libdl.so.1
0xff280000      /usr/lib/libc.so.1
0xff260000      /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
0xfe400000      
/net/koori.sfbay/p/jdk01/jdk/1.4.2/beta/b03/binaries/solaris-sparc/jre/lib/sparc
/client/libjvm.so
0xff200000      /usr/lib/libCrun.so.1
0xff1e0000      /usr/lib/libsocket.so.1
0xff100000      /usr/lib/libnsl.so.1
0xff1b0000      /usr/lib/libm.so.1
0xff0e0000      /usr/lib/libsched.so.1
0xff230000      /usr/lib/libw.so.1
0xff0a0000      /usr/lib/libmp.so.2
0xff070000      
/net/koori.sfbay/p/jdk01/jdk/1.4.2/beta/b03/binaries/solaris-sparc/jre/lib/sparc
/native_threads/libhpi.so
0xff040000      
/net/koori.sfbay/p/jdk01/jdk/1.4.2/beta/b03/binaries/solaris-sparc/jre/lib/sparc
/libverify.so
0xfe3c0000      
/net/koori.sfbay/p/jdk01/jdk/1.4.2/beta/b03/binaries/solaris-sparc/jre/lib/sparc
/libjava.so
0xfe3a0000      
/net/koori.sfbay/p/jdk01/jdk/1.4.2/beta/b03/binaries/solaris-sparc/jre/lib/sparc
/libzip.so
0xfc9e0000      /usr/lib/locale/ru.koi8-r/ru.koi8-r.so.2
0xfc9c0000      ./sparc/libfieldacc004.so

Local Time = Wed Oct 16 10:40:46 2002
Elapsed Time = 1
#
# HotSpot Virtual Machine Error : 11
# Error ID : 4F530E43505002E2 01
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2-beta-b03 mixed mode)
#
# An error report file has been saved as hs_err_pid1362.log.
# Please refer to the file for further information.
#
Abort
Exit Code: 134

dbx shows the following stacktrace:

core file header read successfully
detected a multithreaded program
t@1 (l@1) terminated by signal ABRT (Abort)
current thread: t@1
=>[1] __sigprocmask(0x0, 0xffbecc18, 0x0, 0xffffffff, 0xffffffff, 0x0), at 
0xff379d18
  [2] _resetsig(0xff38c9ac, 0x0, 0x0, 0x0, 0x2878c, 0x28790), at 0xff36f354
  [3] _sigon(0xff3942c0, 0xff3942a0, 0x28788, 0xffbeccec, 0x6, 0xff2cdf94), at 
0xff36eb10
  [4] _thrp_kill(0x0, 0x1, 0x6, 0xff38c9ac, 0x28710, 0xff393c1c), at 0xff3718e4
  [5] abort(0xff335ad4, 0xffbecde0, 0x0, 0xfffffff8, 0x0, 0xffbece01), at 
0xff2b95d0
  [6] os::abort(0x1, 0xfe79c245, 0xffbece80, 0x0, 0xfe7e0590, 0xfe71ad30), at 
0xfe71c568
  [7] os::handle_unexpected_exception(0x2d8f8, 0xb, 0xfe4a2060, 0xffbedc38, 
0xfe71e918, 0x0), at 0xfe71ada0
  [8] JVM_handle_solaris_signal(0xfe4a2060, 0xffbedc38, 0xffbed980, 0x3000, 
0x3244, 0x28778), at 0xfe71f164
  [9] __libthread_segvhdlr(0xb, 0xffbedc38, 0xffbed980, 0xff38c9ac, 0x0, 0x0), 
at 0xff3792d0
  [10] __sighndlr(0xb, 0xffbedc38, 0xffbed980, 0xff3791f0, 0x28798, 0x28778), at 
0xff37bd78
  [11] sigacthandler(0xb, 0x28710, 0xffbed980, 0xff38c9ac, 0xffbedc38, 0x28710), 
at 0xff378644
  ---- called from signal handler with signal 11 (SIGSEGV) ------
  [12] instanceKlass::find_method(0xf5d2fc00, 0xf5c03168, 0xf5c03670, 
0xf5d0092e, 0x2f, 0xffbee4c8), at 0xfe4a2060
  [13] instanceKlass::uncached_lookup_method(0xf5d2fd18, 0xf5c03168, 0xf5c03670, 
0x2dea4, 0x2cdb8, 0xf5c142f8), at 0xfe4a2000
  [14] LinkResolver::lookup_method_in_klasses(0xffbedfc8, 0xffbede9c, 
0xffbede98, 0xffbede94, 0x2d8f8, 0xfe49ee40), at 0xfe4c880c
  [15] LinkResolver::resolve_method(0xffbedfc8, 0xffbedf34, 0xffbedf30, 
0xffbedf2c, 0xffbedf28, 0x1), at 0xfe4c835c
  [16] LinkResolver::linktime_resolve_special_method(0xffbedfc8, 0xffbedfc4, 
0xffbedfc0, 0xffbedfbc, 0xffbedfb8, 0x1), at 0xfe4ccf98
  [17] LinkResolver::resolve_invoke(0xffbee2ec, 0xffbee2b4, 0xffbee2b0, 0x4, 
0xb7, 0x2d8f8), at 0xfe4c708c
  [18] InterpreterRuntime::resolve_invoke(0x2d8f8, 0xb7, 0x5, 0x14, 0xf5d2ffc8, 
0x0), at 0xfe4c6074
  [19] 0xfa0186bc(0x2d8f8, 0xb8, 0xf5d309d8, 0xfa018680, 0x0, 0xffbee448), at 
0xfa0186bb
  [20] 0xfa005cd4(0xffbee528, 0x0, 0x0, 0xfa018820, 0x313890, 0xffbee4c8), at 
0xfa005cd3
  [21] 0xfa000120(0xffbee5b0, 0xffbee788, 0xa, 0xf5d303b8, 0xfa00be60, 
0xffbee694), at 0xfa00011f
  [22] JavaCalls::call_helper(0xffbee780, 0xffbee65c, 0xffbee68c, 0x2d8f8, 
0x2d8f8, 0x4c00), at 0xfe4c54cc
  [23] jni_invoke_static(0x2d988, 0xffbee780, 0x0, 0x0, 0xc3e30, 0xffbee764), at 
0xfe4da280
  [24] jni_CallStaticVoidMethod(0x2d988, 0x2e3a8, 0xc3e30, 0x2e390, 0x2d988, 
0xff00), at 0xfe566cc0
  [25] main(0x5, 0x0, 0xc3e30, 0x2e390, 0x0, 0x280), at 0x1237c

The tests will be available in the next release v141r17.
======================================================================

Name: egR10015			Date: 10/21/2002


javag shows that the following assertion fires on all platforms
regardless of C1/C2:

# HotSpot Virtual Machine Error, assertion failure                              
# Please report this error at                                                   
# http://java.sun.com/cgi-bin/bugreport.cgi                                     
#                                                                               
# Java VM: Java HotSpot(TM) Server VM (1.4.2-beta-b03-debug mixed mode)         
#                                                                               
# assert(is_within_bounds(which), "index out of bounds")                        
#                                                                               
# Error ID: /export1/jdk/jdk1.4.2/hotspot/src/share/vm/oops/typeArrayOop.hpp, 54
 [ Patched ]                                                                    
#                                                                               
# Problematic Thread: prio=5 tid=0x0003e050 nid=0x1 runnable                    
#                                                                               
Dumping core....


Eugene Gorbachev <###@###.###>

======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: generic FIXED IN: tiger INTEGRATED IN: tiger VERIFIED IN: tiger-beta
14-06-2004

EVALUATION le*,JavaCallArguments*,Thread*),JavaValue*,methodHandle*,JavaCallArguments*,Thread*) (c77ece22, 8046e6c, 8046d74, 8046da4, 806a948) + 21 c77ecdde void JavaCalls::call(JavaValue*,methodHandle,JavaCallArguments*,Thread*) (8046e6c, 806aeb4, 8046da4, 806a948) + 4e c7927984 void jni_invoke_static(JNIEnv_*,JavaValue*,_jobject*,JNICallType,_jmethodID*,JNI_ArgumentPusher*,Thread*) (806a9e0, 8046e6c, 0, 0, 81022e0, 8046e78, 806a948) + 1ba c784e1aa jni_CallStaticVoidMethod (806a9e0, 806b3a0, 81022e0, 806b390) + 113 08051c5e main (0, 80667a4, 8047754) + b8f 0805102a ???????? () ----------------- lwp# 2 / thread# 2 -------------------- c7b432eb ___lwp_cond_wait (806a310, 806a2f8, c6e7fe68) + c c7b2faba _lwp_cond_timedwait (806a310, 806a2f8, c6e7fec8) + a9 c77ebdd1 int Monitor::wait(int,long) (806a2c8, 1, 3e8) + 48f c77ec1e5 void VMThread::loop() (80fa3a0) + 79 c77ebfd6 void VMThread::run() (80fa3a0) + 86 c77ebef2 _start (80fa3a0) + a0 c7b40465 _thr_setup (c6e20000) + 60 c7b406a0 _lwp_start () ----------------- lwp# 3 / thread# 3 -------------------- c7b432eb ___lwp_cond_wait (80fbc18, 80fbc00) + c c77fb5cc void os::Solaris::Event::down() (80fbc00) + 58 c77fb02d void ObjectMonitor::wait(long long,int,Thread*) (8100a30, 0, 0, 1, 80fb1d8) + 266 c77fab7d void ObjectSynchronizer::wait(Handle,long long,Thread*) (80fb758, 0, 0, 80fb1d8) + 5c c77fa96c JVM_MonitorWait () + 107 c300bd71 java/lang/Object.wait(J)V bci:000 c300305b java/lang/Object.wait()V bci:002 line:429 c300305b java/lang/ref/Reference$ReferenceHandler.run()V bci:046 line:115 c3000116 StubRoutines (1) c77ecfd7 void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*) (c6e0ff54, c6e0fe40, c6e0feac, 80fb1d8) + 1b5 c77ece11 void os::os_exception_wrapper(void(*)(JavaValue*,methodHandle*,JavaCallArguments*,Thread*),JavaValue*,methodHandle*,JavaCallArguments*,Thread*) (c77ece22, c6e0ff54, c6e0fe40, c6e0feac, 80fb1d8) + 21 c77ecdde void JavaCalls::call(JavaValue*,methodHandle,JavaCallArguments*,Thread*) (c6e0ff54, 80fb754, c6e0feac, 80fb1d8) + 4e c77fa7bd void JavaCalls::call_virtual(JavaValue*,KlassHandle,symbolHandle,symbolHandle,JavaCallArguments*,Thread*) (c6e0ff54, 80fb744, c7aa6f80, c7aa7014, c6e0feac, 80fb1d8) + 108 c77fa698 void JavaCalls::call_virtual(JavaValue*,Handle,KlassHandle,symbolHandle,symbolHandle,Thread*) (c6e0ff54, 80fb740, 80fb744, c7aa6f80, c7aa7014, 80fb1d8) + 98 c77fa5e1 void thread_entry(JavaThread*,Thread*) (80fb1d8, 80fb1d8) + eb c77fa48d void JavaThread::thread_main_inner() (80fb1d8) + 4d c77fa428 void JavaThread::run() (80fb1d8) + e0 c77ebef2 _start (80fb1d8) + a0 c7b40465 _thr_setup (c6e20400) + 60 c7b406a0 _lwp_start () ----------------- lwp# 4 / thread# 4 -------------------- c7b432eb ___lwp_cond_wait (80fc6a8, 80fc690) + c c77fb5cc void os::Solaris::Event::down() (80fc690) + 58 c77fb02d void ObjectMonitor::wait(long long,int,Thread*) (8100a64, 0, 0, 1, 80fbc38) + 266 c77fab7d void ObjectSynchronizer::wait(Handle,long long,Thread*) (80fc1b8, 0, 0, 80fbc38) + 5c c77fa96c JVM_MonitorWait () + 107 c300bd71 java/lang/Object.wait(J)V bci:000 c300305b java/lang/ref/ReferenceQueue.remove(J)Ljava/lang/ref/Reference; bci:044 line:111 c3002f84 java/lang/ref/ReferenceQueue.remove()Ljava/lang/ref/Reference; bci:002 line:127 c3002f84 java/lang/ref/Finalizer$FinalizerThread.run()V bci:003 line:159 c3000116 StubRoutines (1) c77ecfd7 void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*) (c510ff54, c510fe40, c510feac, 80fbc38) + 1b5 c77ece11 void os::os_exception_wrapper(void(*)(JavaValue*,methodHandle*,JavaCallArguments*,Thread*),JavaValue*,methodHandle*,JavaCallArguments*,Thread*) (c77ece22, c510ff54, c510fe40, c510feac, 80fbc38) + 21 c77ecdde void JavaCalls::call(JavaValue*,methodHandle,JavaCallArguments*,Thread*) (c510ff54, 80fc1b4, c510feac, 80fbc38) + 4e c77fa7bd void JavaCalls::call_virtual(JavaValue*,KlassHandle,symbolHandle,symbolHandle,JavaCallArguments*,Thread*) (c510ff54, 80fc1a4, c7aa6f80, c7aa7014, c510feac, 80fbc38) + 108 c77fa698 void JavaCalls::call_virtual(JavaValue*,Handle,KlassHandle,symbolHandle,symbolHandle,Thread*) (c510ff54, 80fc1a0, 80fc1a4, c7aa6f80, c7aa7014, 80fbc38) + 98 c77fa5e1 void thread_entry(JavaThread*,Thread*) (80fbc38, 80fbc38) + eb c77fa48d void JavaThread::thread_main_inner() (80fbc38) + 4d c77fa428 void JavaThread::run() (80fbc38) + e0 c77ebef2 _start (80fbc38) + a0 c7b40465 _thr_setup (c6e20800) + 60 c7b406a0 _lwp_start () ----------------- lwp# 5 / thread# 5 -------------------- c7b432eb ___lwp_cond_wait (80691a0, 8069188) + c c77ebdea int Monitor::wait(int,long) (8069158, 1, 0) + 4a8 c7810f31 void SuspendCheckerThread::run() (8107748) + 6b c77ebef2 _start (8107748) + a0 c7b40465 _thr_setup (c6e20c00) + 60 c7b406a0 _lwp_start () ----------------- lwp# 6 / thread# 6 -------------------- c7b40740 __lwp_park (c7a9c324) + 10 c7b3631e sema_wait (c7a9c324) + 1e c781137a int check_pending_signals(int) (1) + 101 c7811267 int os::signal_wait() () + 17 c7811069 void signal_thread_entry(JavaThread*,Thread*) (8105038, 8105038) + 86 c77fa48d void JavaThread::thread_main_inner() (8105038) + 4d c77fa428 void JavaThread::run() (8105038) + e0 c77ebef2 _start (8105038) + a0 c7b40465 _thr_setup (c6e21000) + 60 c7b406a0 _lwp_start () ----------------- lwp# 7 / thread# 7 -------------------- c7b432eb ___lwp_cond_wait (806a7b0, 806a798) + c c77ebbb7 int Monitor::wait(int,long) (806a768, 0, 0) + 275 c7811c4d CompileTask*CompileQueue::get() (8104310) + 39 c7811774 void CompileBroker::compiler_thread_loop() () + 294 c78114d5 void compiler_thread_entry(JavaThread*,Thread*) (8105c78, 8105c78) + 15 c77fa48d void JavaThread::thread_main_inner() (8105c78) + 4d c77fa428 void JavaThread::run() (8105c78) + e0 c77ebef2 _start (8105c78) + a0 c7b40465 _thr_setup (c6e21400) + 60 c7b406a0 _lwp_start () ----------------- lwp# 8 / thread# 8 -------------------- c7b41b19 _poll (0, c7b6385c, c7b6385c, c7b6385c, c2efff44) + c c7b3594d select (0, 0, 0, 0, c2efff44) + 75 c79cb0c1 int os_sleep(long long,int) (32, 0, 0) + 1bc c7810da1 int os::sleep(Thread*,long long,int) (8107648, 32, 0, 0) + 1cc c7810e39 void WatcherThread::run() (8107648) + 54 c77ebef2 _start (8107648) + a0 c7b40465 _thr_setup (c6e21800) + 60 c7b406a0 _lwp_start () ss45998@tomsk
11-06-2004

EVALUATION ###@###.### 2003-03-19 Paul Hohensee found this: Setting field access watches on a field in a superclass of the class passed into Set/ClearFieldAccess/ModificationWatch would either provoke an assert in the debug vm or stomp the heap in the product vm. All of these jvmdi methods set/clear a bit in the field access flags short in the instanceKlass fields descriptor typeArray. Assume class fieldacc003e { boolean extendsBoolean = false; } class fieldacc003a extends fieldacc003e {} If you tried to set a watchpoint on extendsBoolean in class fieldacc003a (the subclass), the above jvmdi methods would attempt to write the fields array from fieldacc003a, which has zero length, instead of the one from fieldacc003e. These jvmdi methods construct a fieldDescriptor for internal use. The fix is to add a typeArrayHandle to the fieldDescriptor containing the correct fields array address and use that instead of the one from the instanceKlass. See the Suggested Fix. ###@###.### 2003-10-08 Both tests are passed for 1.5 with both product and debug versions: nsk/jvmdi/events/fieldacc004 nsk/jvmdi/events/fieldacc003 It is because processing of fieldIDs has been changed in 1.5. In the 1.4.2 the 'jvmdi.cpp: field_watch_common()' calls 'jvmdi_info.cpp: JvmdiInternal::get_field_descriptor(k, field, &fd)'. It is incorrect if field does not belong to the class 'k', but belongs to super-class or interface. In the 1.5 new function 'jniId.cpp: jniIdSupport::to_field_descriptor(field, &fdesc)' is called. This new function works correctly for fields from super-class and interface. So, we have to de-commit this bug for Tiger 1.5 release. It is still possible to reproduce this bug for 1.4.2: ss45998@tomsk /net/tomsk.sfbay/export/home/ss45998/1.4.2/b28/i386/j2sdk1.4.2/bin/java_g -client -Xdebug -Xnoagent -Xrunfieldacc003 fieldacc003 # To suppress the following error report, specify this argument # after -XX: or in .hotspotrc: SuppressErrorAt=/typeArrayOop.hpp:54 # # HotSpot Virtual Machine Error, assertion failure # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.1-internal-debug mixed mode) # # assert(is_within_bounds(which), "index out of bounds") # # Error ID: /net/tomsk.sfbay/export/home/hs/src/share/vm/oops/typeArrayOop.hpp, 54 # # Problematic Thread: prio=5 tid=0x0807c688 nid=0x1 runnable # Heap at VM Abort: Heap def new generation total 576K, used 126K [0xba400000, 0xba4a0000, 0xba8e0000) eden space 512K, 24% used [0xba400000, 0xba41f850, 0xba480000) from space 64K, 0% used [0xba480000, 0xba480000, 0xba490000) to space 64K, 0% used [0xba490000, 0xba490000, 0xba4a0000) tenured generation total 1408K, used 0K [0xba8e0000, 0xbaa40000, 0xbe400000) the space 1408K, 0% used [0xba8e0000, 0xba8e0000, 0xba8e0200, 0xbaa40000) compacting perm gen total 4096K, used 987K [0xbe400000, 0xbe800000, 0xc2400000) the space 4096K, 24% used [0xbe400000, 0xbe4f6e58, 0xbe4f7000, 0xbe800000) Dumping core.... Abort (core dumped) ss45998@tomsk ls core fieldacc003.cfg fieldacc003.java fieldacc003a.class hs_err_pid668943.log linux/ sparcv9/ fieldacc003.README fieldacc003.class fieldacc003.out fieldacc003e.class hs_err_pid668976.log linuxia64/ winia64/ fieldacc003.c fieldacc003.err fieldacc003.tlog hotspot.log intel/ sparc/ wintel/ ss45998@tomsk ls -l core -rw------- 1 ss45998 staff 16435524 Oct 8 17:54 core The build of 1.4.2 used in test run has libjvm_db.so in it, so it's possible to run extended pstack utility: ss45998@tomsk /net/jano.sfbay/export/disk20/serviceability/bin/pstk core | c++filt core 'core' of 669073: /net/tomsk.sfbay/export/home/ss45998/1.4.2/b28/i386/j2sdk1.4.2/bin/java_g java agent = 807c0f8 ----------------- lwp# 1 / thread# 1 -------------------- c7b43275 _lwp_kill (1, 6) + c c7af17df raise (6) + 1f c7ad677d abort () + cd c7513c0d void os::abort(int) (1) + 8d c72dcbc1 void report_error(int,const char*,int,const char*,const char*,...) (1, c7782616, 36, c77167c3, c77167d5, c77825fe, c7782659) + 5d1 c72dc23d void report_assertion_failure(const char*,const char*,int,const char*) (c77825fe, c7782616, 36, c7782659) + 5d c7440492 unsigned short*typeArrayOopDesc::ushort_at_addr(int)const (be4f69f8, 0) + 52 c743ac6e void typeArrayOopDesc::ushort_at_put(int,unsigned short) (be4f69f8, 0, 4000) + 2e c7436fb4 int field_watch_common(_jclass*,_jfieldID*,int,int) (807d350, 2fa4aeb3, 14, 1) + 2b4 c74370bc SetFieldAccessWatch (807d350, 2fa4aeb3) + dc c6c10ca9 eventHook (807c734, 8046c78) + 299 c7425d68 void JvmdiInternal::post_event(JvmdiEvent&) (8046ce8) + 148 c7438049 void jvmdi::post_vm_initialized_event() () + 49 c75fa83d int Threads::create_vm(JavaVMInitArgs*) (8046e80) + c9d c73d0626 JNI_CreateJavaVM (8047704, 8047700, 8046e80) + b6 08052941 InitializeJVM (8047704, 8047700, 80476d8) + 111 08051451 main (0, 8066a64, 8047750) + 2e1 080510da ???????? () ----------------- lwp# 2 / thread# 2 -------------------- c7b432eb ___lwp_cond_wait (807b570, 807b558, c6c8fd98) + c c7b2faba _lwp_cond_timedwait (807b570, 807b558, c6c8fe00) + a9 c74d15e8 int os::Solaris::cond_timedwait(_lwp_cond*,_lwp_mutex*,timespec*) (807b570, 807b558, c6c8fe00) + 38 c74d1194 int os::Solaris::Event::timedwait(timespec*) (807b550, c6c8fe00) + 44 c74d0082 int os::Solaris::Event::timedwait(long long) (807b550, 3e8, 0) + 42 c74cf9bc int Monitor::wait(int,long) (807b4e8, 1, 3e8) + 21c c765e1f8 void VMThread::loop() (8124e28) + 1b8 c765ddcf void VMThread::run() (8124e28) + ff c7512554 _start (8124e28) + 154 c7b40465 _thr_setup (c6c30000) + 60 c7b406a0 _lwp_start () ----------------- lwp# 3 / thread# 3 -------------------- c7b432eb ___lwp_cond_wait (81279b0, 8127998) + c c74f9ac4 int os::Solaris::cond_wait(_lwp_cond*,_lwp_mutex*) (81279b0, 8127998) + 34 c74f8ea0 int os::Solaris::Event::wait() (8127990) + 40 c74f810e void os::Solaris::Event::down() (8127990) + 5e c74f6835 void ObjectMonitor::wait(long long,int,Thread*) (8129264, 0, 0, 1, 8126c18) + 295 c75c58f3 void ObjectSynchronizer::wait(Handle,long long,Thread*) (81272a8, 0, 0, 8126c18) + 93 c73f91bc JVM_MonitorWait () + 1cc c280df53 java/lang/Object.wait(J)V bci:000 c280327b java/lang/Object.wait()V bci:002 line:429 c280327b java/lang/ref/Reference$ReferenceHandler.run()V bci:046 line:115 c28001c3 StubRoutines (1) c739c6b0 void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*) (c67eff24, c67efe10, c67efe80, 8126c18) + 3d0 c7516fb6 void os::os_exception_wrapper(void(*)(JavaValue*,methodHandle*,JavaCallArguments*,Thread*),JavaValue*,methodHandle*,JavaCallArguments*,Thread*) (c739c2e0, c67eff24, c67efe10, c67efe80, 8126c18) + 36 c739c29f void JavaCalls::call(JavaValue*,methodHandle,JavaCallArguments*,Thread*) (c67eff24, 81272a0, c67efe80, 8126c18) + bf c739bb46 void JavaCalls::call_virtual(JavaValue*,KlassHandle,symbolHandle,symbolHandle,JavaCallArguments*,Thread*) (c67eff24, 8127290, c7931394, c7931428, c67efe80, 8126c18) + 136 c739bbba void JavaCalls::call_virtual(JavaValue*,Handle,KlassHandle,symbolHandle,symbolHandle,Thread*) (c67eff24, 812728c, 8127290, c7931394, c7931428, 8126c18) + 4a c7404e4c void thread_entry(JavaThread*,Thread*) (8126c18, 8126c18) + ac c75f574d void JavaThread::thread_main_inner() (8126c18) + dd c75f565d void JavaThread::run() (8126c18) + 11d c7512554 _start (8126c18) + 154 c7b40465 _thr_setup (c6c30400) + 60 c7b406a0 _lwp_start () ----------------- lwp# 4 / thread# 4 -------------------- c7b432eb ___lwp_cond_wait (81288b0, 8128898) + c c74f9ac4 int os::Solaris::cond_wait(_lwp_cond*,_lwp_mutex*) (81288b0, 8128898) + 34 c74f8ea0 int os::Solaris::Event::wait() (8128890) + 40 c74f810e void os::Solaris::Event::down() (8128890) + 5e c74f6835 void ObjectMonitor::wait(long long,int,Thread*) (81292a4, 0, 0, 1, 8127b18) + 295 c75c58f3 void ObjectSynchronizer::wait(Handle,long long,Thread*) (81281a8, 0, 0, 8127b18) + 93 c73f91bc JVM_MonitorWait () + 1cc c280df53 java/lang/Object.wait(J)V bci:000 c280327b java/lang/ref/ReferenceQueue.remove(J)Ljava/lang/ref/Reference; bci:044 line:111 c28031a4 java/lang/ref/ReferenceQueue.remove()Ljava/lang/ref/Reference; bci:002 line:127 c28031a4 java/lang/ref/Finalizer$FinalizerThread.run()V bci:003 line:159 c28001c3 StubRoutines (1) c739c6b0 void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*) (c679ff24, c679fe10, c679fe80, 8127b18) + 3d0 c7516fb6 void os::os_exception_wrapper(void(*)(JavaValue*,methodHandle*,JavaCallArguments*,Thread*),JavaValue*,methodHandle*,JavaCallArguments*,Thread*) (c739c2e0, c679ff24, c679fe10, c679fe80, 8127b18) + 36 c739c29f void JavaCalls::call(JavaValue*,methodHandle,JavaCallArguments*,Thread*) (c679ff24, 81281a0, c679fe80, 8127b18) + bf c739bb46 void JavaCalls::call_virtual(JavaValue*,KlassHandle,symbolHandle,symbolHandle,JavaCallArguments*,Thread*) (c679ff24, 8128190, c7931394, c7931428, c679fe80, 8127b18) + 136 c739bbba void JavaCalls::call_virtual(JavaValue*,Handle,KlassHandle,symbolHandle,symbolHandle,Thread*) (c679ff24, 812818c, 8128190, c7931394, c7931428, 8127b18) + 4a c7404e4c void thread_entry(JavaThread*,Thread*) (8127b18, 8127b18) + ac c75f574d void JavaThread::thread_main_inner() (8127b18) + dd c75f565d void JavaThread::run() (8127b18) + 11d c7512554 _start (8127b18) + 154 c7b40465 _thr_setup (c6c30800) + 60 c7b406a0 _lwp_start () ss45998@tomsk For product version of JVM the printed callstacks look different as for debug version but exactly as described in the bug description: ss45998@tomsk /net/tomsk.sfbay/export/home/ss45998/1.4.2/b28/i386/j2sdk1.4.2/bin/java -client -Xdebug -Xnoagent -Xrunfieldacc003 fieldacc003 Unexpected Signal : 11 occurred at PC=0xC77D7BBA Function=[Unknown. Nearest: JVM_Close+0x31B3A] Library=/net/tomsk.sfbay/export/home/ss45998/1.4.2/b28/i386/j2sdk1.4.2/jre/lib/i386/client/libjvm.so Current Java thread: at fieldacc003.run(fieldacc003.java:30) at fieldacc003.main(fieldacc003.java:26) Dynamic libraries: 0x8050000 /net/tomsk.sfbay/export/home/ss45998/1.4.2/b28/i386/j2sdk1.4.2/bin/java 0xc7b90000 /lib/libthread.so.1 0xc7bb0000 /lib/libdl.so.1 0xc7ab0000 /lib/libc.so.1 0xc7770000 /net/tomsk.sfbay/export/home/ss45998/1.4.2/b28/i386/j2sdk1.4.2/jre/lib/i386/client/libjvm.so 0xc7740000 /usr/lib/libCrun.so.1 0xc7710000 /lib/libsocket.so.1 0xc7670000 /lib/libnsl.so.1 0xc7650000 /usr/lib/libm.so.1 0xc7630000 /usr/lib/libsched.so.1 0xc7b70000 /lib/libw.so.1 0xc75f0000 /lib/libmp.so.2 0xc7590000 /net/tomsk.sfbay/export/home/ss45998/1.4.2/b28/i386/j2sdk1.4.2/jre/lib/i386/native_threads/libhpi.so 0xc7540000 /net/tomsk.sfbay/export/home/ss45998/1.4.2/b28/i386/j2sdk1.4.2/jre/lib/i386/libverify.so 0xc7500000 /net/tomsk.sfbay/export/home/ss45998/1.4.2/b28/i386/j2sdk1.4.2/jre/lib/i386/libjava.so 0xc74d0000 /net/tomsk.sfbay/export/home/ss45998/1.4.2/b28/i386/j2sdk1.4.2/jre/lib/i386/libzip.so 0xc6db0000 /net/vmsqe.sfbay/export/backup/testbase/testbase_j2se_vm.v15r22_b20030905/vm/src/nsk/jvmdi/events/fieldacc003/intel/libfieldacc003.so Heap at VM Abort: Heap def new generation total 576K, used 139K [0xbac00000, 0xbaca0000, 0xbb0e0000) eden space 512K, 27% used [0xbac00000, 0xbac22f88, 0xbac80000) from space 64K, 0% used [0xbac80000, 0xbac80000, 0xbac90000) to space 64K, 0% used [0xbac90000, 0xbac90000, 0xbaca0000) tenured generation total 1408K, used 0K [0xbb0e0000, 0xbb240000, 0xbec00000) the space 1408K, 0% used [0xbb0e0000, 0xbb0e0000, 0xbb0e0200, 0xbb240000) compacting perm gen total 4096K, used 979K [0xbec00000, 0xbf000000, 0xc2c00000) the space 4096K, 23% used [0xbec00000, 0xbecf4c98, 0xbecf4e00, 0xbf000000) Local Time = Wed Oct 8 18:13:41 2003 Elapsed Time = 0 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.1-internal mixed mode) # # An error report file has been saved as hs_err_pid669119.log. # Please refer to the file for further information. # Abort (core dumped) ss45998@tomsk /net/jano.sfbay/export/disk20/serviceability/bin/pstk core | c++filt core 'core' of 669119: /net/tomsk.sfbay/export/home/ss45998/1.4.2/b28/i386/j2sdk1.4.2/bin/java java agent = 807d320 ----------------- lwp# 1 / thread# 1 -------------------- c7b43275 _lwp_kill (1, 6) + c c7af17df raise (6) + 1f c7ad677d abort () + cd c79ca670 void os::abort(int) (1) + 70 c79c9263 void os::handle_unexpected_exception(Thread*,int,unsigned char*,void*) (806a948, b, c77d7bba, 80467d4) + 182 c79ccfcb JVM_handle_solaris_signal (b, 80467d4, 80465d4, 1) + 4cb c79cbda0 signalHandler (b, 80467d4, 80465d4) + 20 c7b4083f __sighndlr (b, 80467d4, 80465d4, c79cbd80) + f c7b368dc call_user_handler (b, 80467d4, 80465d4) + 248 c7b36b51 sigacthandler (b, 80467d4, 80465d4) + 5a c77d7bba methodOopDesc*instanceKlass::find_method(objArrayOopDesc*,symbolOopDesc*,symbolOopDesc*) (beceff60, bec03120, bec03628) + 5a c77d7b52 methodOopDesc*instanceKlass::find_method(symbolOopDesc*,symbolOopDesc*)const (becf00f0, bec03120, bec03628) + 22 c77d7b0e methodOopDesc*instanceKlass::uncached_lookup_method(symbolOopDesc*,symbolOopDesc*)const (becf00f0, bec03120, bec03628) + 34 c77ef7ce void LinkResolver::lookup_method_in_klasses(methodHandle&,KlassHandle,symbolHandle,symbolHandle,Thread*) (80469b8, 806aec8, 806aecc, 806aed0, 806a948) + 3e c77ef430 void LinkResolver::resolve_method(methodHandle&,KlassHandle,symbolHandle,symbolHandle,KlassHandle,int,Thread*) (80469b8, 806aec8, 806aecc, 806aed0, 806aed4, 1, 806a948) + 5b c77f2867 void LinkResolver::linktime_resolve_special_method(methodHandle&,KlassHandle,symbolHandle,symbolHandle,KlassHandle,int,Thread*) (80469b8, 806aec8, 806aecc, 806aed0, 806aed4, 1, 806a948) + 57 c77f27bb void LinkResolver::resolve_special_call(CallInfo&,KlassHandle,symbolHandle,symbolHandle,KlassHandle,int,Thread*) (8046aac, 806aec8, 806aecc, 806aed0, 806aed4, 1, 806a948) + 5a c77f273e void LinkResolver::resolve_invokespecial(CallInfo&,constantPoolHandle,int,Thread*) (8046aac, 806aec0, 400, 806a948) + 8e c77ee576 void LinkResolver::resolve_invoke(CallInfo&,Handle,constantPoolHandle,int,Bytecodes::Code,Thread*) (8046aac, 0, 806aec0, 400, b7, 806a948) + d6 c77eda22 void InterpreterRuntime::resolve_invoke(JavaThread*,Bytecodes::Code) () + 4f1 c3013885 fieldacc003.run([Ljava/lang/String;Ljava/io/PrintStream;)I bci:004 line:30 c3002faf fieldacc003.main([Ljava/lang/String;)V bci:004 line:26 c3000116 StubRoutines (1) c77ecfd7 void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*) (8046e6c, 8046d74, 8046da4, 806a948) + 1b5 c77ece11 void os::os_exception_wrapper(void(*)(JavaValue*,methodHand
11-06-2004

SUGGESTED FIX ###@###.### 2003-03-19 Following are diffs developed by Paul Hohensee to: src/share/vm/prims/jvmdi.cpp, src/share/vm/runtime/fieldDesciptor.hpp src/share/vm/runtime/fieldDesciptor.cpp --- jvmdi.cpp Wed Mar 19 10:07:45 2003 *** 1,7 **** #ifdef USE_PRAGMA_IDENT_SRC ! #pragma ident "@(#)jvmdi.cpp 1.140 03/01/23 12:20:03 JVM" #endif /* * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ --- 1,7 ---- #ifdef USE_PRAGMA_IDENT_SRC ! #pragma ident "@(#)jvmdi.cpp 1.141 03/03/19 10:07:44 JVM" #endif /* * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ *** 3616,3629 **** default: assert(false, "invalid watch_type"); return JVMDI_ERROR_INTERNAL; } ! // update the access_flags for the field in the klass ! instanceKlass* ik = instanceKlass::cast(k); ! typeArrayOop fields = ik->fields(); ! fields->ushort_at_put(fd.index(), (jushort)fd.access_flags().as_short()); return (JVMDI_ERROR_NONE); } --- 3616,3630 ---- default: assert(false, "invalid watch_type"); return JVMDI_ERROR_INTERNAL; } ! // update the access_flags for the field in the klass. ! // ! // k may be a subclass of the field's class, so we get the ! // fields array address from the fd rather than from k. ! fd.fields()->ushort_at_put(fd.index(), (jushort)fd.access_flags().as_short()); return (JVMDI_ERROR_NONE); } ================================================== --- fieldDescriptor.hpp Wed Mar 19 10:09:21 2003 *** 1,7 **** #ifdef USE_PRAGMA_IDENT_HDR ! #pragma ident "@(#)fieldDescriptor.hpp 1.36 03/01/23 12:22:05 JVM" #endif /* * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ --- 1,7 ---- #ifdef USE_PRAGMA_IDENT_HDR ! #pragma ident "@(#)fieldDescriptor.hpp 1.37 03/03/19 10:09:20 JVM" #endif /* * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ *** 16,31 **** --- 16,33 ---- int _name_index; int _signature_index; int _initial_value_index; int _offset; int _index; // index into fields() array + typeArrayHandle _fields;// fields() array handle constantPoolHandle _cp; public: symbolOop name() const { return _cp->symbol_at(_name_index); } symbolOop signature() const { return _cp->symbol_at(_signature_index); } klassOop field_holder() const { return _cp->pool_holder(); } + typeArrayOop fields() const { return _fields(); } constantPoolOop constants() const { return _cp(); } AccessFlags access_flags() const { return _access_flags; } oop loader() const; // Offset (in words) of field from start of instanceOop / klassOop int offset() const { return _offset; } ============================================================== --- fieldDescriptor.cpp Wed Mar 19 10:09:21 2003 *** 1,7 **** #ifdef USE_PRAGMA_IDENT_SRC ! #pragma ident "@(#)fieldDescriptor.cpp 1.46 03/01/23 12:22:03 JVM" #endif /* * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ --- 1,7 ---- #ifdef USE_PRAGMA_IDENT_SRC ! #pragma ident "@(#)fieldDescriptor.cpp 1.47 03/03/19 10:09:21 JVM" #endif /* * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ *** 40,49 **** --- 40,50 ---- void fieldDescriptor::initialize(klassOop k, int index) { instanceKlass* ik = instanceKlass::cast(k); _cp = ik->constants(); typeArrayOop fields = ik->fields(); + _fields = fields; assert(fields->length() % instanceKlass::next_offset == 0, "Illegal size of field array"); assert(fields->length() >= index + instanceKlass::next_offset, "Illegal size of field array"); _access_flags.set_field_flags(fields->ushort_at(index + instanceKlass::access_flags_offset));
11-06-2004