JDK-8325068 : runtime/os/TestTracePageSizes.java: incorrect page size comparison for kernels < 5.0 with THP 'always' mode
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 23
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-01-31
  • Updated: 2025-05-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.
Other
tbdUnresolved
Related Reports
Duplicate :  
Description
Test fails on old kernel with thp mode "always".

Test:
runtime/os/TestTracePageSizes.java

Stack trace:
java.lang.AssertionError: Page sizes mismatch: 4 != 2048
	at TestTracePageSizes.main(TestTracePageSizes.java:307)
	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)

Details:
Test relaxes page size check if mapping uses THP. Detection logic depends of THPeligible line from smaps, when THP mode is "always" (default on RHEL-7). This information however only appeared in kernel 5.0. Tests passes with THP mode switched to "madvise" on RHEL-7.
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23304 Date: 2025-01-24 18:01:23 +0000
28-01-2025

Oops. Slightly different from JDK-8267460
24-01-2025

More context: https://github.com/openjdk/jdk/pull/17545#issuecomment-1919543589
01-02-2024