dragonwell-project / dragonwell11

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

[TESTBUG]test/lib/jdk/test/lib/process/ProcessTools.java编译失败 #731

Closed sendaoYan closed 9 months ago

sendaoYan commented 11 months ago

上游删除了public static ProcessBuilder createJavaProcessBuilder(boolean addTestVmAndJavaOptions, String... command)接口,git commit 8528c520a079c34ac2a5a3334024aa1050afe393

https://tone.aliyun-inc.com/ws/xesljfzh/test_result/254886 https://tone.aliyun-inc.com/ws/xesljfzh/test_result/254887 【环境准备】

wget -O binary.tar.gz https://dragonwell.oss-cn-shanghai.aliyuncs.com/test-56/OpenJDK11U-jdk_aarch64_linux_dragonwell_2023-11-20-06-42.tar.gz
wget  -O test-images.tar.gz https://dragonwell.oss-cn-shanghai.aliyuncs.com/test-56/OpenJDK11U-testimage_aarch64_linux_dragonwell_2023-11-20-06-42.tar.gz

mkdir binary-download && mkdir test-images

tar xzvf binary.tar.gz -C binary-download
tar xzvf test-images.tar.gz -C test-images

cd binary-download && export JAVA_HOME=$PWD ; export PATH=$JAVA_HOME/bin:$PATH ; export TEST_JDK_HOME=$JAVA_HOME && cd -

wget -O jtreg.zip http://114.55.64.175:8666/compiler-ci-bucket/tools/jtreg-6.1.1.zip
unzip jtreg.zip
cd jtreg 
export JT_HOME=$PWD ; export PATH=$PWD/bin:$PATH
cd -

git clone https://github.com/dragonwell-project/dragonwell11.git jdk-repo -b wip_dragonwell_extended_merge_branch jdk-repo

native=-nativepath:./test-images/hotspot/jtreg/native
args='-Xmixed'
test=jdk-repo/test/jdk/com/alibaba/cds/TestDumpAndLoadClassWithDifferentCP.java

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

类似用例: com/alibaba/cds/TestDumpAndLoadClass.java com/alibaba/cds/TestDumpAndLoadClassWithDifferentCP.java com/alibaba/cds/TestDumpAndLoadClassWithException.java com/alibaba/cds/TestDumpAndLoadClassWithNullURL.java com/alibaba/cds/TestDumpAndLoadClassWithWisp.java com/alibaba/cds/TestDumpAndLoadNotFound.java com/alibaba/cds/TestDumpAndLoadVerficationFailure.java com/alibaba/cds/TestDumpListInParallel.java com/alibaba/cds/TestDumpUnsupportedCheck.java com/alibaba/cds/TestLoadClassFlow.java com/alibaba/cds/TestWispWithAppCDS.java

com/alibaba/quickstart/TestMultiVersionedJar.java 还有一个用例,只在x86-64上有: runtime/eagerappcds/TestClassLoaderWithJVMTIAgent.java 同样问题.

【对比测试】

dragonwell11 release版本同样错误. wget https://dragonwell.oss-cn-shanghai.aliyuncs.com/11.0.20.16.8/Alibaba_Dragonwell_Extended_11.0.20.16.8_aarch64_linux.tar.gz

[root@VM20210305-10 bin]# ./java -version ; ./java -Xinternalversion
openjdk version "11.0.20.16" 2023-07-18
OpenJDK Runtime Environment (Alibaba Dragonwell Extended Edition)-11.0.20.16+8-GA (build 11.0.20.16+8)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Extended Edition)-11.0.20.16+8-GA (build 11.0.20.16+8, mixed mode)
OpenJDK 64-Bit Server VM (11.0.20.16+8) for linux-aarch64 JRE (11.0.20.16+8), built on Aug  8 2023 07:58:33 by "" with gcc 7.5.0

temurin11 没有相关模块. wget http://114.55.64.175:8666/compiler-ci-bucket/openjdk/jdk-11.0.21-ga/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.21_9.tar.gz

STDERR:
/disk1/d11/jdk-repo/test/jdk/com/alibaba/cds/Classes4CDS.java:24: error: package com.alibaba.util does not exist
import com.alibaba.util.QuickStart;
                       ^
