JDK-8293456 : runtime/os/TestTracePageSizes.java sub-tests fail with "AssertionError: No memory range found for address: NNNN"
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 20
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86_64
  • Submitted: 2022-09-06
  • Updated: 2022-09-12
  • Resolved: 2022-09-07
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 20
20 b14Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8293496 :  
Description
The following tests failed in the JDK20 CI:

   2 runtime/os/TestTracePageSizes.java#G1
   3 runtime/os/TestTracePageSizes.java#Parallel
   3 runtime/os/TestTracePageSizes.java#Serial
   4 runtime/os/TestTracePageSizes.java#compiler-options
   4 runtime/os/TestTracePageSizes.java#explicit-large-page-size
   5 runtime/os/TestTracePageSizes.java#no-options

Here's a snippet from the runtime/os/TestTracePageSizes.java#Serial
log file for linux-x64-debug:

#section:main
----------messages:(4/308)----------
command: main -XX:+AlwaysPreTouch -Xmx128m -Xlog:pagesize:ps-%p.log -XX:+UseSerialGC TestTracePageSizes
reason: User specified action: run main/othervm -XX:+AlwaysPreTouch -Xmx128m -Xlog:pagesize:ps-%p.log -XX:+UseSerialGC TestTracePageSizes 
Mode: othervm [/othervm specified]
elapsed time (seconds): 0.523
----------configuration:(0/0)----------
----------System.out:(0/0)----------
----------System.err:(11/720)----------
java.lang.AssertionError: No memory range found for address: 0x00007fa878523000
	at TestTracePageSizes.main(TestTracePageSizes.java:278)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:1589)

JavaTest Message: Test threw exception: java.lang.AssertionError: No memory range found for address: 0x00007fa878523000
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.AssertionError: No memory range found for address: 0x00007fa878523000
----------rerun:(38/6889)*----------
Comments
[~dcubed] Thank you, I was about to ask.
08-09-2022

The fix for this bug is integrated in jdk-20+14-947.
08-09-2022

noreg-other as the change is effectively covered by this test, test/hotspot/jtreg/runtime/os/TestTracePageSizes.java.
07-09-2022

Changeset: 76df73b3 Author: Brian Burkhalter <bpb@openjdk.org> Date: 2022-09-07 18:53:25 +0000 URL: https://git.openjdk.org/jdk/commit/76df73b390d0db7779935dd254f6378b6884a79d
07-09-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10204 Date: 2022-09-07 17:41:36 +0000
07-09-2022

`cp /proc/self/smaps <somewhere>` contains the smaps as expected.
07-09-2022

Bumping priority as these failures are very annoying in our CI
07-09-2022

The problem seems to be JDK-8264744 after which the problem first occurred. Moving to core-libs/java.nio
07-09-2022

The copied smaps file (/proc/self/smaps) is always empty here, Files.copy() does not seem to work afaict.
07-09-2022

Files.copy will use now copy_file_range if available. It appears this syscall depends on the inode file size and so doesn't work as expected on special file systems like /proc where files appear to be a size 0. It looks like we'll need to update the implementation to complete the copy in user-space as that will read to EOF and does not depend on the file size.
07-09-2022

Here's another unresolved issue with the same test: JDK-8267460 runtime/os/TestTracePageSizes.java#with-Serial fails on linux-aarch64 since JDK-8267155
06-09-2022