JDK-8203691 : [TESTBUG] Test /runtime/containers/cgroup/PlainRead.java fails
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2018-05-23
  • Updated: 2024-06-11
  • Resolved: 2018-06-13
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 11 Other
11 b19Fixed openjdk8u422Fixed
Related Reports
Duplicate :  
Description
STDOUT:
Command line: [/export/users/dh198349/valhalla/repos/jdk-jep181/open/test/hotspot/jtreg/../../../../build/linux-x64-debug/images/jdk/bin/java -cp /export/users/dh198349/valhalla/repos/jdk-jep181/open/test/hotspot/jtreg/JTwork/classes/runtime/containers/cgroup/PlainRead.d:/export/users/dh198349/valhalla/repos/jdk-jep181/open/test/hotspot/jtreg/runtime/containers/cgroup:/export/users/dh198349/valhalla/repos/jdk-jep181/open/test/hotspot/jtreg/JTwork/classes/testlibrary:/export/users/dh198349/valhalla/repos/jdk-jep181/open/test/hotspot/jtreg/testlibrary:/export/users/dh198349/valhalla/repos/jdk-jep181/open/test/hotspot/jtreg/JTwork/classes/test/lib:/export/users/dh198349/valhalla/repos/jdk-jep181/open/test/lib:/net/scanas416.us.oracle.com/export/java_re2/misc/promoted/jtreg/4.2/fcs/b12/binaries/jtreg/lib/javatest.jar:/net/scanas416.us.oracle.com/export/java_re2/misc/promoted/jtreg/4.2/fcs/b12/binaries/jtreg/lib/jtreg.jar -Xlog:os+container=trace -version ]
Not in a cgroup, testing...
STDERR:
 stdout: [[0.001s][trace][os,container] OSContainer::init: Initializing Container Support
[0.001s][debug][os,container] Required cgroup memory subsystem not found
];
 stderr: [java version "11-internal" 2018-09-25
Java(TM) SE Runtime Environment 18.9 (fastdebug build 11-internal+0-2018-05-11-0631263.daholme.jdk-jep181)
Java HotSpot(TM) 64-Bit Server VM 18.9 (fastdebug build 11-internal+0-2018-05-11-0631263.daholme.jdk-jep181, mixed mode)
]
 exitValue = 0

java.lang.RuntimeException: '^.*Can't open /proc/self/mountinfo.*$' missing from stdout/stderr 

	at jdk.test.lib.process.OutputAnalyzer.shouldMatch(OutputAnalyzer.java:258)
	at PlainRead.isNotContainer(PlainRead.java:64)
	at PlainRead.main(PlainRead.java:77)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
	at java.base/java.lang.Thread.run(Thread.java:832)

JavaTest Message: Test threw exception: java.lang.RuntimeException: '^.*Can't open /proc/self/mountinfo.*$' missing from stdout/stderr 


Comments
Fix request (8u) Clean backport of the patch for the tesbug. Review 8u-dev: https://github.com/openjdk/jdk8u-dev/pull/477
02-04-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk8u-dev/pull/477 Date: 2024-04-02 05:32:06 +0000
02-04-2024

URL: http://hg.openjdk.java.net/jdk/jdk/rev/5f20bf95c052 User: bobv Date: 2018-06-13 17:49:01 +0000
13-06-2018

The test correctly determines that cgroups is not setup sufficiently to provide container configuration but it is assuming that there is only one potential cause and that is not the case. I suggest removing the check for the error message. Otherwise we'll have to look through the container initialization code and check for each possible message. This would be a long term maintainence issue. 75 - } else { 76 - System.out.println("Not in a cgroup, testing..."); 77 - isNotContainer(output); }
23-05-2018

java -Xlog:os+container=trace -version [0.001s][trace][os,container] OSContainer::init: Initializing Container Support [0.001s][debug][os,container] Required cgroup memory subsystem not found java version "11-internal" 2018-09-25 The test seems to expect that if not in a container then access to /proc/self/mountinfo failed, but that is not the case.
23-05-2018