dragonwell-project / dragonwell21

GNU General Public License v2.0
66 stars 19 forks source link

x64平台-Xcomp -XX:TieredStopAtLevel=1选项tools/javac/warnings/Serial/CtorAccess.java随机失败Could not initialize class jdk.internal.module.SystemModuleFinders$SystemImage #4

Open sendaoYan opened 11 months ago

sendaoYan commented 11 months ago

https://tone.aliyun-inc.com/ws/xesljfzh/test_result/244256

【环境准备】

wget -O binary.tar.gz https://dragonwell.oss-cn-shanghai.aliyuncs.com/test-59/OpenJDK21U-jdk_x64_linux_dragonwell_2023-11-02-02-07.tar.gz
wget -O test-images.tar.gz https://dragonwell.oss-cn-shanghai.aliyuncs.com/test-59/OpenJDK21U-testimage_x64_linux_dragonwell_2023-11-02-02-07.tar.gz
wget -O jtreg.zip https://compiler-ci-bucket.oss-cn-hangzhou.aliyuncs.com/jdk/tools/jtreg-7.3.1.zip
git clone https://github.com/dragonwell-project/dragonwell21.git -b wip_dragonwell_standard_merge_branch jdk-repo

mkdir binary-download 
tar xzvf binary.tar.gz -C binary-download ; cd binary-download && export JAVA_HOME=$PWD ; export PATH=$JAVA_HOME/bin:$PATH ; export TEST_JDK_HOME=$JAVA_HOME &&cd -
make test-images ; tar xzvf test-images.tar.gz -C test-images
unzip jtreg.zip; cd jtreg ; export JT_HOME=$PWD ; export PATH=$PWD/bin:$PATH ; cd -

test=\
tools/javac/warnings/Serial/CtorAccess.java
args='-Xcomp -XX:TieredStopAtLevel=1'
native='-nativepath:./test-images/hotspot/jtreg/native'

jtreg -w jt-work -nr -v:fail,error $native $args $test

tools/javac/warnings/Serial/CtorAccess.java tools/javac/warnings/Serial/Extern.java

Tone能复现出来. 手工复现不出来. 上游,如果用Tone测试也是一定出现. 手工同样不能复现.

【对比测试】

dragonwell21 release无

temurin21 同样问题 wget https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jdk_x64_linux_hotspot_21.0.1_12.tar.gz

