dragonwell-releng / dragonwell-adoptium

0 stars 0 forks source link

【AJDK8】nightly相关docker的5个测试用例失败,上游都是成功的. #323

Closed owanqian closed 10 months ago

owanqian commented 10 months ago

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

【环境准备】

wget -O binary.tar.gz http://114.55.64.175:8666/compiler-ci-bucket/ajdk8/20231208-161641-670-%23806-linux.aarch64.release.master-f444a55b2c0352fe75e25dfc4c0829226521afdf.tar.gz
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 -

wget -nv http://114.55.64.175:8666/compiler-ci-bucket/tools/jtreg5.1-b01.zip -O jtreg.zip
unzip jtreg.zip
cd jtreg 
export JT_HOME=$PWD ; export PATH=$PWD/bin:$PATH
cd -
git clone -b master https://codeup.aliyun.com/5f4e0dfe6207a1a8b17fa7cf/compiler-test/jdk11.git jdk-repo
test=runtime/containers/docker/TestMemoryAwareness.java 
args='-Xmixed'
jtreg -w tmp -nr -v:fail,error $args $test

【对比测试】

对于TestDockerMemoryMetrics.java,虽然dragonwell8和Temurin8也是失败的, 但是失败的只是失败其中的一项. log详情看log记录.

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

测试用例 | ajdk8 nightly | ajdk8 release | dragonwell8 | Temurin8 -- | -- | -- | -- | -- runtime/containers/docker/TestMemoryAwareness.java | fail (x86/arm) | fail (x86/arm) | pass | pass jdk/internal/platform/docker/TestDockerBasic.java | fail (arm) | fail (arm) | pass | pass jdk/internal/platform/docker/TestDockerMemoryMetrics.java | 96%概率fail (x86/arm) | 96%概率fail (x86/arm) | 90%概率fail (x86/arm) | 80%概率fail (x86/arm) jdk/internal/platform/docker/TestGetFreeSwapSpaceSize.java | fail (x86/arm) | fail (x86/arm) | pass | pass jdk/internal/platform/docker/TestSystemMetrics.java | fail (arm) | fail (arm) | pass | pass

ajdk8 release wget http://114.55.64.175:8666/ajdk-backup/8.21.25/OpenJDK8U-jdk_aarch64_linux_ajdk_2023-10-13-03-56.tar.gz

[root@iZbp1ddr8foowyz5wmk9u1Z bin]# ./java -version; ./java -Xinternalversion
openjdk version "1.8.0_382"
OpenJDK Runtime Environment (Alibaba 8.21.25) (build 1.8.0_382-b0)
OpenJDK 64-Bit Server VM (Alibaba 8.21.25) (build 25.382-b0-internal, mixed mode)
OpenJDK 64-Bit Server VM (25.382-b0-internal) for linux-aarch64 JRE (1.8.0_382-b0), built on Oct 13 2023 04:18:02 by "root" with gcc 4.8.5 20150623 (Red Hat 4.8.5-44)

dragonwell8 release wget https://dragonwell.oss-cn-shanghai.aliyuncs.com/8.17.18/Alibaba_Dragonwell_Extended_8.17.18_aarch64_linux.tar.gz

[root@iZbp1ddr8foowyz5wmk9u1Z bin]# ./java -version; ./java -Xinternalversion
openjdk version "1.8.0_392"
OpenJDK Runtime Environment (Alibaba Dragonwell Extended Edition 8.17.18) (build 1.8.0_392-b01)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Extended Edition 8.17.18) (build 25.392-b01, mixed mode)
OpenJDK 64-Bit Server VM (25.392-b01) for linux-aarch64 JRE (1.8.0_392-b01), built on Dec 26 2023 09:05:00 by "jenkins" with gcc 7.5.0

Temurin8 wget http://114.55.64.175:8666/compiler-ci-bucket/openjdk/jdk8u392-ga/OpenJDK8U-jdk_aarch64_linux_hotspot_8u392b08.tar.gz

[root@iZbp1ddr8foowyz5wmk9u1Z bin]# ./java -version; ./java -Xinternalversion
openjdk version "1.8.0_392"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_392-b08)
OpenJDK 64-Bit Server VM (Temurin)(build 25.392-b08, mixed mode)
OpenJDK 64-Bit Server VM (25.392-b08) for linux-aarch64 JRE (1.8.0_392-b08), built on Oct 18 2023 00:08:03 by "jenkins" with gcc 7.5.0

dragonwell8 和Temurin8 的log如下:

[COMMAND]
docker build --no-cache --tag jdk-internal:test-metrics-memory ./jdk-docker
[ELAPSED: 5028 ms]
[STDERR]
#0 building with "default" instance using docker driver

#1 [internal] load .dockerignore
#1 transferring context: 2B done
#1 DONE 0.0s

#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 116B done
#2 DONE 0.0s

#3 [internal] load metadata for docker.io/arm64v8/ubuntu:latest
#3 DONE 1.4s

