JDK-8352926 : New test TestDockerMemoryMetricsSubgroup.java fails
  • Type: Bug
  • Component: hotspot
  • Sub-Component: test
  • Affected Version: 24.0.2,25
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2025-03-26
  • Updated: 2025-06-06
  • Resolved: 2025-05-22
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
25 b25Fixed
Related Reports
Relates :  
Description
Suite: Hotspot
JDK: jdk-24-0-2+1
Test: jdk/internal/platform/docker/TestDockerMemoryMetricsSubgroup.java	
OS: Linux x64
Partial Error log:
java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [125]
	at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:522)
	at TestDockerMemoryMetricsSubgroup.testMemoryLimitSubgroupV1(TestDockerMemoryMetricsSubgroup.java:95)
	at TestDockerMemoryMetricsSubgroup.main(TestDockerMemoryMetricsSubgroup.java:63)
	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.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
	at java.base/java.lang.Thread.run(Thread.java:1447)

JavaTest Message: Test threw exception: java.lang.RuntimeException
JavaTest Message: shutting down test
Comments
[jdk24u-fix-request] Approval Request from sendaoYan Clean backport to fix test bug, which make test more robustness, test-fix only, no risk.
06-06-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk24u/pull/228 Date: 2025-06-06 02:01:23 +0000
06-06-2025

Changeset: 9ca1004e Branch: master Author: pawan chawdhary <pawan@dhcp-10-48-118-86.wifi.oracle.com> Committer: Mikhailo Seledtsov <mseledtsov@openjdk.org> Date: 2025-05-22 17:08:08 +0000 URL: https://git.openjdk.org/jdk/commit/9ca1004e76a614328cd2eb7546143839c4d2f810
22-05-2025

Note that containers/docker/TestMemoryWithSubgroups.java fails for the same or similar reason.
16-05-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/24948 Date: 2025-04-29 13:04:15 +0000
29-04-2025

Indeed. I see that "--cgroupns" was introduced with Docker API 1.41 - https://docs.docker.com/reference/cli/docker/container/create/#options That means TestDockerMemoryMetricsSubgroup.java requires a newer docker. Query docker API version with "docker version". Docker Engine API table - https://docs.docker.com/reference/api/engine/ states that the minimum Docker version with API v1.41 support is v20.10.
27-03-2025

It looks like docker (as opposed to podman) does not understand the --cgroupns flag.
26-03-2025