openjdk version "21.0.1" 2023-10-17 LTS
OpenJDK Runtime Environment Temurin-21.0.1+12 (build 21.0.1+12-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.1+12 (build 21.0.1+12-LTS, mixed mode, sharing)
OpenJDK 64-Bit Server VM (21.0.1+12-LTS) for linux JRE (21.0.1+12-LTS), built on 2023-10-17T00:00:00Z by "admin" with gcc 11.2.0

【用例日志】

Tone完整日志: 完整日志.txt

ACTION: compile -- Failed. Compilation failed: Compilation failed
REASON: User specified action: run compile/ref=empty.out -XDrawDiagnostics CtorAccess.java
TIME:   0.681 seconds
messages:
command: compile -XDrawDiagnostics /tmp/tone/run/jtreg/jdk-repo/test/langtools/tools/javac/warnings/Serial/CtorAccess.java
reason: User specified action: run compile/ref=empty.out -XDrawDiagnostics CtorAccess.java
started: Fri Nov 17 12:35:37 CST 2023
Mode: othervm
finished: Fri Nov 17 12:35:38 CST 2023
elapsed time (seconds): 0.681
configuration:
javac compilation environment
  source path: /tmp/tone/run/jtreg/jdk-repo/test/langtools/tools/javac/warnings/Serial
  class path:  /tmp/tone/run/jtreg/jdk-repo/test/langtools/tools/javac/warnings/Serial
               /tmp/tone/run/jtreg/jt-work/test_langtools/classes/252/tools/javac/warnings/Serial/CtorAccess.d

STDERR:
Error: Unable to load main class com.sun.tools.javac.Main in module jdk.compiler
        java.lang.ExceptionInInitializerError: null
Runtime.exit(1) logging failed: Could not initialize class jdk.internal.module.SystemModuleFinders$SystemImage

TEST RESULT: Failed. Compilation failed: Compilation failed

【版本信息】

[root@iZbp16m74odqar1qxg3ek1Z jtreg]# uname -a ; cat /etc/os-release ; free -h; lscpu| head -n 25;java -version; java -Xinternalversion
Linux iZbp16m74odqar1qxg3ek1Z 5.10.134-15.an8.x86_64 #1 SMP Thu Jul 20 00:35:47 CST 2023 x86_64 x86_64 x86_64 GNU/Linux
NAME="Anolis OS"
VERSION="8.8"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.8"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.8"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

              total        used        free      shared  buff/cache   available
Mem:          495Gi        21Gi       471Gi       2.0Mi       2.2Gi       471Gi
Swap:            0B          0B          0B
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              128
On-line CPU(s) list: 0-127
Thread(s) per core:  2
Core(s) per socket:  64
Socket(s):           1
NUMA node(s):        4
Vendor ID:           AuthenticAMD
BIOS Vendor ID:      Alibaba Cloud
CPU family:          25
Model:               1
Model name:          AMD EPYC 7T83 64-Core Processor
BIOS Model name:     pc-i440fx-2.1
Stepping:            1
CPU MHz:             3031.594
BogoMIPS:            5090.43
Hypervisor vendor:   KVM
Virtualization type: full
L1d cache:           32K
L1i cache:           32K
L2 cache:            512K
L3 cache:            32768K
NUMA node0 CPU(s):   0-31
openjdk version "21.0.1" 2023-10-17
OpenJDK Runtime Environment (Alibaba Dragonwell Standard Edition)-21.0.1.0.1+12-GA (build 21.0.1)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Standard Edition)-21.0.1.0.1+12-GA (build 21.0.1, mixed mode, sharing)
OpenJDK 64-Bit Server VM (21.0.1) for linux-amd64 JRE (21.0.1), built on 2023-10-17T00:00:00Z by "dragonwell" with gcc 11.2.0
sendaoYan commented 11 months ago

https://aone.alibaba-inc.com/v2/project/355606/bug/53319416# 《[dragonwell21]x64平台-Xcomp -XX:TieredStopAtLevel=1选项tools/javac/warnings/Serial/CtorAccess.java随机失败Could not initialize class jdk.internal.module.SystemModuleFinders$SystemImage》

sendaoYan commented 11 months ago

https://tone.aliyun-inc.com/ws/xesljfzh/test_result/247583?tab=2 复现了1次:tools/javac/warnings/Serial/Extern.java

sendaoYan commented 11 months ago

https://tone.aliyun-inc.com/ws/xesljfzh/test_result/247547?tab=2 复现了3次: tools/javac/warnings/Serial/EnumSerial.java java.lang.InternalError: platform encoding not initialized tools/javac/warnings/Serial/CtorAccess.java Could not initialize class jdk.internal.module.SystemModuleFinders$SystemImage tools/javac/warnings/Serial/Extern.java Could not initialize class jdk.internal.module.SystemModuleFinders$SystemImage

sendaoYan commented 11 months ago

-XX:-UseCompressedOops也能复现 https://tone.aliyun-inc.com/ws/xesljfzh/test_result/248336

Error occurred during initialization of VM
java.lang.InternalError: platform encoding not initialized
    at jdk.internal.util.SystemProps$Raw.platformProperties(java.base/Native Method)
    at jdk.internal.util.SystemProps$Raw.<init>(java.base/SystemProps.java:263)
    at jdk.internal.util.SystemProps.initProperties(java.base/SystemProps.java:67)
    at java.lang.System.initPhase1(java.base/System.java:2162)