-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: repo-valhalla
-
Component/s: hotspot
http://hg.openjdk.java.net/valhalla/valhalla/file/c8c7d759f9c0/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestCallingConventionC1.java#l915
The test case crash when running with "jtreg -javaoptions:-Xcomp". Apply the following patch for easy production without using -Xcomp:
diff -r d5cbab0e44d3 test/hotspot/jtreg/compiler/valhalla/valuetypes/TestCallingConventionC1.java
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestCallingConventionC1.java Thu Jun 27 21:49:36 2019 -0700
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestCallingConventionC1.java Mon Jul 01 09:58:06 2019 -0700
@@ -931,12 +931,16 @@
a1 + a2 + a3 + a4 + a5 + a6 + a7;
}
- @DontCompile
+ @ForceCompile(compLevel = C2)
public void test46_verifier(boolean warmup) {
int count = warmup ? 1 : 2;
for (int i=0; i<count; i++) { // need a loop to test inline cache
- float result = test46();
- float n = test46_helper(floatPointField, floatPointField, pointField, floatPointField, floatPointField, pointField, floatPointField, 1, 2, 3, 4, 5, 6, 7);
+ float result;
+ float n;
+ try (ForceGCMarker m = ForceGCMarker.mark(warmup)) {
+ result = test46();
+ n = test46_helper(floatPointField, floatPointField, pointField, floatPointField, floatPointField, pointField, floatPointField, 1, 2, 3, 4, 5, 6, 7);
+ }
Asserts.assertEQ(result, n);
}
}
$ jtreg -DTestlist=test46 -DVerbose=true TestCallingConventionC1.java
stderr: [ stdout: [For random generator using seed: -673416091099034874
To re-run test with same seed value please add "-Djdk.test.lib.random.seed=-673416091099034874" to command line.
rI = -170, rL = -363
Starting test46
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f6b04c93c10, pid=8139, tid=8169
#
# JRE version: Java(TM) SE Runtime Environment (14.0) (fastdebug build 14-internal+0-adhoc.iklam.open)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 14-internal+0-adhoc.iklam.open, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x1052c10] frame::frame(long*, long*, long*, unsigned char*)+0x200
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P" (or dumping to /jdk2/tmp/jtreg/work/scratch/core.8139)
#
Unsupported internal testing APIs have been used.
# An error report file with more information is saved as:
# /jdk2/tmp/jtreg/work/scratch/hs_err_pid8139.log
Compiled method (c2) 970 171 4 compiler.valhalla.valuetypes.TestCallingConventionC1::test46 (34 bytes)
total in heap [0x00007f6aec217f90,0x00007f6aec218368] = 984
relocation [0x00007f6aec218118,0x00007f6aec218138] = 32
main code [0x00007f6aec218140,0x00007f6aec218240] = 256
stub code [0x00007f6aec218240,0x00007f6aec218268] = 40
oops [0x00007f6aec218268,0x00007f6aec218270] = 8
metadata [0x00007f6aec218270,0x00007f6aec218280] = 16
scopes data [0x00007f6aec218280,0x00007f6aec2182a8] = 40
scopes pcs [0x00007f6aec2182a8,0x00007f6aec218348] = 160
dependencies [0x00007f6aec218348,0x00007f6aec218350] = 8
handler table [0x00007f6aec218350,0x00007f6aec218368] = 24
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 8169
Dumping core ...
Current thread (0x00007f6ac8003000): GCTaskThread "GC Thread#2" [stack: 0x00007f6ac2c14000,0x00007f6ac2d14000] [id=8169]
Stack: [0x00007f6ac2c14000,0x00007f6ac2d14000], sp=0x00007f6ac2d119d0, free space=1014k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x1052c10] frame::frame(long*, long*, long*, unsigned char*)+0x200
V [libjvm.so+0x105106e] frame::sender(RegisterMap*) const+0x2ae
V [libjvm.so+0x1be7230] JavaThread::nmethods_do(CodeBlobClosure*) [clone .part.78]+0xa0
V [libjvm.so+0x1bf22f9] Threads::possibly_parallel_threads_do(bool, ThreadClosure*)+0xa9
V [libjvm.so+0x1a5ba30] ParallelSPCleanupTask::work(unsigned int)+0x30
V [libjvm.so+0x1d57370] GangWorker::loop()+0xe0
V [libjvm.so+0x1bf5516] Thread::call_run()+0xf6
V [libjvm.so+0x18d496e] thread_native_entry(Thread*)+0x10e
The test case crash when running with "jtreg -javaoptions:-Xcomp". Apply the following patch for easy production without using -Xcomp:
diff -r d5cbab0e44d3 test/hotspot/jtreg/compiler/valhalla/valuetypes/TestCallingConventionC1.java
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestCallingConventionC1.java Thu Jun 27 21:49:36 2019 -0700
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestCallingConventionC1.java Mon Jul 01 09:58:06 2019 -0700
@@ -931,12 +931,16 @@
a1 + a2 + a3 + a4 + a5 + a6 + a7;
}
- @DontCompile
+ @ForceCompile(compLevel = C2)
public void test46_verifier(boolean warmup) {
int count = warmup ? 1 : 2;
for (int i=0; i<count; i++) { // need a loop to test inline cache
- float result = test46();
- float n = test46_helper(floatPointField, floatPointField, pointField, floatPointField, floatPointField, pointField, floatPointField, 1, 2, 3, 4, 5, 6, 7);
+ float result;
+ float n;
+ try (ForceGCMarker m = ForceGCMarker.mark(warmup)) {
+ result = test46();
+ n = test46_helper(floatPointField, floatPointField, pointField, floatPointField, floatPointField, pointField, floatPointField, 1, 2, 3, 4, 5, 6, 7);
+ }
Asserts.assertEQ(result, n);
}
}
$ jtreg -DTestlist=test46 -DVerbose=true TestCallingConventionC1.java
stderr: [ stdout: [For random generator using seed: -673416091099034874
To re-run test with same seed value please add "-Djdk.test.lib.random.seed=-673416091099034874" to command line.
rI = -170, rL = -363
Starting test46
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f6b04c93c10, pid=8139, tid=8169
#
# JRE version: Java(TM) SE Runtime Environment (14.0) (fastdebug build 14-internal+0-adhoc.iklam.open)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 14-internal+0-adhoc.iklam.open, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x1052c10] frame::frame(long*, long*, long*, unsigned char*)+0x200
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P" (or dumping to /jdk2/tmp/jtreg/work/scratch/core.8139)
#
Unsupported internal testing APIs have been used.
# An error report file with more information is saved as:
# /jdk2/tmp/jtreg/work/scratch/hs_err_pid8139.log
Compiled method (c2) 970 171 4 compiler.valhalla.valuetypes.TestCallingConventionC1::test46 (34 bytes)
total in heap [0x00007f6aec217f90,0x00007f6aec218368] = 984
relocation [0x00007f6aec218118,0x00007f6aec218138] = 32
main code [0x00007f6aec218140,0x00007f6aec218240] = 256
stub code [0x00007f6aec218240,0x00007f6aec218268] = 40
oops [0x00007f6aec218268,0x00007f6aec218270] = 8
metadata [0x00007f6aec218270,0x00007f6aec218280] = 16
scopes data [0x00007f6aec218280,0x00007f6aec2182a8] = 40
scopes pcs [0x00007f6aec2182a8,0x00007f6aec218348] = 160
dependencies [0x00007f6aec218348,0x00007f6aec218350] = 8
handler table [0x00007f6aec218350,0x00007f6aec218368] = 24
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 8169
Dumping core ...
Current thread (0x00007f6ac8003000): GCTaskThread "GC Thread#2" [stack: 0x00007f6ac2c14000,0x00007f6ac2d14000] [id=8169]
Stack: [0x00007f6ac2c14000,0x00007f6ac2d14000], sp=0x00007f6ac2d119d0, free space=1014k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x1052c10] frame::frame(long*, long*, long*, unsigned char*)+0x200
V [libjvm.so+0x105106e] frame::sender(RegisterMap*) const+0x2ae
V [libjvm.so+0x1be7230] JavaThread::nmethods_do(CodeBlobClosure*) [clone .part.78]+0xa0
V [libjvm.so+0x1bf22f9] Threads::possibly_parallel_threads_do(bool, ThreadClosure*)+0xa9
V [libjvm.so+0x1a5ba30] ParallelSPCleanupTask::work(unsigned int)+0x30
V [libjvm.so+0x1d57370] GangWorker::loop()+0xe0
V [libjvm.so+0x1bf5516] Thread::call_run()+0xf6
V [libjvm.so+0x18d496e] thread_native_entry(Thread*)+0x10e
- relates to
-
JDK-8222717 [lworld] Calling convention - repair C1 stack
-
- Resolved
-