dragonwell-project / dragonwell11

Alibaba Dragonwell11 JDK
https://www.aliyun.com/product/dragonwell
GNU General Public License v2.0
552 stars 111 forks source link

[extended]-XX:+UseCompactObjectHeaders选项下runtime/FieldLayout/ArrayBaseOffsets.java#no-coh-no-ccp报错java.lang.RuntimeException: Misplaced boolean array base: expected 24 to equal 12 #812

Closed sendaoYan closed 2 months ago

sendaoYan commented 2 months ago

https://tone.aliyun-inc.com/ws/xesljfzh/test_result/306039?tab=1
https://tone.aliyun-inc.com/ws/xesljfzh/test_result/306041?tab=3
【环境准备】

登录环境:
ssh  -o ServerAliveInterval=60 dongzhichun@123.57.155.11

BINARY_URL=oss://dragonwell/11.0.23.20.9-test-dragonwell_extended/Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_linux.tar.gz
TEST_IMAGE=oss://dragonwell/11.0.23.20.9-test-dragonwell_extended/Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_linux-testimage.tar.gz
JTREG_URL=oss://compiler-ci-bucket/jdk/tools/jtreg-6.1.1.zip
JDK_REPO=git@github.com:dragonwell-project/dragonwell11.git
JDK_BRANCH=dragonwell_extended-11.0.23.20.9
cd ~/tone/tone-matrix-compiler/common; ./ossutil.bin_$(arch) -i;cd -
alias oss="~/tone/tone-matrix-compiler/common/ossutil.bin_$(arch) -e oss-cn-shanghai.aliyuncs.com -u jvmcloud-b  ~/tone/tone-matrix-compiler/common/ossutil_bin/ossutil -o download -f -r"