#4 [1/2] FROM docker.io/arm64v8/ubuntu:latest@sha256:ba545858745d6307f0d1064d0d25365466f78d02f866cf4efb9e1326a4c196ca
#4 CACHED

#5 [internal] load build context
#5 transferring context: 206.33MB 0.4s done
#5 DONE 0.4s

#6 [2/2] COPY /jdk /jdk
#6 DONE 2.7s

#7 exporting to image
#7 exporting layers
#7 exporting layers 0.4s done
#7 writing image sha256:1339e47e477f58a218bc7804b6acc3f134fabfdfc735a1d430b0571664dfd721 done
#7 naming to docker.io/library/jdk-internal:test-metrics-memory done
#7 DONE 0.4s

[STDOUT]

========== NEW TEST CASE:      testMemoryLimit, value = 200m
[COMMAND]
docker run --tty=true --rm --volume /tmp/tone/run/jtreg/tmp/classes/jdk/internal/platform/docker:/test-classes/ --memory=200m jdk-internal:test-metrics-memory /jdk/bin/java -cp /test-classes/ -Xmixed MetricsMemoryTester memory 200m
[ELAPSED: 466 ms]
[STDERR]

[STDOUT]
[memory, 200m]
TEST PASSED!!!

========== NEW TEST CASE:      testMemoryLimit, value = 1g
[COMMAND]
docker run --tty=true --rm --volume /tmp/tone/run/jtreg/tmp/classes/jdk/internal/platform/docker:/test-classes/ --memory=1g jdk-internal:test-metrics-memory /jdk/bin/java -cp /test-classes/ -Xmixed MetricsMemoryTester memory 1g
[ELAPSED: 520 ms]
[STDERR]

[STDOUT]
[memory, 1g]
TEST PASSED!!!

========== NEW TEST CASE:      testMemoryLimit, value = 500m
[COMMAND]
docker run --tty=true --rm --volume /tmp/tone/run/jtreg/tmp/classes/jdk/internal/platform/docker:/test-classes/ --memory=500m --volume /sys/fs/cgroup:/cgroup-in:ro jdk-internal:test-metrics-memory /jdk/bin/java -cp /test-classes/ -Xmixed MetricsMemoryTester memory 500m
[ELAPSED: 503 ms]
[STDERR]

[STDOUT]
[memory, 500m]
TEST PASSED!!!

========== NEW TEST CASE:      testMemoryAndSwapLimit, memory = 200m, memory and swap = 1g
[COMMAND]
docker run --tty=true --rm --volume /tmp/tone/run/jtreg/tmp/classes/jdk/internal/platform/docker:/test-classes/ --memory=200m --memory-swap=1g jdk-internal:test-metrics-memory /jdk/bin/java -cp /test-classes/ -Xmixed MetricsMemoryTester memoryswap 200m 1g
[ELAPSED: 500 ms]
[STDERR]

[STDOUT]
[memoryswap, 200m, 1g]
TEST PASSED!!!

========== NEW TEST CASE:      testMemoryAndSwapLimit, memory = 100m, memory and swap = 200m
[COMMAND]
docker run --tty=true --rm --volume /tmp/tone/run/jtreg/tmp/classes/jdk/internal/platform/docker:/test-classes/ --memory=100m --memory-swap=200m jdk-internal:test-metrics-memory /jdk/bin/java -cp /test-classes/ -Xmixed MetricsMemoryTester memoryswap 100m 200m
[ELAPSED: 532 ms]
[STDERR]

[STDOUT]
[memoryswap, 100m, 200m]
TEST PASSED!!!

========== NEW TEST CASE:      testKernelMemoryLimit, value = 100m
[COMMAND]
docker run --tty=true --rm --volume /tmp/tone/run/jtreg/tmp/classes/jdk/internal/platform/docker:/test-classes/ --kernel-memory=100m jdk-internal:test-metrics-memory /jdk/bin/java -cp /test-classes/ -Xmixed MetricsMemoryTester kernelmem 100m
[ELAPSED: 501 ms]
[STDERR]

[STDOUT]
[kernelmem, 100m]
TEST PASSED!!!

========== NEW TEST CASE:      testKernelMemoryLimit, value = 1g
[COMMAND]
docker run --tty=true --rm --volume /tmp/tone/run/jtreg/tmp/classes/jdk/internal/platform/docker:/test-classes/ --kernel-memory=1g jdk-internal:test-metrics-memory /jdk/bin/java -cp /test-classes/ -Xmixed MetricsMemoryTester kernelmem 1g
[ELAPSED: 504 ms]
[STDERR]

[STDOUT]
[kernelmem, 1g]
TEST PASSED!!!

========== NEW TEST CASE:      testOomKillFlag, oomKillFlag = false
[COMMAND]
docker run --tty=true --rm --volume /tmp/tone/run/jtreg/tmp/classes/jdk/internal/platform/docker:/test-classes/ --memory=100m --oom-kill-disable jdk-internal:test-metrics-memory /jdk/bin/java -cp /test-classes/ -Xmixed MetricsMemoryTester memory 100m false
[ELAPSED: 479 ms]
[STDERR]

