dragonwell-project / dragonwell8

Alibaba Dragonwell8 JDK
http://dragonwell-jdk.io
GNU General Public License v2.0
4.21k stars 497 forks source link

[upstream]CR6672135.java intermittent fails Could not map vmid to user Name #693

Open sendaoYan opened 1 week ago

sendaoYan commented 1 week ago

http://ci.dragonwell-jdk.io/job/Test_openjdk8_dragonwell_extended.openjdk_aarch64_linux/173/consoleFull
【环境准备】

BINARY_URL=oss://dragonwell/8.23.22-test-dragonwell_standard/Alibaba_Dragonwell_Standard_8.23.22_aarch64_linux.tar.gz
JTREG_URL=oss://compiler-ci-bucket/jdk/tools/jtreg5.1-b01.zip
JDK_REPO=git@github.com:dragonwell-project/dragonwell8.git
JDK_BRANCH=dragonwell_standard-8.23.22
cd ~/tone/tone-matrix-compiler/common;./ossutil.bin_$(arch) -i;cd -
alias oss="~/tone/tone-matrix-compiler/common/ossutil.bin_$(arch) -e oss-cn-hangzhou.aliyuncs.com -u jvm_dev-b  ~/tone/tone-matrix-compiler/common/ossutil_bin/ossutil -o download -f -r"

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

部署jtreg工具:
oss $JTREG_URL -l ${JTREG_URL##*/};unzip ${JTREG_URL##*/}

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

执行以下命令:
cd bin-dragonwell8/dragonwell-8.20.21/ && export JAVA_HOME=$PWD ; export PATH=$JAVA_HOME/bin:$PATH ; export TEST_JDK_HOME=$JAVA_HOME && cd -
cd jtreg ;export JT_HOME=$PWD ; export PATH=$PWD/bin:$PATH;cd -

jtreg  -nr -v:fail,error -w tmp  -XX:-UseCompressedOops  jdk-repo-dragonwell8/jdk/test/sun/jvmstat/monitor/MonitoredVm/CR6672135.java

【测试分析】
-Xmixed选项同样问题,x64和aarch64都有问题 ,失败率3/100,复现命令

[dongzhichun@CompilerTest-aarch64-3 dragonwell8]$ function runJtreg() { jtreg -XX:+UseCompressedOops  -ea -esa -timeoutFactor:4 -v:fail,error,time,nopass -nr -w $dir/index-$1 $test &> $dir/$1.log ; if [[ 0 -ne $? ]] ; then echo -n "$1 " ; else rm -rf $dir/index-$1 $dir/$1.log ; fi ; } ; export -f runJtreg ; export dir="tmp-jtreg-"`basename ${test##* } .java | sed "s|#|_|"` ; rm -rf $dir ; mkdir -p $dir ; time seq 100 | xargs -i -n 1 -P 16 bash -c "runJtreg {}" ; echo total fail number: `ls $dir/*.log 2> /dev/null | wc | awk '{print $1}'`
27 73 76
real    0m11.419s
user    3m53.907s
sys     0m33.812s
total fail number: 3

【对比测试】

dragonwell8 release 同样问题  
oss://dragonwell/8.20.21/Alibaba_Dragonwell_Standard_8.20.21_aarch64_linux.tar.gz  

Temruin8 同样问题  
oss://compiler-ci-bucket/openjdk/jdk8u432-ga/OpenJDK8U-jdk_aarch64_linux_hotspot_8u432b06.tar.gz  

【用例日志】

STDERR:
java.lang.Error: Test failed
        at CR6672135.main(CR6672135.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
        at java.lang.Thread.run(Thread.java:750)
Caused by: sun.jvmstat.monitor.MonitorException: 2469637 not found
        at sun.jvmstat.perfdata.monitor.protocol.local.PerfDataBuffer.<init>(PerfDataBuffer.java:84)
        at sun.jvmstat.perfdata.monitor.protocol.local.LocalMonitoredVm.<init>(LocalMonitoredVm.java:68)
        at sun.jvmstat.perfdata.monitor.protocol.local.MonitoredHostProvider.getMonitoredVm(MonitoredHostProvider.java:77)
        at sun.jvmstat.perfdata.monitor.protocol.local.MonitoredHostProvider.getMonitoredVm(MonitoredHostProvider.java:67)
        at CR6672135.main(CR6672135.java:53)
        ... 6 more
Caused by: java.lang.IllegalArgumentException: Could not map vmid to user Name
        at sun.misc.Perf.attach(Native Method)
        at sun.misc.Perf.attachImpl(Perf.java:270)
        at sun.misc.Perf.attach(Perf.java:200)
        at sun.jvmstat.perfdata.monitor.protocol.local.PerfDataBuffer.<init>(PerfDataBuffer.java:64)
        ... 10 more

JavaTest Message: Test threw exception: java.lang.Error: Test failed
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.Error: Test failed

【jdk版本】

 java -version;java -Xinternalversion
openjdk version "1.8.0_422"
OpenJDK Runtime Environment (Alibaba Dragonwell Standard Edition 8.20.21) (build 1.8.0_422-b01)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Standard Edition 8.20.21) (build 25.422-b01, mixed mode)
OpenJDK 64-Bit Server VM (25.422-b01) for linux-aarch64 JRE (1.8.0_422-b01), built on Nov  8 2024 23:58:59 by "jenkins" with gcc 7.5.0

【系统版本信息】

uname -a ; cat /etc/os-release ; free -h ; lscpu | head -n 25
Linux CompilerTest-aarch64-3 5.10.134-16.1.al8.aarch64 #1 SMP Thu Dec 7 22:04:51 CST 2023 aarch64 aarch64 aarch64 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:          122Gi       1.1Gi       118Gi       0.0Ki       2.7Gi       120Gi
Swap:            0B          0B          0B
Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              32
On-line CPU(s) list: 0-31
Thread(s) per core:  1
Core(s) per socket:  32
Socket(s):           1
NUMA node(s):        1
Vendor ID:           ARM
Model:               0
Model name:          Neoverse-N2
Stepping:            r0p0
CPU MHz:             3000.000
CPU max MHz:         3000.0000
CPU min MHz:         3000.0000
BogoMIPS:            100.00
L1d cache:           64K
L1i cache:           64K
L2 cache:            1024K
L3 cache:            65536K
NUMA node0 CPU(s):   0-31
Flags:               fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh
sendaoYan commented 1 week ago

https://code.alibaba-inc.com/os-quality/tone-matrix-compiler/codereview/19121057

sendaoYan commented 1 week ago

https://github.com/adoptium/aqa-tests/pull/5742