Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jdk_container_0_FAILED jdk/internal/platform/docker/TestDockerCpuMetrics.java NPE at TestDockerCpuMetrics.main(TestDockerCpuMetrics.java:77) #16462

Open
JasonFengJ9 opened this issue Dec 13, 2022 · 6 comments

Comments

@JasonFengJ9
Copy link
Member

Failure link

From an internal build(ub18-aarch64-4):

openjdk version "1.8.0_362"
IBM Semeru Runtime Open Edition (build 1.8.0_362-b05)
Eclipse OpenJ9 VM (build master-7cafd4be8, JRE 1.8.0 Linux aarch64-64-Bit Compressed References 20221210_513 (JIT enabled, AOT enabled)
OpenJ9   - 7cafd4be8
OMR      - 8ae31402f
JCL      - d9472a844 based on jdk8u362-b05)

Rerun in Grinder - Change TARGET to run only the failed test targets.

Optional info

Failure output (captured from console output)

[2022-12-10T07:31:17.409Z] variation: NoOptions
[2022-12-10T07:31:17.409Z] JVM_OPTIONS:  

[2022-12-10T07:44:47.105Z] TEST: jdk/internal/platform/docker/TestDockerCpuMetrics.java

[2022-12-10T07:44:47.107Z] STDERR:
[2022-12-10T07:44:47.107Z] java.lang.NullPointerException
[2022-12-10T07:44:47.107Z] 	at TestDockerCpuMetrics.main(TestDockerCpuMetrics.java:77)
[2022-12-10T07:44:47.107Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2022-12-10T07:44:47.107Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2022-12-10T07:44:47.107Z] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2022-12-10T07:44:47.107Z] 	at java.lang.reflect.Method.invoke(Method.java:498)
[2022-12-10T07:44:47.107Z] 	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
[2022-12-10T07:44:47.107Z] 	at java.lang.Thread.run(Thread.java:826)
[2022-12-10T07:44:47.107Z] 
[2022-12-10T07:44:47.107Z] JavaTest Message: Test threw exception: java.lang.NullPointerException

jdk_container_jdk8_0_FAILED

100x grinder

@pshipton
Copy link
Member

pshipton commented Jan 5, 2023

The test seems bogus as it can only run inside a docker environment. The NPE is caused by jdk.internal.platform.Metrics.systemMetrics() returning null. This is expected unless the JVM is running under docker. The test checks if docker is available on the machine, by running docker ps, builds a docker image, runs some tests in the docker image, but then calls Metrics.systemMetrics() outside of the created docker image and expects it to be non-null.

@llxia

@pshipton
Copy link
Member

pshipton commented Jan 5, 2023

@JasonFengJ9 I expect this should be excluded everywhere it fails until it's working.

@JasonFengJ9
Copy link
Member Author

 * @summary Test JDK Metrics class when running inside docker container [1]

A docker-enabled machine label is required, this test along with other docker test friends can be excluded if the framework support is going to take a while.

[1] https://github.com/ibmruntimes/openj9-openjdk-jdk8/blob/4d70df27c9b0ea8f58f200cf630ca1332d223fa4/jdk/test/jdk/internal/platform/docker/TestDockerCpuMetrics.java#L35

@llxia
Copy link
Contributor

llxia commented Jan 9, 2023

jdk_container_jdk8 is a newly enabled test in dev.openjdk (see adoptium/aqa-tests#4147). dev.openjdk test build is also new and it sets to run in the docker environment. (i.e., LABEL_ADDITION=sw.tool.docker).

Since they are new, we do not yet have all the data on all versions/platforms. I do not see any valid Test_openjdk8_j9_dev.openjdk_aarch64_linux test builds at Adoptium. But the same test passed on s390 at Adoptium https://ci.adoptopenjdk.net/job/Test_openjdk8_j9_dev.openjdk_s390x_linux/7/

@llxia
Copy link
Contributor

llxia commented Jan 9, 2023

I also noticed the pipeline issue on platforms that do not have sw.tool.docker label (i.e., windows, mac, aix, etc). The pipeline issue is opened at adoptium/ci-jenkins-pipelines#568

@JasonFengJ9
Copy link
Member Author

JDK17 0.36 build(ub18-aarch64-1)

[2023-01-20T06:19:36.747Z] variation: NoOptions
[2023-01-20T06:19:36.747Z] JVM_OPTIONS: 

[2023-01-20T06:22:28.045Z] TEST: jdk/internal/platform/docker/TestDockerCpuMetrics.java

[2023-01-20T06:22:28.070Z] STDERR:
[2023-01-20T06:22:28.070Z] java.lang.NullPointerException: Cannot invoke "jdk.internal.platform.Metrics.getCpuSetMems()" because the return value of "jdk.internal.platform.Metrics.systemMetrics()" is null
[2023-01-20T06:22:28.070Z] 	at TestDockerCpuMetrics.main(TestDockerCpuMetrics.java:82)
[2023-01-20T06:22:28.070Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2023-01-20T06:22:28.070Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[2023-01-20T06:22:28.070Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2023-01-20T06:22:28.070Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[2023-01-20T06:22:28.070Z] 	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
[2023-01-20T06:22:28.070Z] 	at java.base/java.lang.Thread.run(Thread.java:857)
[2023-01-20T06:22:28.070Z] 
[2023-01-20T06:22:28.070Z] JavaTest Message: Test threw exception: java.lang.NullPointerException

[2023-01-20T06:22:47.656Z] jdk_container_0_FAILED

@JasonFengJ9 JasonFengJ9 changed the title jdk_container_jdk8_0_FAILED jdk/internal/platform/docker/TestDockerCpuMetrics.java NPE at TestDockerCpuMetrics.main(TestDockerCpuMetrics.java:77) jdk_container_0_FAILED jdk/internal/platform/docker/TestDockerCpuMetrics.java NPE at TestDockerCpuMetrics.main(TestDockerCpuMetrics.java:77) Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants