JDK-8360533 : ContainerRuntimeVersionTestUtils fromVersionString fails with some docker versions
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 25,26
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: generic
  • Submitted: 2025-06-25
  • Updated: 2025-07-15
  • Resolved: 2025-06-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25 JDK 26
25.0.1Fixed 26 b05Fixed
Related Reports
Causes :  
Description
On Linux ppc64le  RHEL 8, we have such a docker version :
docker --version
Docker version v25.0.3, build 4debf41

Unfortunately, the leading 'v' is not expected in ContainerRuntimeVersionTestUtils fromVersionString so we get an exception.

Probably we should simply skip the leading 'v' .
Also the appended build info has to be considered.

Example :
TEST: jdk/internal/platform/docker/TestDockerMemoryMetricsSubgroup.java
TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Failed to parse container runtime version: Docker version v25.0.3, build 4debf41

Comments
jdk25u fix request I would like to have the patch in jdk25u as well, because the issue is present there too. The backport is clean and low risk.
30-06-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk25u/pull/10 Date: 2025-06-30 08:14:34 +0000
30-06-2025

Changeset: 97ec9d3e Branch: master Author: Matthias Baesken <mbaesken@openjdk.org> Date: 2025-06-27 07:37:44 +0000 URL: https://git.openjdk.org/jdk/commit/97ec9d3e0a6e3455579b567e1f58026f5b168c09
27-06-2025

I'm seeing the same on Fedora 41: java.lang.RuntimeException: Failed to parse container runtime version: Docker version 28.2.2, build 1.fc41 at jdk.test.lib.containers.docker.ContainerRuntimeVersionTestUtils.fromVersionString(ContainerRuntimeVersionTestUtils.java:87) at jdk.test.lib.containers.docker.ContainerRuntimeVersionTestUtils.getContainerRuntimeVersion(ContainerRuntimeVersionTestUtils.java:105) at jdk.test.lib.containers.docker.ContainerRuntimeVersionTestUtils.checkContainerVersionSupported(ContainerRuntimeVersionTestUtils.java:50) at TestMemoryWithSubgroups.main(TestMemoryWithSubgroups.java:72) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:565) at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) at java.base/java.lang.Thread.run(Thread.java:1474) In my case the trailing ',' is of an issue which will be fixed with the proposed patch.
26-06-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/25996 Date: 2025-06-26 09:27:20 +0000
26-06-2025