dragonwell-project / dragonwell11

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

[dragonwell11][extended][riscv64]jdk/jshell/JdiFailingListenExecutionControlTest.java用例随机报错 vmexec=vmexec=java} expected [true] but found [false] #792

Closed sendaoYan closed 5 months ago

sendaoYan commented 5 months ago

https://tone.aliyun-inc.com/ws/xesljfzh/test_result/281756?tab=1

【环境准备】

BINARY_URL=https://dragonwell.oss-cn-shanghai.aliyuncs.com/11.0.22.19.7-test-dragonwell_extended/Alibaba_Dragonwell_Extended_11.0.22.19.7_riscv64_linux.tar.gz
TEST_IMAGE=https://dragonwell.oss-cn-shanghai.aliyuncs.com/11.0.22.19.7-test-dragonwell_extended/Alibaba_Dragonwell_Extended_11.0.22.19.7_riscv64_linux-testimage.tar.gz

wget -O binary.tar.gz  $BINARY_URL
wget  -O test-image.tar.gz $TEST_IMAGE

mkdir binary-download && mkdir test-image

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

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 -

JDK_REPO=git@github.com:dragonwell-project/dragonwell11.git 
JDK_BRANCH=dragonwell_extended-11.0.22.19.7 

git clone ${JDK_REPO} --depth 1 -b $JDK_BRANCH jdk-repo

native=-nativepath:./test-image/hotspot/jtreg/native
args="-Xmixed"
test=jdk/jshell/JdiFailingLaunchExecutionControlTest.java

nproc=`nproc` ; dir="jt-work" ; rm -rf $dir ; mkdir -p $dir ; time seq 100 | xargs -i -n 1 -P  $nproc bash -c " \
jtreg  -nr -v:fail,error,all -w tmp $args $native $test \
&> $dir/test_{} ; grep 'Test results: passed: 1' -L $dir/test_{} "

类似用例:
jdk/jshell/JdiFailingListenExecutionControlTest.java
运行100次出现3次fail
jdk/jshell/JdiFailingLaunchExecutionControlTest.java
运行100次出现23次fail

【对比测试】
release 同样问题:wget https://dragonwell.oss-cn-shanghai.aliyuncs.com/11.0.21.18.9/Alibaba_Dragonwell_Extended_11.0.21.18.9_riscv64_linux.tar.gz

[root@fedora-riscv 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-riscv64 JRE (11.0.21.18+9), built on Jan  4 2024 12:35:45 by "" with gcc 9.2.0

【用例日志】

STDOUT:
test JdiFailingLaunchExecutionControlTest.failLaunchTest(): failure
java.lang.AssertionError: Launching JShell execution engine threw: Failed remote launch: java.util.concurrent.TimeoutException @ com.sun.jdi.CommandLineLaunch (defaults: home=/home/wanqian/dragonwell-11.0.21.18+9-GA, options=, main=, suspend=true, quote=", vmexec=java) -- {home=home=/home/wanqian/dragonwell-11.0.21.18+9-GA, options=options=, main=main=DyingRemoteAgent 44997, suspend=suspend=true, quote=quote=", vmexec=vmexec=java} expected [true] but found [false]
        at org.testng.Assert.fail(Assert.java:99)
        at org.testng.Assert.failNotEquals(Assert.java:1037)
        at org.testng.Assert.assertTrue(Assert.java:45)
        at JdiFailingLaunchExecutionControlTest.failLaunchTest(JdiFailingLaunchExecutionControlTest.java:47)
        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 org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
        at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
        at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
        at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
        at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
        at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
        at org.testng.TestRunner.privateRun(TestRunner.java:764)
        at org.testng.TestRunner.run(TestRunner.java:585)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
        at org.testng.SuiteRunner.run(SuiteRunner.java:286)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
        at org.testng.TestNG.runSuites(TestNG.java:1069)
        at org.testng.TestNG.run(TestNG.java:1037)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
        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)

===============================================
jdk/jshell/JdiFailingLaunchExecutionControlTest.java
Total tests run: 1, Passes: 0, Failures: 1, Skips: 0
===============================================

STDERR:
java.lang.Exception: failures: 1
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
        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.Exception: failures: 1
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.Exception: failures: 1

【版本信息】

[root@fedora-riscv bin]# uname -a ; cat /etc/os-release ; free -h; lscpu| head -n 25;./java -version; ./java -Xinternalversion
Linux fedora-riscv 6.1.22 #2 SMP Thu May  4 19:24:40 CST 2023 riscv64 GNU/Linux
NAME="Fedora Linux"
VERSION="38 (Workstation Edition)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora Linux 38 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=38
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=38
SUPPORT_END=2024-05-14
VARIANT="Workstation Edition"
VARIANT_ID=workstation
               total        used        free      shared  buff/cache   available
Mem:            62Gi       1.8Gi        39Gi        32Mi        21Gi        60Gi
Swap:          8.0Gi        40Mi       8.0Gi
Architecture:        riscv64
Byte Order:          Little Endian
CPU(s):              64
On-line CPU(s) list: 0-63
NUMA node(s):        4
NUMA node0 CPU(s):   1-8,16-23
NUMA node1 CPU(s):   0,9-15,24-31
NUMA node2 CPU(s):   32-39,48-55
NUMA node3 CPU(s):   40-47,56-63
openjdk version "11.0.22.18" 2024-01-16
OpenJDK Runtime Environment (Alibaba Dragonwell Extended Edition)-11.0.21.18+9-GA (build 11.0.22.18+9)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Extended Edition)-11.0.21.18+9-GA (build 11.0.22.18+9, mixed mode)
OpenJDK 64-Bit Server VM (11.0.22.18+9) for linux-riscv64 JRE (11.0.22.18+9), built on Feb  8 2024 03:56:07 by "" with gcc 9.2.0
sendaoYan commented 5 months ago

https://aone.alibaba-inc.com/v2/project/355606/bug/55127173# 《[dragonwell11][extended][riscv64]jdk/jshell/JdiFailingListenExecutionControlTest.java用例 vmexec=vmexec=java} expected [true] but found [false]》