部署二进制:
oss $BINARY_URL -l ${BINARY_URL##*/}
mkdir bin-dragonwell11;tar -xf ${BINARY_URL##*/} -C bin-dragonwell11
oss $TEST_IMAGE -l ${TEST_IMAGE##*/}
mkdir iamges-dragonwell11;tar -xf ${TEST_IMAGE##*/} -C images-dragonwell11

cd bin-dragonwell11/dragonwell-11.0.22.19+7-ga/ && export JAVA_HOME=$PWD ; export PATH=$JAVA_HOME/bin:$PATH ; export TEST_JDK_HOME=$JAVA_HOME && cd -

部署jtreg工具:
oss $JTREG_URL -l ${JTREG_URL##*/};unzip ${JTREG_URL##*/}
cd jtreg ;export JT_HOME=$PWD ; export PATH=$PWD/bin:$PATH;cd -

部署用例repo
git clone -b $JDK_BRANCH $JDK_REPO jdk-repo-dragonwell11

执行以下命令:

test="jdk-repo-dragonwell11/test/hotspot/jtreg/runtime/FieldLayout/ArrayBaseOffsets.java"
args="-XX:+UseCompactObjectHeaders"
native=-nativepath:images-dragonwell11/dragonwell-11.0.22.19+7-ga-test-image/hotspot/jtreg/native

涉及子项:
runtime/FieldLayout/ArrayBaseOffsets.java#no-coh-no-ccp
runtime/FieldLayout/ArrayBaseOffsets.java#no-coh-with-ccp

x86_64和aarch64均失败,不带选项均成功,以下验证以x86_64为例

【对比测试】
dragonwell 11.0.22.19.7同样失败 不带选项成功
oss://dragonwell/11.0.22.19.7/Alibaba_Dragonwell_Extended_11.0.22.19.7_x64_linux.tar.gz

[dongzhichun@CompilerTest-x64-4 bin]$ ./java -version;./java -Xinternalversion
openjdk version "11.0.22.19" 2024-01-16
OpenJDK Runtime Environment (Alibaba Dragonwell Extended Edition)-11.0.22.19+7-ga (build 11.0.22.19+7)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Extended Edition)-11.0.22.19+7-ga (build 11.0.22.19+7, mixed mode)
OpenJDK 64-Bit Server VM (11.0.22.19+7) for linux-amd64 JRE (11.0.22.19+7), built on Mar  5 2024 03:38:35 by "" with gcc 7.5.0

dragonwell 11.0.21.18.9 同样失败 不带选项成功
oss://dragonwell/11.0.21.18.9/Alibaba_Dragonwell_Extended_11.0.21.18.9_x64_linux.tar.gz

[dongzhichun@CompilerTest-x64-4 bin]$ ./java -version;./java -Xinternalversion
openjdk version "11.0.21.18" 2023-10-17
OpenJDK Runtime Environment (Alibaba Dragonwell Extended Edition)-11.0.21.18+9-GA (build 11.0.21.18+9)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Extended Edition)-11.0.21.18+9-GA (build 11.0.21.18+9, mixed mode)
OpenJDK 64-Bit Server VM (11.0.21.18+9) for linux-amd64 JRE (11.0.21.18+9), built on Jan  4 2024 12:56:46 by "" with gcc 7.5.0

【用例日志】

STDERR:
java.lang.RuntimeException: Misplaced boolean array base: expected 24 to equal 12
    at jdk.test.lib.Asserts.fail(Asserts.java:594)
    at jdk.test.lib.Asserts.assertEquals(Asserts.java:205)
    at ArrayBaseOffsets.main(ArrayBaseOffsets.java:92)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
    at java.base/java.lang.Thread.run(Thread.java:955)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Misplaced boolean array base: expected 24 to equal 12
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Misplaced boolean array base: expected 24 to equal 12

【版本信息】

[dongzhichun@CompilerTest-x64-4 TEST_DRAGONWELL11]$ uname -a ; cat /etc/os-release ; free -h ; lscpu | head -n 25 ; java -version ; java -Xinternalversion
Linux CompilerTest-x64-4 5.10.134-16.1.al8.x86_64 #1 SMP Thu Dec 7 14:11:24 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
NAME="Alibaba Cloud Linux"
VERSION="3 (Soaring Falcon)"
ID="alinux"
ID_LIKE="rhel fedora centos anolis"
VERSION_ID="3"
UPDATE_ID="9"
PLATFORM_ID="platform:al8"
PRETTY_NAME="Alibaba Cloud Linux 3 (Soaring Falcon)"
ANSI_COLOR="0;31"
HOME_URL="https://www.aliyun.com/"

              total        used        free      shared  buff/cache   available
Mem:          123Gi       1.1Gi       111Gi       3.0Mi        11Gi       121Gi
Swap:            0B          0B          0B
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              32
On-line CPU(s) list: 0-31
Thread(s) per core:  2
Core(s) per socket:  16
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               106
Model name:          Intel(R) Xeon(R) Platinum 8369B CPU @ 2.70GHz
Stepping:            6
CPU MHz:             3524.173
BogoMIPS:            5399.99
Hypervisor vendor:   KVM
Virtualization type: full
L1d cache:           48K
L1i cache:           32K
L2 cache:            1280K
L3 cache:            49152K
NUMA node0 CPU(s):   0-31
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves wbnoinvd arat avx512vbmi pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm arch_capabilities
openjdk version "11.0.23.19" 2024-04-16
OpenJDK Runtime Environment (Alibaba Dragonwell Extended Edition)-11.0.22.19+7-ga (build 11.0.23.19+7)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Extended Edition)-11.0.22.19+7-ga (build 11.0.23.19+7, mixed mode)
OpenJDK 64-Bit Server VM (11.0.23.19+7) for linux-amd64 JRE (11.0.23.19+7), built on Apr 26 2024 02:45:40 by "" with gcc 7.5.0
sendaoYan commented 2 months ago

修复建议: image

sendaoYan commented 2 months ago
yansendao@j66e07344:[dragonwell11-ysd]> . ~/compiler-test/aqa-tests/11.sh ; . ~/tone/tone-matrix-compiler/common/common.sh ; . ~/compiler-test/common.sh 
yansendao@j66e07344:[dragonwell11-ysd]> j -XX:+UseCompactObjectHeaders test/hotspot/jtreg/runtime/FieldLayout/ArrayBaseOffsets.java
~/software/jdk/2024-05/dragonwell-11.0.22.19+7-ga/bin/java
Directory "tmp" not found: creating
--------------------------------------------------
TEST: runtime/FieldLayout/ArrayBaseOffsets.java#with-coh-no-coops
TEST RESULT: Passed. Execution successful
--------------------------------------------------
TEST: runtime/FieldLayout/ArrayBaseOffsets.java#with-coh-with-coops
TEST RESULT: Passed. Execution successful
--------------------------------------------------
Test results: passed: 2
Results written to /home/yansendao/git/dragonwell11-ysd/tmp

real    0m7.514s
user    0m23.556s
sys     0m1.062s
yansendao@j66e07344:[dragonwell11-ysd]> j -XX:-UseCompactObjectHeaders test/hotspot/jtreg/runtime/FieldLayout/ArrayBaseOffsets.java
~/software/jdk/2024-05/dragonwell-11.0.22.19+7-ga/bin/java
Directory "tmp" not found: creating
--------------------------------------------------
TEST: runtime/FieldLayout/ArrayBaseOffsets.java#no-coh-no-ccp
TEST RESULT: Passed. Execution successful
--------------------------------------------------
TEST: runtime/FieldLayout/ArrayBaseOffsets.java#no-coh-with-ccp
TEST RESULT: Passed. Execution successful
--------------------------------------------------
TEST: runtime/FieldLayout/ArrayBaseOffsets.java#with-coh-no-coops
TEST RESULT: Passed. Execution successful
--------------------------------------------------
TEST: runtime/FieldLayout/ArrayBaseOffsets.java#with-coh-with-coops
TEST RESULT: Passed. Execution successful
--------------------------------------------------
Test results: passed: 4
Results written to /home/yansendao/git/dragonwell11-ysd/tmp

real    0m10.199s
user    0m31.603s
sys     0m1.600s
yansendao@j66e07344:[dragonwell11-ysd]> j test/hotspot/jtreg/runtime/FieldLayout/ArrayBaseOffsets.java
~/software/jdk/2024-05/dragonwell-11.0.22.19+7-ga/bin/java
Directory "tmp" not found: creating
--------------------------------------------------
TEST: runtime/FieldLayout/ArrayBaseOffsets.java#no-coh-no-ccp
TEST RESULT: Passed. Execution successful
--------------------------------------------------
TEST: runtime/FieldLayout/ArrayBaseOffsets.java#no-coh-with-ccp
TEST RESULT: Passed. Execution successful
--------------------------------------------------
TEST: runtime/FieldLayout/ArrayBaseOffsets.java#with-coh-no-coops
TEST RESULT: Passed. Execution successful
--------------------------------------------------
TEST: runtime/FieldLayout/ArrayBaseOffsets.java#with-coh-with-coops
TEST RESULT: Passed. Execution successful
--------------------------------------------------
Test results: passed: 4
Results written to /home/yansendao/git/dragonwell11-ysd/tmp

real    0m10.121s
user    0m31.320s
sys     0m1.541s
yansendao@j66e07344:[dragonwell11-ysd]> uname -a ; cat /etc/os-release ; free -h ; lscpu | head -n 25 ; java -version ; java -Xinternalversion
Linux j66e07344.sqa.eu95 5.10.134-16.1.al8.x86_64 #1 SMP Thu Dec 7 14:11:24 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
NAME="Alibaba Cloud Linux"
VERSION="3 (Soaring Falcon)"
ID="alinux"
ID_LIKE="rhel fedora centos anolis"
VERSION_ID="3"
UPDATE_ID="9"
PLATFORM_ID="platform:al8"
PRETTY_NAME="Alibaba Cloud Linux 3 (Soaring Falcon)"
ANSI_COLOR="0;31"
HOME_URL="https://www.aliyun.com/"

              total        used        free      shared  buff/cache   available
Mem:          187Gi       5.5Gi        57Gi       482Mi       124Gi       180Gi
Swap:            0B          0B          0B
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              96
On-line CPU(s) list: 0-95
Thread(s) per core:  2
Core(s) per socket:  24
Socket(s):           2
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               85
Model name:          Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
Stepping:            4
CPU MHz:             1228.236
CPU max MHz:         3100.0000
CPU min MHz:         1000.0000
BogoMIPS:            5000.00
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            1024K
L3 cache:            33792K
NUMA node0 CPU(s):   0-95
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke md_clear flush_l1d
openjdk version "11.0.23.19" 2024-04-16
OpenJDK Runtime Environment (Alibaba Dragonwell Extended Edition)-11.0.22.19+7-ga (build 11.0.23.19+7)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Extended Edition)-11.0.22.19+7-ga (build 11.0.23.19+7, mixed mode)
OpenJDK 64-Bit Server VM (11.0.23.19+7) for linux-amd64 JRE (11.0.23.19+7), built on Apr 26 2024 02:45:40 by "" with gcc 7.5.0