/disk1/d11/jdk-repo/test/jdk/com/alibaba/cds/Classes4CDS.java:25: error: package com.alibaba.util does not exist
import com.alibaba.util.Utils;
                       ^
/disk1/d11/jdk-repo/test/jdk/com/alibaba/cds/Classes4CDS.java:41: error: cannot find symbol
                Path.of(Utils.getJDKHome(), "lib", QuickStart.getServerlessAdapter()).toString(),
                        ^
  symbol:   variable Utils
  location: class Classes4CDS
/disk1/d11/jdk-repo/test/jdk/com/alibaba/cds/Classes4CDS.java:41: error: cannot find symbol
                Path.of(Utils.getJDKHome(), "lib", QuickStart.getServerlessAdapter()).toString(),
                                                   ^
  symbol:   variable QuickStart
  location: class Classes4CDS
4 errors
[root@VM20210305-10 bin]# ./java -version ; ./java -Xinternalversion
openjdk version "11.0.21" 2023-10-17
OpenJDK Runtime Environment Temurin-11.0.21+9 (build 11.0.21+9)
OpenJDK 64-Bit Server VM Temurin-11.0.21+9 (build 11.0.21+9, mixed mode)
OpenJDK 64-Bit Server VM (11.0.21+9) for linux-aarch64 JRE (11.0.21+9), built on Oct 17 2023 21:44:42 by "" with gcc 7.5.0

【用例日志】

configuration:
javac compilation environment
  add modules: java.base java.management jdk.jartool jdk.compiler
  add exports: java.base/jdk.internal.loader ALL-UNNAMED
               java.base/jdk.internal.misc   ALL-UNNAMED
               jdk.jartool/sun.tools.jar     ALL-UNNAMED
  source path: /disk1/d11/jdk-repo/test/jdk/com/alibaba/cds
               /disk1/d11/jdk-repo/test/jdk/lib/testlibrary
               /disk1/d11/jdk-repo/test/lib
  class path:  /disk1/d11/jdk-repo/test/jdk/com/alibaba/cds
               /disk1/d11/tmp/classes/com/alibaba/cds/TestDumpAndLoadClassWithDifferentCP.d
               /disk1/d11/tmp/classes/lib/testlibrary
               /disk1/d11/tmp/classes/test/lib
STDERR:
/disk1/d11/jdk-repo/test/jdk/com/alibaba/cds/Classes4CDS.java:37: error: method createJavaProcessBuilder in class ProcessTools cannot be applied to given types;
        return ProcessTools.createJavaProcessBuilder(true,
                           ^
  required: String[]
  found: boolean,String,String,String,String,String,String,String
  reason: varargs mismatch; boolean cannot be converted to String
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error

【版本信息】

[root@VM20210305-10 bin]# uname -a ; cat /etc/os-release ; free -h; lscpu| head -n 25;./java -version; ./java -Xinternalversion
Linux VM20210305-10 4.19.91-26.an8.aarch64 #1 SMP Tue May 24 13:14:10 CST 2022 aarch64 aarch64 aarch64 GNU/Linux
NAME="Anolis OS"
VERSION="8.6"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.6"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.6"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

              total        used        free      shared  buff/cache   available
Mem:           15Gi       472Mi       230Mi       0.0Ki        14Gi        14Gi
Swap:            0B          0B          0B
Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per cluster: 4
Socket(s):           2
Cluster(s):          1
NUMA node(s):        1
Vendor ID:           HiSilicon
BIOS Vendor ID:      Alibaba Cloud
Model:               0
Model name:          Kunpeng-920
BIOS Model name:     virt-rhel7.6.0
Stepping:            0x1
BogoMIPS:            200.00
NUMA node0 CPU(s):   0-3
Flags:               fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp asimdfhm
openjdk version "11.0.22.17" 2024-01-16
OpenJDK Runtime Environment (Alibaba Dragonwell Extended Edition)-11.0.20.17+8-GA (build 11.0.22.17+8)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Extended Edition)-11.0.20.17+8-GA (build 11.0.22.17+8, mixed mode)
OpenJDK 64-Bit Server VM (11.0.22.17+8) for linux-aarch64 JRE (11.0.22.17+8), built on Nov 20 2023 06:49:00 by "" with gcc 7.5.0