[STDOUT]
[memory, 100m, false]
TEST PASSED!!!

========== NEW TEST CASE:      testOomKillFlag, oomKillFlag = true
[COMMAND]
docker run --tty=true --rm --volume /tmp/tone/run/jtreg/tmp/classes/jdk/internal/platform/docker:/test-classes/ --memory=100m jdk-internal:test-metrics-memory /jdk/bin/java -cp /test-classes/ -Xmixed MetricsMemoryTester memory 100m true
[ELAPSED: 460 ms]
[STDERR]

[STDOUT]
[memory, 100m, true]
TEST PASSED!!!

========== NEW TEST CASE:      testMemoryFailCount64m
[COMMAND]
docker run --tty=true --rm --volume /tmp/tone/run/jtreg/tmp/classes/jdk/internal/platform/docker:/test-classes/ --memory=64m jdk-internal:test-metrics-memory /jdk/bin/java -Xmx64m -cp /test-classes/ -Xmixed MetricsMemoryTester failcount
[ELAPSED: 580 ms]
[STDERR]

[STDOUT]
[failcount]

[COMMAND]
docker rmi --force jdk-internal:test-metrics-memory
[ELAPSED: 12 ms]
[STDERR]

[STDOUT]
Untagged: jdk-internal:test-metrics-memory
Deleted: sha256:1339e47e477f58a218bc7804b6acc3f134fabfdfc735a1d430b0571664dfd721

STDERR:
 stdout: [[failcount]
];
 stderr: []
 exitValue = 137

java.lang.RuntimeException: Expected to get exit value of [0]

        at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:396)
        at TestDockerMemoryMetrics.testMemoryFailCount(TestDockerMemoryMetrics.java:118)
        at TestDockerMemoryMetrics.main(TestDockerMemoryMetrics.java:79)
        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)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Expected to get exit value of [0]

JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0]

【用例日志】

[STDOUT]

========== NEW TEST CASE:      testMemoryLimit, value = 200m
[COMMAND]
docker run --tty=true --rm --volume /tmp/tone/run/jtreg/jt-work/jdk_test/classes/23/jdk/internal/platform/docker:/test-classes/ --memory=200m jdk-internal:test-metrics-memory /jdk/bin/java -cp /test-classes/ -Djdk.lang.processReaperUseDefaultStackSize=true -Dtest.wisp.socketAddress=www.alibabacloud.com -Xmixed -ea -esa MetricsMemoryTester memory 200m 
[ELAPSED: 1200 ms]
[STDERR]

[STDOUT]

[COMMAND]
docker rmi --force jdk-internal:test-metrics-memory 
[ELAPSED: 13 ms]
[STDERR]

[STDOUT]
Untagged: jdk-internal:test-metrics-memory

STDERR:
 stdout: [];
 stderr: []
 exitValue = 137

java.lang.RuntimeException: Expected to get exit value of [0]

    at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:396)
    at TestDockerMemoryMetrics.testMemoryLimit(TestDockerMemoryMetrics.java:106)
    at TestDockerMemoryMetrics.testMemoryLimit(TestDockerMemoryMetrics.java:91)
    at TestDockerMemoryMetrics.main(TestDockerMemoryMetrics.java:54)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:82)
    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:879)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Expected to get exit value of [0]

JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0]

【版本信息】

[root@iZbp1ddr8foowyz5wmk9u1Z jtreg]# uname -a ; cat /etc/os-release ; free -h; lscpu| head -n 25;java -version; java -Xinternalversion
Linux iZbp1ddr8foowyz5wmk9u1Z 5.10.134-15.an8.aarch64 #1 SMP Thu Jul 20 00:33:45 CST 2023 aarch64 aarch64 aarch64 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:           61Gi       731Mi        46Gi       0.0Ki        14Gi        59Gi
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
BIOS Vendor ID:      Alibaba Cloud
Model:               0
Model name:          Neoverse-N2
BIOS Model name:     virt-rhel7.6.0
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
openjdk version "1.8.0_382"
OpenJDK Runtime Environment (Alibaba 8.9.14) (build 1.8.0_382-b0)
OpenJDK 64-Bit Server VM (Alibaba 8.9.14) (build 25.382-b0-internal, mixed mode)
OpenJDK 64-Bit Server VM (25.382-b0-internal) for linux-aarch64 JRE (1.8.0_382-b0), built on Dec  8 2023 08:22:43 by "" with gcc 4.8.5 20150623 (Red Hat 4.8.5-44)
sendaoYan commented 10 months ago

https://aone.alibaba-inc.com/v2/project/355606/bug/54446489# 《[ajdk8]内存限制为300m的docker容器无法启动ajdk8》

在这里跟踪

sendaoYan commented 10 months ago

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