RFR: 8273216: JCMD does not work across container boundaries with Podman
Mikhailo Seledtsov
mseledtsov at openjdk.java.net
Tue Sep 28 21:34:37 UTC 2021
On Tue, 28 Sep 2021 16:05:15 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
> Please review this test fix so as to make it work with podman too. I've tested this with podman 3.3.1 when running as regular user and when running as root. Also tested it with docker on cgroups v1 with root. I don't know how to do rootless docker testing.
>
> Thoughts?
Severin, thank you for addressing this issue. Overall the change looks good.
I ran your change through Oracle's test system, and the Docker case passes. However, a Podman case fails when running 'jcmd -l' attempting to find the target test child process - could not find it. Please note that we run both Docker and Podman tests in non-root mode (a regular "test user"). Perhaps the test should have conditional guards for it, and throw a jtreg.SkippedException for Podman non-root user with a short message?
---------System.err:(13/757)----------
java.lang.RuntimeException: Could not find specified process
at TestJcmd.testJcmdGetPid(TestJcmd.java:103)
at TestJcmd.main(TestJcmd.java:72)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
at java.base/java.lang.Thread.run(Thread.java:833)
JavaTest Message: Test threw exception: java.lang.RuntimeException
JavaTest Message: shutting down test
result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Could not find specified process
-------------
PR: https://git.openjdk.java.net/jdk/pull/5740
More information about the hotspot-runtime-dev
mailing list