a70000, 0x67a79880, 0x67a79a00,
0x68270000)
ro space 8192K, 67% used [0x6ba70000, 0x6bfdd3d0, 0x6bfdd400,
0x6c270000)
rw space 12288K, 46% used [0x6c270000, 0x6c7fd0f0, 0x6c7fd200,
0x6ce70000)
Dynamic libraries:
0x00400000 - 0x0040b000 c:\j2sdk1.5\jre\bin\java.exe
0x77f50000 - 0x77ff7000 C:\WINDOWS\System32\ntdll.dll
0x77e60000 - 0x77f46000 C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e5d000 C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll
0x77c10000 - 0x77c63000 C:\WINDOWS\system32\MSVCRT.dll
0x6d630000 - 0x6d7d7000 c:\j2sdk1.5\jre\bin\client\jvm.dll
0x77d40000 - 0x77dcc000 C:\WINDOWS\system32\USER32.dll
0x77c70000 - 0x77cb0000 C:\WINDOWS\system32\GDI32.dll
0x76b40000 - 0x76b6c000 C:\WINDOWS\System32\WINMM.dll
0x6d270000 - 0x6d277000 c:\j2sdk1.5\jre\bin\hpi.dll
0x76bf0000 - 0x76bfb000 C:\WINDOWS\System32\PSAPI.DLL
0x6d600000 - 0x6d60b000 c:\j2sdk1.5\jre\bin\verify.dll
0x6d2e0000 - 0x6d2fc000 c:\j2sdk1.5\jre\bin\java.dll
0x6d620000 - 0x6d62e000 c:\j2sdk1.5\jre\bin\zip.dll
VM Arguments:
java_command: test15.t4
Environment Variables:
CLASSPATH=C:\Program Files\Altova\xmlspy\XMLSpyInterface.jar
PATH=C:\Program Files\Intel\EDB70;C:\Program
Files\Intel\Compiler70\IA32\Bin;C:\Program Files\Common
Files\Intel\Shared
Files\Ia32\Bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C
:\Oracle\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program
Files\Oracle\jre\1.1.8\bin;C:\PROGRA~1\ULTRAE~1;C:\Home\System\bin;C:\Ho
me\System\lib;C:\Program Files\Microsoft Office\Office10;C:\Program
Files\Support Tools\ USERNAME=tk OS=Windows_NT PROCESSOR_IDENTIFIER=x86
Family 15 Model 2 Stepping 7, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 1
CPU:total 1(active 1) family 15, cmov, cx8, fxsr, mmx, sse, sse2
Memory: 4k page, physical 1047532k(521820k free), swap 2521024k(2063392k
free)
vm_info: Java HotSpot(TM) Client VM (1.5.0-beta-b32) for windows-x86,
built on Dec 19 2003 01:46:29 by "java_re" with MS VC++ 6.0
Steps to Reproduce (be specific):
Compile and execute the above-cited sample.
The annotations unit test (/net/koori.sfbay/onestop/jdk/1.5.0/promoted/beta/b32/ws/j2se/test/java/lang/annotations/UnitTest.java) causes the client VM on Windows XP Professional to fail with the following error:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d73679e, pid=2288, tid=2440
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b32 mixed mode)
# Problematic frame:
# V [jvm.dll+0x10679e]
#
# An error report file with more information is saved as hs_err_pid2288.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
###@###.### 2004-01-20
Same problem reported by another CAP member:
VM crash with the following code:
import java.lang.annotation.*;
import static java.lang.annotation.RetentionPolicy.*;
import static java.lang.annotation.ElementType.*;
@Mapping("Person")
public class TestMeta {
public static void main(String[] args){
String s =
TestMeta.class.getAnnotation(Mapping.class).value();
System.out.println(s);
}
}
@Retention(RUNTIME) @Target(TYPE)
@interface Mapping {
String value();
}
Java TestMeta and got:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d73679e, pid=2128,
tid=2432
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b32 mixed mode)
# Problematic frame:
# V [jvm.dll+0x10679e]
#
# An error report file with more information is saved as hs_err_pid2128.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
It doesn't happen when run the code with -server switch.
###@###.### 2004-01-21
Same problem reported by another CAP member but on Linux RedHat 7.3 machine.
Execute Annotation test program and will cause the segfault.
Attached error report hs_err_pid6191.log.
Test program: Annotation.java
public class Annotation {
public static void main(String[] args) {
Annotation.class.getAnnotations();
}
}
hs_err_pid6191.log:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0x4030cf7a, pid=6191, tid=1024
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b32 mixed mode)
# Problematic frame:
# V [libjvm.so+0x2cff7a]
#
--------------- T H R E A D ---------------
Current thread (0x0805acd0): JavaThread "main" [_thread_in_vm, id=6191]
siginfo:si_signo=11, si_errno=0, si_code=2, si_addr=0x525724bb
Registers:
EAX=0x08050000, EBX=0x403c8ce4, ECX=0x4030cf5e, EDX=0x0805bb48
ESP=0xbfffd1ec, EBP=0xbfffd2b4, ESI=0x0000004d, EDI=0x525724ba
EIP=0x4030cf7a, CR2=0x525724bb, EFLAGS=0x00010206
Top of Stack: (sp=0xbfffd1ec)
0xbfffd1ec: 00000002 00000003 0000000a 525724b8
0xbfffd1fc: 00000000 00000000 0805c0dc 403c8ce4
0xbfffd20c: 403b6e48 bfffd2f8 bfffd234 4016ffb8
0xbfffd21c: 0806f418 00000044 4212e3b0 4212dfa0
0xbfffd22c: bfffd24c 4207a058 bfffd264 40153038
0xbfffd23c: 0806d4e8 00000044 52d50d90 52d50d90
0xbfffd24c: 0805c0cc 00000044 0805c0cc 403c8ce4
0xbfffd25c: 0805acd0 bfffd2f8 bfffd284 402dde4b
Instructions: (pc=0x4030cf7a)
0x4030cf6a: 8b 55 10 81 e6 ff ff 00 00 8b 42 04 66 8b 04 b0
0x4030cf7a: 66 89 47 01 e9 70 fe ff ff c7 85 48 ff ff ff 01
Stack: [0xbfe00000,0xc0000000), sp=0xbfffd1ec, free space=2036k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x2cff7a]
V [libjvm.so+0x2d01a7]
V [libjvm.so+0x143a4b]
V [libjvm.so+0x1437fe]
V [libjvm.so+0x1433ab]
V [libjvm.so+0x143aa2]
V [libjvm.so+0x142d17]
V [libjvm.so+0x1696d5]
V [libjvm.so+0x1bdd03]
j java.lang.Class.getConstantPool()Lsun/reflect/ConstantPool;+0
j java.lang.Class.initAnnotationsIfNecessary()V+14
j java.lang.Class.getAnnotations()[Ljava/lang/annotation/Annotation;+1
j Annotation.main([Ljava/lang/String;)V+3
v ~StubRoutines::call_stub
V [libjvm.so+0x163d7c]
V [libjvm.so+0x2a8d18]
V [libjvm.so+0x163baf]
V [libjvm.so+0x185492]
V [libjvm.so+0x17a618]
C [java+0x17d6]
C [java+0x17499] __libc_start_main+0x95
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j java.lang.Class.getConstantPool()Lsun/reflect/ConstantPool;+0
j java.lang.Class.initAnnotationsIfNecessary()V+14
j java.lang.Class.getAnnotations()[Ljava/lang/annotation/Annotation;+1
j Annotation.main([Ljava/lang/String;)V+3
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x080a7318 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=6198]
0x080a5fa0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=6197]
0x080a5088 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=6196]
0x080a0a50 JavaThread "Finalizer" daemon [_thread_blocked, id=6195]
0x0809ec30 JavaThread "Reference Handler" daemon [_thread_blocked, id=6194]
=>0x0805acd0 JavaThread "main" [_thread_in_vm, id=6191]
Other Threads:
0x08098358 VMThread [id=6193]
0x080a8600 WatcherThread [id=6199]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 576K, used 149K [0x4a550000, 0x4a5f0000, 0x4aa30000)
eden space 512K, 29% used [0x4a550000, 0x4a575480, 0x4a5d0000)
from space 64K, 0% used [0x4a5d0000, 0x4a5d0000, 0x4a5e0000)
to space 64K, 0% used [0x4a5e0000, 0x4a5e0000, 0x4a5f0000)
tenured generation total 1408K, used 0K [0x4aa30000, 0x4ab90000, 0x4e550000)
the space 1408K, 0% used [0x4aa30000, 0x4aa30000, 0x4aa30200, 0x4ab90000)
compacting perm gen total 8192K, used 54K [0x4e550000, 0x4ed50000, 0x52550000)
the space 8192K, 0% used [0x4e550000, 0x4e55d908, 0x4e55da00, 0x4ed50000)
ro space 8192K, 68% used [0x52550000, 0x52ac0cf8, 0x52ac0e00, 0x52d50000)
rw space 12288K, 45% used [0x52d50000, 0x532ca718, 0x532ca800, 0x53950000)
Dynamic libraries:
08048000-08056000 r-xp 00000000 08:03 181476 /opt/j2sdk1.5.0-b32/bin/java
08056000-08058000 rw-p 0000d000 08:03 181476 /opt/j2sdk1.5.0-b32/bin/java
08058000-080cd000 rwxp 00000000 00:00 0
40000000-40013000 r-xp 00000000 08:02 426061 /lib/ld-2.2.5.so
40013000-40014000 rw-p 00013000 08:02 426061 /lib/ld-2.2.5.so
40014000-40015000 r--p 00000000 00:00 0
40015000-4001c000 r-xp 00000000 08:03 214227 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/native_threads/libhpi.so
4001c000-4001d000 rw-p 00006000 08:03 214227 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/native_threads/libhpi.so
4001d000-40021000 rw-s 00000000 08:02 378595 /tmp/hsperfdata_root/6191
40021000-40024000 r--s 00000000 08:03 82842 /opt/j2sdk1.5.0-b32/jre/lib/ext <wrap> /dnsns.jar
40025000-40032000 r-xp 00000000 08:02 426059 /lib/i686/libpthread-0.9.so
40032000-40039000 rw-p 0000d000 08:02 426059 /lib/i686/libpthread-0.9.so
40039000-4003a000 rw-p 00000000 00:00 0
4003a000-4003c000 r-xp 00000000 08:02 426074 /lib/libdl-2.2.5.so
4003c000-4003d000 rw-p 00001000 08:02 426074 /lib/libdl-2.2.5.so
4003d000-403ae000 r-xp 00000000 08:03 246990 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/client/libjvm.so
403ae000-403cc000 rw-p 00370000 08:03 246990 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/client/libjvm.so
403cc000-407e0000 rw-p 00000000 00:00 0
407e0000-40801000 r-xp 00000000 08:02 426057 /lib/i686/libm-2.2.5.so
40801000-40802000 rw-p 00020000 08:02 426057 /lib/i686/libm-2.2.5.so
40802000-4080d000 r-xp 00000000 08:03 214235 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/libverify.so
4080d000-4080e000 rw-p 0000b000 08:03 214235 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/libverify.so
4080e000-40813000 rwxp 00000000 00:00 0
40813000-40825000 r-xp 00000000 08:02 426078 /lib/libnsl-2.2.5.so
40825000-40826000 rw-p 00012000 08:02 426078 /lib/libnsl-2.2.5.so
40826000-40828000 rw-p 00000000 00:00 0
40828000-40831000 r-xp 00000000 08:02 426094 /lib/libnss_files-2.2.5.so
40831000-40832000 rw-p 00009000 08:02 426094 /lib/libnss_files-2.2.5.so
40832000-40852000 r-xp 00000000 08:03 214257 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/libjava.so
40852000-40854000 rw-p 0001f000 08:03 214257 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/libjava.so
:
:
VM Arguments:
java_command: Annotation
Environment Variables:
JAVA_HOME=/opt/jdk
CLASSPATH=/opt/projects/projects/stroem/lib/j2ee-1.3.1.jar
PATH=/opt/jdk/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/ <wrap> usr/X11R6/bin:/root/bin
USERNAME=root
LD_LIBRARY_PATH=/opt/j2sdk1.5.0-b32/jre/lib/i386/client:/opt/j2sdk1.5.0-b32/jre/ <wrap> lib/i386:/opt/j2sdk1.5.0-b32/jre/../lib/i386
SHELL=/bin/bash
--------------- S Y S T E M ---------------
OS:Red Hat Linux release 7.3 (Valhalla)
uname:Linux 2.4.23 #4 SMP Tue Jan 6 20:50:06 CET 2004 i686
libc:glibc 2.2.5 stable linuxthreads (floating stack)
rlimit: STACK infinity, CORE 0k, NPROC 4095, NOFILE 1024, AS infinity
load average:0.00 0.00 0.00
CPU:total 2(active 2) family 6, cmov, cx8, fxsr, mmx, sse
Memory: 4k page, physical 514908k(17072k free), swap 658584k(658584k free)
vm_info: Java HotSpot(TM) Client VM (1.5.0-beta-b32) for linux-x86, built on Dec <wrap> 19 2003 02:38:07 by java_re with gcc 3.2.1-7 20020903 (release)
###@###.### 2004-01-22
One more CAP member report the same problem:
J2SE Version (please include all output from java -version flag):
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32, mixed mode)
Does this problem occur on J2SE 1.4 or 1.4.1 or 1.4.2? Yes / No (pick
one)
No
Operating System Configuration Information (be specific):
Windows XP Professional, Version 2002, SP1 (with newes online-updates).
Hardware Configuration Information (be specific):
Sony Vaio Notebook with Pentium 4-M 2 GHz, 2GB RAM, 30 GB HDD.
Bug Description:
A problem occurs when reading annotations via reflection, e.g.
package test15;
import java.lang.reflect.*;
@interface special {}
public class t4 {
public int a = 3;
public @special int b = 5;
public static void main(String[] args) {
new t4().show();
}
public void show() {
System.out.println("a=" + a);
System.out.println("b=" + b);
Field[] f = getClass().getFields();
for (int i = 0; i < f.length; i++) {
Field x = f[i];
System.out.println(x.getName() + " is " +
(f[i].getAnnotation(special.class) !=
null ? "" : "not ") +
"special.");
}
}
}
... produces the output ...
a=3
b=5
#
# An unexpected error has been detected by HotSpot Virtual Machine: # #
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d73679e, pid=3180,
tid=1792 # # Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b32 mixed
mode) # Problematic frame: # V [jvm.dll+0x10679e] # # An error report
file with more information is saved as hs_err_pid3180.log # # If you
would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
... and the log ...
#
# An unexpected error has been detected by HotSpot Virtual Machine: # #
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d73679e, pid=3180,
tid=1792 # # Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b32 mixed
mode) # Problematic frame: # V [jvm.dll+0x10679e] #
--------------- T H R E A D ---------------
Current thread (0x00036af8): JavaThread "main" [_thread_in_vm, id=1792]
siginfo: ExceptionCode=0xc0000005, writing address 0x6ba924d3
Registers:
EAX=0x00000000, EBX=0x000370dc, ECX=0x000366c8, EDX=0x000370e0
ESP=0x0007f748, EBP=0x0007f7e4, ESI=0x6ba924d2, EDI=0x000000b4
EIP=0x6d73679e, EFLAGS=0x00010293
Top of Stack: (sp=0x0007f748)
0x0007f748: 00036af8 6c28a068 0000001b 6d72a031
0x0007f758: 6c270d90 00036af8 00036af8 00036330
0x0007f768: 000000a0 00000000 67a79770 00000000
0x0007f778: 0007f7b8 6d69a436 00000044 6d6855b0
0x0007f788: 67a79770 6d68559a 67a79770 00000044
0x0007f798: 00000044 6d68e205 000370cc 67a79770
0x0007f7a8: 00000044 00036af8 00036af8 00036840
0x0007f7b8: 6d68e925 0000005c 00036840 67a79770
Instructions: (pc=0x6d73679e)
0x6d73678e: e8 86 c4 8b 4d 10 0f b7 c0 8b 49 04 66 8b 04 81
0x6d73679e: 66 89 46 01 eb 22 8b ce e8 da 83 f1 ff 33 c9 83
Stack: [0x00040000,0x00080000), sp=0x0007f748, free space=253k Native
frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x10679e] V [jvm.dll+0x1069a3] V [jvm.dll+0x70beb] V
[jvm.dll+0x70ad1] V [jvm.dll+0x708ae] V [jvm.dll+0x70587] V
[jvm.dll+0x80505] V [jvm.dll+0x95798] j
java.lang.Class.getConstantPool()Lsun/reflect/ConstantPool;+0
j
java.lang.System+2.getConstantPool(Ljava/lang/Class;)Lsun/reflect/Consta
ntPool;+1
j java.lang.reflect.Field.declaredAnnotations()Ljava/util/Map;+19
j
java.lang.reflect.Field.getAnnotation(Ljava/lang/Class;)Ljava/lang/annot
ation/Annotation;+1
j test15.t4.show()V+104
j test15.t4.main([Ljava/lang/String;)V+7
v ~StubRoutines::call_stub
V [jvm.dll+0x7dff9]
V [jvm.dll+0xf4b9a]
V [jvm.dll+0x7deca]
V [jvm.dll+0x84df5]
C [java.exe+0x14b0]
C [java.exe+0x6282]
C [kernel32.dll+0x214c7]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j
java.lang.Class.getConstantPool()Lsun/reflect/ConstantPool;+0
j
java.lang.System+2.getConstantPool(Ljava/lang/Class;)Lsun/reflect/Consta
ntPool;+1
j java.lang.reflect.Field.declaredAnnotations()Ljava/util/Map;+19
j
java.lang.reflect.Field.getAnnotation(Ljava/lang/Class;)Ljava/lang/annot
ation/Annotation;+1
j test15.t4.show()V+104
j test15.t4.main([Ljava/lang/String;)V+7
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x008dd840 JavaThread "Low Memory Detector" daemon [_thread_blocked,
id=3140]
0x008dc470 JavaThread "CompilerThread0" daemon [_thread_blocked,
id=3152]
0x008db830 JavaThread "Signal Dispatcher" daemon [_thread_blocked,
id=2984]
0x008d8708 JavaThread "Finalizer" daemon [_thread_blocked, id=2792]
0x008d7b10 JavaThread "Reference Handler" daemon [_thread_blocked,
id=3168] =>0x00036af8 JavaThread "main" [_thread_in_vm, id=1792]
Other Threads:
0x008d4ab8 VMThread [id=3088]
0x008de940 WatcherThread [id=3036]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 576K, used 368K [0x63a70000, 0x63b10000,
0x63f50000)
eden space 512K, 72% used [0x63a70000, 0x63acc348, 0x63af0000)
from space 64K, 0% used [0x63af0000, 0x63af0000, 0x63b00000)
to space 64K, 0% used [0x63b00000, 0x63b00000, 0x63b10000)
tenured generation total 1408K, used 0K [0x63f50000, 0x640b0000,
0x67a70000)
the space 1408K, 0% used [0x63f50000, 0x63f50000, 0x63f50200,
0x640b0000)
compacting perm gen total 8192K, used 38K [0x67a70000, 0x68270000,
0x6ba70000)
the space 8192K, 0% used [0x67
0x68270000)
ro space 8192K, 67% used [0x6ba70000, 0x6bfdd3d0, 0x6bfdd400,
0x6c270000)
rw space 12288K, 46% used [0x6c270000, 0x6c7fd0f0, 0x6c7fd200,
0x6ce70000)
Dynamic libraries:
0x00400000 - 0x0040b000 c:\j2sdk1.5\jre\bin\java.exe
0x77f50000 - 0x77ff7000 C:\WINDOWS\System32\ntdll.dll
0x77e60000 - 0x77f46000 C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e5d000 C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll
0x77c10000 - 0x77c63000 C:\WINDOWS\system32\MSVCRT.dll
0x6d630000 - 0x6d7d7000 c:\j2sdk1.5\jre\bin\client\jvm.dll
0x77d40000 - 0x77dcc000 C:\WINDOWS\system32\USER32.dll
0x77c70000 - 0x77cb0000 C:\WINDOWS\system32\GDI32.dll
0x76b40000 - 0x76b6c000 C:\WINDOWS\System32\WINMM.dll
0x6d270000 - 0x6d277000 c:\j2sdk1.5\jre\bin\hpi.dll
0x76bf0000 - 0x76bfb000 C:\WINDOWS\System32\PSAPI.DLL
0x6d600000 - 0x6d60b000 c:\j2sdk1.5\jre\bin\verify.dll
0x6d2e0000 - 0x6d2fc000 c:\j2sdk1.5\jre\bin\java.dll
0x6d620000 - 0x6d62e000 c:\j2sdk1.5\jre\bin\zip.dll
VM Arguments:
java_command: test15.t4
Environment Variables:
CLASSPATH=C:\Program Files\Altova\xmlspy\XMLSpyInterface.jar
PATH=C:\Program Files\Intel\EDB70;C:\Program
Files\Intel\Compiler70\IA32\Bin;C:\Program Files\Common
Files\Intel\Shared
Files\Ia32\Bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C
:\Oracle\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program
Files\Oracle\jre\1.1.8\bin;C:\PROGRA~1\ULTRAE~1;C:\Home\System\bin;C:\Ho
me\System\lib;C:\Program Files\Microsoft Office\Office10;C:\Program
Files\Support Tools\ USERNAME=tk OS=Windows_NT PROCESSOR_IDENTIFIER=x86
Family 15 Model 2 Stepping 7, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 1
CPU:total 1(active 1) family 15, cmov, cx8, fxsr, mmx, sse, sse2
Memory: 4k page, physical 1047532k(521820k free), swap 2521024k(2063392k
free)
vm_info: Java HotSpot(TM) Client VM (1.5.0-beta-b32) for windows-x86,
built on Dec 19 2003 01:46:29 by "java_re" with MS VC++ 6.0
Steps to Reproduce (be specific):
Compile and execute the above-cited sample.
The annotations unit test (/net/koori.sfbay/onestop/jdk/1.5.0/promoted/beta/b32/ws/j2se/test/java/lang/annotations/UnitTest.java) causes the client VM on Windows XP Professional to fail with the following error:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d73679e, pid=2288, tid=2440
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b32 mixed mode)
# Problematic frame:
# V [jvm.dll+0x10679e]
#
# An error report file with more information is saved as hs_err_pid2288.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
###@###.### 2004-01-20
Same problem reported by another CAP member:
VM crash with the following code:
import java.lang.annotation.*;
import static java.lang.annotation.RetentionPolicy.*;
import static java.lang.annotation.ElementType.*;
@Mapping("Person")
public class TestMeta {
public static void main(String[] args){
String s =
TestMeta.class.getAnnotation(Mapping.class).value();
System.out.println(s);
}
}
@Retention(RUNTIME) @Target(TYPE)
@interface Mapping {
String value();
}
Java TestMeta and got:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d73679e, pid=2128,
tid=2432
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b32 mixed mode)
# Problematic frame:
# V [jvm.dll+0x10679e]
#
# An error report file with more information is saved as hs_err_pid2128.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
It doesn't happen when run the code with -server switch.
###@###.### 2004-01-21
Same problem reported by another CAP member but on Linux RedHat 7.3 machine.
Execute Annotation test program and will cause the segfault.
Attached error report hs_err_pid6191.log.
Test program: Annotation.java
public class Annotation {
public static void main(String[] args) {
Annotation.class.getAnnotations();
}
}
hs_err_pid6191.log:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0x4030cf7a, pid=6191, tid=1024
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b32 mixed mode)
# Problematic frame:
# V [libjvm.so+0x2cff7a]
#
--------------- T H R E A D ---------------
Current thread (0x0805acd0): JavaThread "main" [_thread_in_vm, id=6191]
siginfo:si_signo=11, si_errno=0, si_code=2, si_addr=0x525724bb
Registers:
EAX=0x08050000, EBX=0x403c8ce4, ECX=0x4030cf5e, EDX=0x0805bb48
ESP=0xbfffd1ec, EBP=0xbfffd2b4, ESI=0x0000004d, EDI=0x525724ba
EIP=0x4030cf7a, CR2=0x525724bb, EFLAGS=0x00010206
Top of Stack: (sp=0xbfffd1ec)
0xbfffd1ec: 00000002 00000003 0000000a 525724b8
0xbfffd1fc: 00000000 00000000 0805c0dc 403c8ce4
0xbfffd20c: 403b6e48 bfffd2f8 bfffd234 4016ffb8
0xbfffd21c: 0806f418 00000044 4212e3b0 4212dfa0
0xbfffd22c: bfffd24c 4207a058 bfffd264 40153038
0xbfffd23c: 0806d4e8 00000044 52d50d90 52d50d90
0xbfffd24c: 0805c0cc 00000044 0805c0cc 403c8ce4
0xbfffd25c: 0805acd0 bfffd2f8 bfffd284 402dde4b
Instructions: (pc=0x4030cf7a)
0x4030cf6a: 8b 55 10 81 e6 ff ff 00 00 8b 42 04 66 8b 04 b0
0x4030cf7a: 66 89 47 01 e9 70 fe ff ff c7 85 48 ff ff ff 01
Stack: [0xbfe00000,0xc0000000), sp=0xbfffd1ec, free space=2036k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x2cff7a]
V [libjvm.so+0x2d01a7]
V [libjvm.so+0x143a4b]
V [libjvm.so+0x1437fe]
V [libjvm.so+0x1433ab]
V [libjvm.so+0x143aa2]
V [libjvm.so+0x142d17]
V [libjvm.so+0x1696d5]
V [libjvm.so+0x1bdd03]
j java.lang.Class.getConstantPool()Lsun/reflect/ConstantPool;+0
j java.lang.Class.initAnnotationsIfNecessary()V+14
j java.lang.Class.getAnnotations()[Ljava/lang/annotation/Annotation;+1
j Annotation.main([Ljava/lang/String;)V+3
v ~StubRoutines::call_stub
V [libjvm.so+0x163d7c]
V [libjvm.so+0x2a8d18]
V [libjvm.so+0x163baf]
V [libjvm.so+0x185492]
V [libjvm.so+0x17a618]
C [java+0x17d6]
C [java+0x17499] __libc_start_main+0x95
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j java.lang.Class.getConstantPool()Lsun/reflect/ConstantPool;+0
j java.lang.Class.initAnnotationsIfNecessary()V+14
j java.lang.Class.getAnnotations()[Ljava/lang/annotation/Annotation;+1
j Annotation.main([Ljava/lang/String;)V+3
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x080a7318 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=6198]
0x080a5fa0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=6197]
0x080a5088 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=6196]
0x080a0a50 JavaThread "Finalizer" daemon [_thread_blocked, id=6195]
0x0809ec30 JavaThread "Reference Handler" daemon [_thread_blocked, id=6194]
=>0x0805acd0 JavaThread "main" [_thread_in_vm, id=6191]
Other Threads:
0x08098358 VMThread [id=6193]
0x080a8600 WatcherThread [id=6199]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 576K, used 149K [0x4a550000, 0x4a5f0000, 0x4aa30000)
eden space 512K, 29% used [0x4a550000, 0x4a575480, 0x4a5d0000)
from space 64K, 0% used [0x4a5d0000, 0x4a5d0000, 0x4a5e0000)
to space 64K, 0% used [0x4a5e0000, 0x4a5e0000, 0x4a5f0000)
tenured generation total 1408K, used 0K [0x4aa30000, 0x4ab90000, 0x4e550000)
the space 1408K, 0% used [0x4aa30000, 0x4aa30000, 0x4aa30200, 0x4ab90000)
compacting perm gen total 8192K, used 54K [0x4e550000, 0x4ed50000, 0x52550000)
the space 8192K, 0% used [0x4e550000, 0x4e55d908, 0x4e55da00, 0x4ed50000)
ro space 8192K, 68% used [0x52550000, 0x52ac0cf8, 0x52ac0e00, 0x52d50000)
rw space 12288K, 45% used [0x52d50000, 0x532ca718, 0x532ca800, 0x53950000)
Dynamic libraries:
08048000-08056000 r-xp 00000000 08:03 181476 /opt/j2sdk1.5.0-b32/bin/java
08056000-08058000 rw-p 0000d000 08:03 181476 /opt/j2sdk1.5.0-b32/bin/java
08058000-080cd000 rwxp 00000000 00:00 0
40000000-40013000 r-xp 00000000 08:02 426061 /lib/ld-2.2.5.so
40013000-40014000 rw-p 00013000 08:02 426061 /lib/ld-2.2.5.so
40014000-40015000 r--p 00000000 00:00 0
40015000-4001c000 r-xp 00000000 08:03 214227 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/native_threads/libhpi.so
4001c000-4001d000 rw-p 00006000 08:03 214227 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/native_threads/libhpi.so
4001d000-40021000 rw-s 00000000 08:02 378595 /tmp/hsperfdata_root/6191
40021000-40024000 r--s 00000000 08:03 82842 /opt/j2sdk1.5.0-b32/jre/lib/ext <wrap> /dnsns.jar
40025000-40032000 r-xp 00000000 08:02 426059 /lib/i686/libpthread-0.9.so
40032000-40039000 rw-p 0000d000 08:02 426059 /lib/i686/libpthread-0.9.so
40039000-4003a000 rw-p 00000000 00:00 0
4003a000-4003c000 r-xp 00000000 08:02 426074 /lib/libdl-2.2.5.so
4003c000-4003d000 rw-p 00001000 08:02 426074 /lib/libdl-2.2.5.so
4003d000-403ae000 r-xp 00000000 08:03 246990 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/client/libjvm.so
403ae000-403cc000 rw-p 00370000 08:03 246990 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/client/libjvm.so
403cc000-407e0000 rw-p 00000000 00:00 0
407e0000-40801000 r-xp 00000000 08:02 426057 /lib/i686/libm-2.2.5.so
40801000-40802000 rw-p 00020000 08:02 426057 /lib/i686/libm-2.2.5.so
40802000-4080d000 r-xp 00000000 08:03 214235 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/libverify.so
4080d000-4080e000 rw-p 0000b000 08:03 214235 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/libverify.so
4080e000-40813000 rwxp 00000000 00:00 0
40813000-40825000 r-xp 00000000 08:02 426078 /lib/libnsl-2.2.5.so
40825000-40826000 rw-p 00012000 08:02 426078 /lib/libnsl-2.2.5.so
40826000-40828000 rw-p 00000000 00:00 0
40828000-40831000 r-xp 00000000 08:02 426094 /lib/libnss_files-2.2.5.so
40831000-40832000 rw-p 00009000 08:02 426094 /lib/libnss_files-2.2.5.so
40832000-40852000 r-xp 00000000 08:03 214257 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/libjava.so
40852000-40854000 rw-p 0001f000 08:03 214257 /opt/j2sdk1.5.0-b32/jre/lib/i38 <wrap> 6/libjava.so
:
:
VM Arguments:
java_command: Annotation
Environment Variables:
JAVA_HOME=/opt/jdk
CLASSPATH=/opt/projects/projects/stroem/lib/j2ee-1.3.1.jar
PATH=/opt/jdk/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/ <wrap> usr/X11R6/bin:/root/bin
USERNAME=root
LD_LIBRARY_PATH=/opt/j2sdk1.5.0-b32/jre/lib/i386/client:/opt/j2sdk1.5.0-b32/jre/ <wrap> lib/i386:/opt/j2sdk1.5.0-b32/jre/../lib/i386
SHELL=/bin/bash
--------------- S Y S T E M ---------------
OS:Red Hat Linux release 7.3 (Valhalla)
uname:Linux 2.4.23 #4 SMP Tue Jan 6 20:50:06 CET 2004 i686
libc:glibc 2.2.5 stable linuxthreads (floating stack)
rlimit: STACK infinity, CORE 0k, NPROC 4095, NOFILE 1024, AS infinity
load average:0.00 0.00 0.00
CPU:total 2(active 2) family 6, cmov, cx8, fxsr, mmx, sse
Memory: 4k page, physical 514908k(17072k free), swap 658584k(658584k free)
vm_info: Java HotSpot(TM) Client VM (1.5.0-beta-b32) for linux-x86, built on Dec <wrap> 19 2003 02:38:07 by java_re with gcc 3.2.1-7 20020903 (release)
###@###.### 2004-01-22
One more CAP member report the same problem:
J2SE Version (please include all output from java -version flag):
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32, mixed mode)
Does this problem occur on J2SE 1.4 or 1.4.1 or 1.4.2? Yes / No (pick
one)
No
Operating System Configuration Information (be specific):
Windows XP Professional, Version 2002, SP1 (with newes online-updates).
Hardware Configuration Information (be specific):
Sony Vaio Notebook with Pentium 4-M 2 GHz, 2GB RAM, 30 GB HDD.
Bug Description:
A problem occurs when reading annotations via reflection, e.g.
package test15;
import java.lang.reflect.*;
@interface special {}
public class t4 {
public int a = 3;
public @special int b = 5;
public static void main(String[] args) {
new t4().show();
}
public void show() {
System.out.println("a=" + a);
System.out.println("b=" + b);
Field[] f = getClass().getFields();
for (int i = 0; i < f.length; i++) {
Field x = f[i];
System.out.println(x.getName() + " is " +
(f[i].getAnnotation(special.class) !=
null ? "" : "not ") +
"special.");
}
}
}
... produces the output ...
a=3
b=5
#
# An unexpected error has been detected by HotSpot Virtual Machine: # #
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d73679e, pid=3180,
tid=1792 # # Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b32 mixed
mode) # Problematic frame: # V [jvm.dll+0x10679e] # # An error report
file with more information is saved as hs_err_pid3180.log # # If you
would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
... and the log ...
#
# An unexpected error has been detected by HotSpot Virtual Machine: # #
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d73679e, pid=3180,
tid=1792 # # Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b32 mixed
mode) # Problematic frame: # V [jvm.dll+0x10679e] #
--------------- T H R E A D ---------------
Current thread (0x00036af8): JavaThread "main" [_thread_in_vm, id=1792]
siginfo: ExceptionCode=0xc0000005, writing address 0x6ba924d3
Registers:
EAX=0x00000000, EBX=0x000370dc, ECX=0x000366c8, EDX=0x000370e0
ESP=0x0007f748, EBP=0x0007f7e4, ESI=0x6ba924d2, EDI=0x000000b4
EIP=0x6d73679e, EFLAGS=0x00010293
Top of Stack: (sp=0x0007f748)
0x0007f748: 00036af8 6c28a068 0000001b 6d72a031
0x0007f758: 6c270d90 00036af8 00036af8 00036330
0x0007f768: 000000a0 00000000 67a79770 00000000
0x0007f778: 0007f7b8 6d69a436 00000044 6d6855b0
0x0007f788: 67a79770 6d68559a 67a79770 00000044
0x0007f798: 00000044 6d68e205 000370cc 67a79770
0x0007f7a8: 00000044 00036af8 00036af8 00036840
0x0007f7b8: 6d68e925 0000005c 00036840 67a79770
Instructions: (pc=0x6d73679e)
0x6d73678e: e8 86 c4 8b 4d 10 0f b7 c0 8b 49 04 66 8b 04 81
0x6d73679e: 66 89 46 01 eb 22 8b ce e8 da 83 f1 ff 33 c9 83
Stack: [0x00040000,0x00080000), sp=0x0007f748, free space=253k Native
frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x10679e] V [jvm.dll+0x1069a3] V [jvm.dll+0x70beb] V
[jvm.dll+0x70ad1] V [jvm.dll+0x708ae] V [jvm.dll+0x70587] V
[jvm.dll+0x80505] V [jvm.dll+0x95798] j
java.lang.Class.getConstantPool()Lsun/reflect/ConstantPool;+0
j
java.lang.System+2.getConstantPool(Ljava/lang/Class;)Lsun/reflect/Consta
ntPool;+1
j java.lang.reflect.Field.declaredAnnotations()Ljava/util/Map;+19
j
java.lang.reflect.Field.getAnnotation(Ljava/lang/Class;)Ljava/lang/annot
ation/Annotation;+1
j test15.t4.show()V+104
j test15.t4.main([Ljava/lang/String;)V+7
v ~StubRoutines::call_stub
V [jvm.dll+0x7dff9]
V [jvm.dll+0xf4b9a]
V [jvm.dll+0x7deca]
V [jvm.dll+0x84df5]
C [java.exe+0x14b0]
C [java.exe+0x6282]
C [kernel32.dll+0x214c7]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j
java.lang.Class.getConstantPool()Lsun/reflect/ConstantPool;+0
j
java.lang.System+2.getConstantPool(Ljava/lang/Class;)Lsun/reflect/Consta
ntPool;+1
j java.lang.reflect.Field.declaredAnnotations()Ljava/util/Map;+19
j
java.lang.reflect.Field.getAnnotation(Ljava/lang/Class;)Ljava/lang/annot
ation/Annotation;+1
j test15.t4.show()V+104
j test15.t4.main([Ljava/lang/String;)V+7
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x008dd840 JavaThread "Low Memory Detector" daemon [_thread_blocked,
id=3140]
0x008dc470 JavaThread "CompilerThread0" daemon [_thread_blocked,
id=3152]
0x008db830 JavaThread "Signal Dispatcher" daemon [_thread_blocked,
id=2984]
0x008d8708 JavaThread "Finalizer" daemon [_thread_blocked, id=2792]
0x008d7b10 JavaThread "Reference Handler" daemon [_thread_blocked,
id=3168] =>0x00036af8 JavaThread "main" [_thread_in_vm, id=1792]
Other Threads:
0x008d4ab8 VMThread [id=3088]
0x008de940 WatcherThread [id=3036]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 576K, used 368K [0x63a70000, 0x63b10000,
0x63f50000)
eden space 512K, 72% used [0x63a70000, 0x63acc348, 0x63af0000)
from space 64K, 0% used [0x63af0000, 0x63af0000, 0x63b00000)
to space 64K, 0% used [0x63b00000, 0x63b00000, 0x63b10000)
tenured generation total 1408K, used 0K [0x63f50000, 0x640b0000,
0x67a70000)
the space 1408K, 0% used [0x63f50000, 0x63f50000, 0x63f50200,
0x640b0000)
compacting perm gen total 8192K, used 38K [0x67a70000, 0x68270000,
0x6ba70000)
the space 8192K, 0% used [0x67
- duplicates
-
JDK-4976923 Class method getAnnotations fails upon any use
-
- Closed
-