axiangyushanhaijing / powerpoint

https://wiki.openjdk.java.net/display/jdk8u
GNU General Public License v2.0
6 stars 3 forks source link

Dacapo测试记录 #253

Open axiangyushanhaijing opened 1 year ago

axiangyushanhaijing commented 1 year ago

当前报错

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000400b8a710c, pid=3057251, tid=0x00000040037531e0
#
# JRE version: OpenJDK Runtime Environment (8.0_352) (build 1.8.0_352-internal-debug-zhangxiang_2022_11_25_15_22-b00)
# Java VM: OpenJDK 64-Bit  VM (25.352-b00-debug interpreted mode linux-riscv64 compressed oops)
# Problematic frame:
# j  com.sun.tools.javac.jvm.ClassReader.includeClassFile(Lcom/sun/tools/javac/code/Symbol$PackageSymbol;Ljavax/tools/JavaFileObject;)V+155
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/zhangxiang/rv-jdk8u/jdk8u/hs_err_pid3057251.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

对应的gdb堆栈信息:

   0x400b8a5964:    beqz    t0,0x400b8a597c
   0x400b8a5968:    ld  zero,0(a2)
   0x400b8a596c:    mv  t5,sp
   0x400b8a5970:    sd  s4,-16(s0)
   0x400b8a5974:    ld  t0,96(t6)
   0x400b8a5978:    jr  t0
   0x400b8a597c:    lwu a0,8(a2)
   0x400b8a5980:    slli    a0,a0,0x3
   0x400b8a5984:    slli    t6,t6,0x3
   0x400b8a5988:    add t6,a0,t6
=> 0x400b8a598c:    ld  t6,456(t6)
   0x400b8a5990:    mv  t5,sp
   0x400b8a5994:    sd  s4,-16(s0)
   0x400b8a5998:    ld  t0,96(t6)
   0x400b8a599c:    jr  t0
   0x400b8a59a0:    addi    sp,sp,-240
   0x400b8a59a4:    sd  ra,0(sp)
   0x400b8a59a8:    sd  gp,8(sp)
   0x400b8a59ac:    sd  tp,16(sp)
   0x400b8a59b0:    sd  t0,24(sp)

log信息

