JDK-8325218 : gc/parallel/TestAlwaysPreTouchBehavior.java fails
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 23
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86_64,aarch64
  • Submitted: 2024-02-05
  • Updated: 2024-08-23
  • Resolved: 2024-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 21 JDK 23 JDK 24 Other
21.0.5Fixed 23Fixed 24 b03Fixed naResolved
Related Reports
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8325569 :  
Description
----------configuration:(0/0)----------
----------System.out:(0/0)----------
----------System.err:(13/1065)----------
java.lang.RuntimeException: RSS of this process(48064kb) should be bigger than or equal to committed heap mem(1005056kb): expected 48064 >= 1005056
	at jdk.test.lib.Asserts.fail(Asserts.java:634)
	at jdk.test.lib.Asserts.assertGreaterThanOrEqual(Asserts.java:288)
	at gc.parallel.TestAlwaysPreTouchBehavior.main(TestAlwaysPreTouchBehavior.java:77)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1575)

JavaTest Message: Test threw exception: java.lang.RuntimeException: RSS of this process(48064kb) should be bigger than or equal to committed heap mem(1005056kb): expected 48064 >= 1005056
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: RSS of this process(48064kb) should be bigger than or equal to committed heap mem(1005056kb): expected 48064 >= 1005056

Comments
[jdk21u-fix-request] Approval Request from Liming Liu
10-07-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk21u-dev/pull/825 Date: 2024-07-05 08:55:58 +0000
09-07-2024

Fix was pushed to 24 while main issue was targeted to 23. Reset this issue to fixed in 24 and copied the Robo Duke entry here.
27-06-2024

Changeset: 31e8deba Author: Liming Liu <limingliu@os.amperecomputing.com> Committer: Thomas Stuefe <stuefe@openjdk.org> Date: 2024-06-17 06:16:26 +0000 URL: https://git.openjdk.org/jdk/commit/31e8debae63e008da79e403bcb870a7be631af2c
27-06-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/19877 Date: 2024-06-25 07:51:35 +0000
25-06-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/18592 Date: 2024-04-03 08:12:22 +0000
03-04-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/18417 Date: 2024-03-21 02:49:48 +0000
21-03-2024

The problem is that the used MADV_POPULATE_WRITE when THP is set to [always] on kernels < 5.14 does not seemt to work; the madvise call does not do anything, but does not return invalid either. E.g. the following program on kernel 5.4: #include <sys/mman.h> #include <stdio.h> #include <stdlib.h> int main() { size_t length = 3 * 1024 * 1024; void* addr = mmap(NULL, length, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); if (addr == MAP_FAILED) { printf("mmap failed\n"); return -1; } int success = madvise(addr, length, 23 /* MADV_POPULATE_WRITE */); printf("madvise result = %d\n", success); } returns madvise result = 0 which means although madvise did nothing, it returned no error either. `os::pd_pretouch_memory` on Linux relies on that though to use the alternate code path that pretouches the manual way.
05-02-2024