JDK-8229182 : [TESTBUG] runtime/containers/docker/TestMemoryAwareness.java test fails on SLES12
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11,13,14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: generic
  • Submitted: 2019-08-06
  • Updated: 2024-11-05
  • Resolved: 2019-09-04
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 JDK 13 JDK 14 Other
11.0.19-oracleFixed 13.0.2Fixed 14 b13Fixed openjdk8u372Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
The docker related test  
runtime/containers/docker/TestMemoryAwareness.java 
fails on SLES12  with the following exception :

java.lang.RuntimeException: Expected to get exit value of [1]

	at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:396)
	at TestMemoryAwareness.testOOM(TestMemoryAwareness.java:106)
	at TestMemoryAwareness.main(TestMemoryAwareness.java:63)
	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:566)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:834)

Some discussion about the issue suggested that additionally  setting  —memory-swappiness=0   in the test should solve the issue observed.


Comments
Fix request (8u) We see this failure on 8 as well, it is a fairly simple test only backport, the affected tests are passing in our environments now. Patch was not clean and required some minor adjustments due to some context differences.
22-11-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk8u-dev/pull/186 Date: 2022-11-18 23:48:11 +0000
19-11-2022

Fix request (13u) We see this test failure also in JDK13 tests, hence requesting backport to jdk13u. Patch applies cleanly, runs through SAP's regression testing without findings.
02-10-2019

I would like to have the patch in jdk11 as well, because this test issue is present there too. The patch applies cleanly.
11-09-2019

URL: https://hg.openjdk.java.net/jdk/jdk/rev/0437b0f20312 User: mbaesken Date: 2019-09-04 07:41:18 +0000
04-09-2019

The root cause of this problem appears to be the linux kernel configuration. Swap accounting is not enabled. WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. This could be resolved by changing the kernel configuration. GRUB_CMDLINE=“cgroup_enable=memory swapaccount=1” A less intrusive solution is to disable swapping in the container under test via the docker option "—memory-swappiness=0 ".
07-08-2019