Stack: [0x0000004003552000,0x0000004003752000],  sp=0x000000400374f500,  free space=2037k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
j  com.sun.tools.javac.jvm.ClassReader.includeClassFile(Lcom/sun/tools/javac/code/Symbol$PackageSymbol;Ljavax/tools/JavaFileObject;)V+265
j  com.sun.tools.javac.jvm.ClassReader.fillIn(Lcom/sun/tools/javac/code/Symbol$PackageSymbol;Ljavax/tools/JavaFileManager$Location;Ljava/lang/Iterable;)V+186
j  com.sun.tools.javac.jvm.ClassReader.fillIn(Lcom/sun/tools/javac/code/Symbol$PackageSymbol;)V+57
j  com.sun.tools.javac.jvm.ClassReader.complete(Lcom/sun/tools/javac/code/Symbol;)V+88
j  com.sun.tools.javac.jvm.ClassReader.access$000(Lcom/sun/tools/javac/jvm/ClassReader;Lcom/sun/tools/javac/code/Symbol;)V+2
j  com.sun.tools.javac.jvm.ClassReader$1.complete(Lcom/sun/tools/javac/code/Symbol;)V+5
j  com.sun.tools.javac.code.Symbol.complete()V+19
j  com.sun.tools.javac.code.Symbol$PackageSymbol.members()Lcom/sun/tools/javac/code/Scope;+8
j  com.sun.tools.javac.comp.MemberEnter.importAll(ILcom/sun/tools/javac/code/Symbol$TypeSymbol;Lcom/sun/tools/javac/comp/Env;)V+9
j  com.sun.tools.javac.comp.MemberEnter.visitTopLevel(Lcom/sun/tools/javac/tree/JCTree$JCCompilationUnit;)V+152
j  com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(Lcom/sun/tools/javac/tree/JCTree$Visitor;)V+2
j  com.sun.tools.javac.comp.MemberEnter.memberEnter(Lcom/sun/tools/javac/tree/JCTree;Lcom/sun/tools/javac/comp/Env;)V+12
j  com.sun.tools.javac.comp.MemberEnter.complete(Lcom/sun/tools/javac/code/Symbol;)V+163
j  com.sun.tools.javac.code.Symbol.complete()V+19
j  com.sun.tools.javac.code.Symbol$ClassSymbol.complete()V+1
j  com.sun.tools.javac.comp.Enter.complete(Lcom/sun/tools/javac/util/List;Lcom/sun/tools/javac/code/Symbol$ClassSymbol;)V+88
j  com.sun.tools.javac.comp.Enter.main(Lcom/sun/tools/javac/util/List;)V+3
j  com.sun.tools.javac.main.JavaCompiler.enterTrees(Lcom/sun/tools/javac/util/List;)Lcom/sun/tools/javac/util/List;+64
j  com.sun.tools.javac.main.JavaCompiler.compile(Lcom/sun/tools/javac/util/List;Lcom/sun/tools/javac/util/List;Ljava/lang/Iterable;)V+151
j  com.sun.tools.javac.main.Main.compile([Ljava/lang/String;[Ljava/lang/String;Lcom/sun/tools/javac/util/Context;Lcom/sun/tools/javac/util/List;Ljava/lang/Iterable;)Lcom/sun/tools/javac/main/Main$Result;+1299
j  com.sun.tools.javac.main.Main.compile([Ljava/lang/String;Lcom/sun/tools/javac/util/Context;Lcom/sun/tools/javac/util/List;Ljava/lang/Iterable;)Lcom/sun/tools/javac/main/Main$Result;+7
j  com.sun.tools.javac.main.Main.compile([Ljava/lang/String;Lcom/sun/tools/javac/util/Context;)Lcom/sun/tools/javac/main/Main$Result;+7
j  com.sun.tools.javac.main.Main.compile([Ljava/lang/String;)Lcom/sun/tools/javac/main/Main$Result;+15
j  com.sun.tools.javac.Main.compile([Ljava/lang/String;)I+12
j  com.sun.tools.javac.Main.main([Ljava/lang/String;)V+1
v  ~StubRoutines::call_stub
axiangyushanhaijing commented 1 year ago
Stack: [0x0000004003552000,0x0000004003752000],  sp=0x000000400374f120,  free space=2036k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
j  com.sun.tools.javac.util.SharedNameTable.fromUtf([BII)Lcom/sun/tools/javac/util/Name;+35
j  com.sun.tools.javac.util.Name.append(CLcom/sun/tools/javac/util/Name;)Lcom/sun/tools/javac/util/Name;+49
j  com.sun.tools.javac.code.Symbol$TypeSymbol.formFullName(Lcom/sun/tools/javac/util/Name;Lcom/sun/tools/javac/code/Symbol;)Lcom/sun/tools/javac/util/Name;+77
j  com.sun.tools.javac.code.Symbol$ClassSymbol.<init>(JLcom/sun/tools/javac/util/Name;Lcom/sun/tools/javac/code/Type;Lcom/sun/tools/javac/code/Symbol;)V+20
j  com.sun.tools.javac.code.Symbol$ClassSymbol.<init>(JLcom/sun/tools/javac/util/Name;Lcom/sun/tools/javac/code/Symbol;)V+17
j  com.sun.tools.javac.jvm.ClassReader.defineClass(Lcom/sun/tools/javac/util/Name;Lcom/sun/tools/javac/code/Symbol;)Lcom/sun/tools/javac/code/Symbol$ClassSymbol;+7
j  com.sun.tools.javac.jvm.ClassReader.enterClass(Lcom/sun/tools/javac/util/Name;Lcom/sun/tools/javac/code/Symbol$TypeSymbol;)Lcom/sun/tools/javac/code/Symbol$ClassSymbol;+29
j  com.sun.tools.javac.jvm.ClassReader.includeClassFile(Lcom/sun/tools/javac/code/Symbol$PackageSymbol;Ljavax/tools/JavaFileObject;)V+294
j  com.sun.tools.javac.jvm.ClassReader.fillIn(Lcom/sun/tools/javac/code/Symbol$PackageSymbol;Ljavax/tools/JavaFileManager$Location;Ljava/lang/Iterable;)V+186
j  com.sun.tools.javac.jvm.ClassReader.fillIn(Lcom/sun/tools/javac/code/Symbol$PackageSymbol;)V+57
j  com.sun.tools.javac.jvm.ClassReader.complete(Lcom/sun/tools/javac/code/Symbol;)V+88
j  com.sun.tools.javac.jvm.ClassReader.access$000(Lcom/sun/tools/javac/jvm/ClassReader;Lcom/sun/tools/javac/code/Symbol;)V+2
j  com.sun.tools.javac.jvm.ClassReader$1.complete(Lcom/sun/tools/javac/code/Symbol;)V+5
j  com.sun.tools.javac.code.Symbol.complete()V+19
j  com.sun.tools.javac.code.Symbol$PackageSymbol.members()Lcom/sun/tools/javac/code/Scope;+8
j  com.sun.tools.javac.comp.MemberEnter.importAll(ILcom/sun/tools/javac/code/Symbol$TypeSymbol;Lcom/sun/tools/javac/comp/Env;)V+9
j  com.sun.tools.javac.comp.MemberEnter.visitTopLevel(Lcom/sun/tools/javac/tree/JCTree$JCCompilationUnit;)V+152
j  com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(Lcom/sun/tools/javac/tree/JCTree$Visitor;)V+2
j  com.sun.tools.javac.comp.MemberEnter.memberEnter(Lcom/sun/tools/javac/tree/JCTree;Lcom/sun/tools/javac/comp/Env;)V+12
j  com.sun.tools.javac.comp.MemberEnter.complete(Lcom/sun/tools/javac/code/Symbol;)V+163
j  com.sun.tools.javac.code.Symbol.complete()V+19
j  com.sun.tools.javac.code.Symbol$ClassSymbol.complete()V+1
j  com.sun.tools.javac.comp.Enter.complete(Lcom/sun/tools/javac/util/List;Lcom/sun/tools/javac/code/Symbol$ClassSymbol;)V+88
j  com.sun.tools.javac.comp.Enter.main(Lcom/sun/tools/javac/util/List;)V+3
j  com.sun.tools.javac.main.JavaCompiler.enterTrees(Lcom/sun/tools/javac/util/List;)Lcom/sun/tools/javac/util/List;+64
j  com.sun.tools.javac.main.JavaCompiler.compile(Lcom/sun/tools/javac/util/List;Lcom/sun/tools/javac/util/List;Ljava/lang/Iterable;)V+151
j  com.sun.tools.javac.main.Main.compile([Ljava/lang/String;[Ljava/lang/String;Lcom/sun/tools/javac/util/Context;Lcom/sun/tools/javac/util/List;Ljava/lang/Iterable;)Lcom/sun/tools/javac/main/Main$Result;+1299
j  com.sun.tools.javac.main.Main.compile([Ljava/lang/String;Lcom/sun/tools/javac/util/Context;Lcom/sun/tools/javac/util/List;Ljava/lang/Iterable;)Lcom/sun/tools/javac/main/Main$Result;+7
j  com.sun.tools.javac.main.Main.compile([Ljava/lang/String;Lcom/sun/tools/javac/util/Context;)Lcom/sun/tools/javac/main/Main$Result;+7
j  com.sun.tools.javac.main.Main.compile([Ljava/lang/String;)Lcom/sun/tools/javac/main/Main$Result;+15
j  com.sun.tools.javac.Main.compile([Ljava/lang/String;)I+12
j  com.sun.tools.javac.Main.main([Ljava/lang/String;)V+1
axiangyushanhaijing commented 1 year ago

258 在unaligned in ByteArrayAccess.java增加了 riscv64-arch

260 参考aarch64在vframeArray::fill_in中添加对riscv64的支持。

axiangyushanhaijing commented 1 year ago

更新同步到最新的master,新建本地同步测试分支 temp-master

axiangyushanhaijing commented 1 year ago

基于 #174 在分支 1123_fix_java_dev 打上patch

diff --git a/hotspot/src/cpu/riscv64/vm/stubGenerator_riscv64.cpp b/hotspot/src/cpu/riscv64/vm/stubGenerator_riscv64.cpp
index cadebe9363..57cd5a8b81 100644
--- a/hotspot/src/cpu/riscv64/vm/stubGenerator_riscv64.cpp
+++ b/hotspot/src/cpu/riscv64/vm/stubGenerator_riscv64.cpp
@@ -1534,7 +1534,7 @@ void gen_write_ref_array_post_barrier(Register start, Register end, Register scr

     __ BIND(L_store_element);
     //__ store_heap_oop_rv(Address(to, UseCompressedOops ? 4 : 8), copied_oop); // store the oop  // store the oop
-     __ store_heap_oop(Address(to, 0), copied_oop, noreg, noreg, AS_RAW); 
+    __ store_heap_oop(Address(to, 0), copied_oop, noreg, noreg, AS_RAW); 
     __ add(to, to, UseCompressedOops ? 4 : 8);
     __ sub(count, count, 1);
     __ beqz(count, L_do_card_marks);
diff --git a/hotspot/src/cpu/riscv64/vm/templateTable_riscv64.cpp b/hotspot/src/cpu/riscv64/vm/templateTable_riscv64.cpp
index 38d008ce42..0ce10477f1 100644
--- a/hotspot/src/cpu/riscv64/vm/templateTable_riscv64.cpp
+++ b/hotspot/src/cpu/riscv64/vm/templateTable_riscv64.cpp
@@ -1354,8 +1354,8 @@ void TemplateTable::aastore() {
   // Get the value we will store
   __ ld(x10, at_tos());
   // Now store using the appropriate barrier
-  do_oop_store(_masm, element_address, x10, IS_ARRAY);
-  //do_oop_store_rv(_masm, element_address, x10, _bs->kind(), true);
+  //do_oop_store(_masm, element_address, x10, IS_ARRAY);
+  do_oop_store_rv(_masm, element_address, x10, _bs->kind(), true);
   __ j(done);

   // Have a NULL in x10, x13=array, x12=index.  Store NULL at ary[idx]
@@ -3081,8 +3081,8 @@ void TemplateTable::putfield_or_static(int byte_no, bool is_static) {
     __ add(off, obj, off); // if static, obj from cache, else obj from stack.
     const Address field(off, 0);
     // Store into the field
-    //do_oop_store_rv(_masm, field, x10, _bs->kind(), false);
-    do_oop_store(_masm, field, x10, IN_HEAP);
+    do_oop_store_rv(_masm, field, x10, _bs->kind(), false);
+    //do_oop_store(_masm, field, x10, IN_HEAP);
     /*if (rc == may_rewrite) {
       patch_bytecode(Bytecodes::_fast_aputfield, bc, x11, true, byte_no);
     }*/

javac顺利编过,且常规test顺利通过 image

axiangyushanhaijing commented 1 year ago

已提 #262

axiangyushanhaijing commented 1 year ago

测试dacapo

失败case: eclipse

Unzip workspace 
===== DaCapo 9.12-MR1 eclipse starting =====
Initialize workspace ...# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/symbolTable.cpp:392
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/zhangxiang/rv-jdk8u/jdk8u/hotspot/src/share/vm/classfile/symbolTable.cpp:392), pid=1917318, tid=0x000000406063d1e0
#  assert(!Universe::heap()->is_in_reserved(name)) failed: proposed name of symbol must be stable
#
# JRE version: OpenJDK Runtime Environment (8.0_352) (build 1.8.0_352-internal-debug-zhangxiang_2023_01_10_13_18-b00)
# Java VM: OpenJDK 64-Bit  VM (25.352-b00-debug interpreted mode linux-riscv64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/zhangxiang/rv-jdk8u/jdk8u/hs_err_pid1917318.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 276495061472
Dumping core ...
Aborted

tradesoap

# after -XX: or in .hotspotrc:  SuppressErrorAt=/collectedHeap.inline.hpp[thread 281558630880 also had an error]:210

[thread 284693873120 also had an error]
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/zhangxiang/rv-jdk8u/jdk8u/hotspot/src/share/vm/gc_interface/collectedHeap.inline.hpp:210), pid=1919454, tid=0x00000044103ba1e0
#  assert(!Universe::heap()->is_gc_active()) failed: Allocation during gc not allowed
#
# JRE version: OpenJDK Runtime Environment (8.0_352) (build 1.8.0_352-internal-debug-zhangxiang_2023_01_10_13_18-b00)
# Java VM: OpenJDK 64-Bit  VM (25.352-b00-debug interpreted mode linux-riscv64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/zhangxiang/rv-jdk8u/jdk8u/hs_err_pid1919454.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 292330119648
Dumping core ...
Aborted

319 解决tradesoap的问题

因为 access_load_at(T_OBJECT, IN_NATIVE, value, Address(value, 0), tmp, thread); 中T_OBJECT对应了lwu&ld,不仅仅是ld

axiangyushanhaijing commented 1 year ago

tradebeans

zhangxiang@k9-plct:~/rv-jdk8u/jdk8u$ qemu64 /home/zhangxiang/rv-jdk8u/jdk8u/build/linux-riscv64-normal-core-slowdebug/jdk/bin/java-bak -jar ~/rv32/Doc/dacapo-9.12-MR1-bach.jar tradebeans  -s small
Using scaled threading model. 32 processors detected, 32 threads used to drive the workload, in a possible range of [1,32]
Booting Geronimo Kernel (in Java 1.8.0_352-internal-debug)...
# To suppress the following error report, specify this argument# To suppress the following error report, specify this argument

# after -XX: or in .hotspotrc:  SuppressErrorAt=# after -XX: or in .hotspotrc:  SuppressErrorAt=/synchronizer.cpp/safepoint.cpp:773
:475
[thread 275118137824 also had an error]
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/zhangxiang/rv-jdk8u/jdk8u/hotspot/src/share/vm/runtime/synchronizer.cpp:773), pid=1920651, tid=0x00000040037861e0
#  assert(!SafepointSynchronize::is_at_safepoint()) failed: invariant
#
# JRE version: OpenJDK Runtime Environment (8.0_352) (build 1.8.0_352-internal-debug-zhangxiang_2023_01_10_13_18-b00)
# Java VM: OpenJDK 64-Bit  VM (25.352-b00-debug interpreted mode linux-riscv64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/zhangxiang/rv-jdk8u/jdk8u/hs_err_pid1920651.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 274936127968
Dumping core ...
Aborted
axiangyushanhaijing commented 1 year ago

batik

zhangxiang@k9-plct:~/rv-jdk8u/jdk8u$ qemu64 /home/zhangxiang/rv-jdk8u/jdk8u/build/linux-riscv64-normal-core-slowdebug/jdk/bin/java-bak -jar ~/rv32/Doc/dacapo-9.12-MR1-bach.jar batik  -s small
===== DaCapo 9.12-MR1 batik starting =====
About to transcode 1 SVG file(s)

Converting mapWaadt.svg to /home/zhangxiang/rv-jdk8u/jdk8u/./scratch/mapWaadt.png ... java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.dacapo.harness.Batik.iterate(Batik.java:41)
        at org.dacapo.harness.Benchmark.run(Benchmark.java:187)
        at org.dacapo.harness.TestHarness.runBenchmark(TestHarness.java:199)
        at org.dacapo.harness.TestHarness.main(TestHarness.java:152)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at Harness.main(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError
axiangyushanhaijing commented 1 year ago

tomcat

zhangxiang@k9-plct:~/rv-jdk8u/jdk8u$ qemu64 /home/zhangxiang/rv-jdk8u/jdk8u/build/linux-riscv64-normal-core-slowdebug/jdk/bin/java-bak -jar ~/rv32/Doc/dacapo-9.12-MR1-bach.jar tomcat  -s small
The derived number of threads (32) is outside the range [1,4]; rescaling to match thread limit.
Using scaled threading model. 32 processors detected, 4 threads used to drive the workload, in a possible range of [1,4]
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/collectedHeap.inline.hpp:210
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/zhangxiang/rv-jdk8u/jdk8u/hotspot/src/share/vm/gc_interface/collectedHeap.inline.hpp:210), pid=1922400, tid=0x000000403f7391e0
#  assert(!Universe::heap()->is_gc_active()) failed: Allocation during gc not allowed
#
# JRE version: OpenJDK Runtime Environment (8.0_352) (build 1.8.0_352-internal-debug-zhangxiang_2023_01_10_13_18-b00)
# Java VM: OpenJDK 64-Bit  VM (25.352-b00-debug interpreted mode linux-riscv64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/zhangxiang/rv-jdk8u/jdk8u/hs_err_pid1922400.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 275942445536
Dumping core ...
Aborted
axiangyushanhaijing commented 1 year ago

截止 2023.01.01

通过9个case:

未通过的case:

参考 jdk11移植rv32的测试记录 通过率为:64.2%

截止 2023.3.30

通过9个case:

未通过的case:


截止2023.12.14
未通过case:

通过率:12/14=85.7%