Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8311986: Disable runtime/os/TestTracePageSizes.java for ShenandoahGC #14858

Closed
wants to merge 3 commits into from

Conversation

xiangzhai
Copy link
Member

@xiangzhai xiangzhai commented Jul 13, 2023

Hi,

runtime/os/TestTracePageSizes.java fails for ShenandoahGC on linux-x86_64:

ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.AssertionError: Page sizes mismatch: 4 != 2048
REASON: User specified action: run main/othervm -XX:+AlwaysPreTouch -Xmx128m -Xlog:pagesize:ps-%p.log -XX:-SegmentedCodeCache -XX:+UseTransparentHugePages TestTracePageSizes 
TIME:   0.353 seconds
messages:
command: main -XX:+AlwaysPreTouch -Xmx128m -Xlog:pagesize:ps-%p.log -XX:-SegmentedCodeCache -XX:+UseTransparentHugePages TestTracePageSizes
reason: User specified action: run main/othervm -XX:+AlwaysPreTouch -Xmx128m -Xlog:pagesize:ps-%p.log -XX:-SegmentedCodeCache -XX:+UseTransparentHugePages TestTracePageSizes 
started: Thu Jul 13 09:57:18 CST 2023
Mode: othervm [/othervm specified]
finished: Thu Jul 13 09:57:19 CST 2023
elapsed time (seconds): 0.353
configuration:
STDOUT:
STDERR:
java.lang.AssertionError: Page sizes mismatch: 4 != 2048
	at TestTracePageSizes.main(TestTracePageSizes.java:294)
	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:1570)

JavaTest Message: Test threw exception: java.lang.AssertionError: Page sizes mismatch: 4 != 2048
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.AssertionError: Page sizes mismatch: 4 != 2048
rerun:
cd /mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/scratch/0 && \
HOME=/home/loongson \
LANG=zh_CN.UTF-8 \
LC_ALL=C \
PATH=/bin:/usr/bin:/usr/sbin \
TEST_IMAGE_DIR=/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/images/test \
_JVM_DWARF_PATH=/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/images/symbols \
CLASSPATH=/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/classes/0/runtime/os/TestTracePageSizes_compiler-options.d:/mnt/repo/openjdk/jdk/test/hotspot/jtreg/runtime/os:/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/classes/0/test/lib:/mnt/repo/openjdk/jdk/test/lib:/mnt/download/jtreg/lib/javatest.jar:/mnt/download/jtreg/lib/jtreg.jar \
    /mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/images/jdk/bin/java \
        -Dtest.vm.opts='-XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=/mnt/download/jdk-20.0.1 -Djava.io.tmpdir=/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/tmp -XX:+UseShenandoahGC' \
        -Dtest.tool.vm.opts='-J-XX:MaxRAMPercentage=4.16667 -J-Dtest.boot.jdk=/mnt/download/jdk-20.0.1 -J-Djava.io.tmpdir=/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/tmp -J-XX:+UseShenandoahGC' \
        -Dtest.compiler.opts= \
        -Dtest.java.opts= \
        -Dtest.jdk=/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/images/jdk \
        -Dcompile.jdk=/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/images/jdk \
        -Dtest.timeout.factor=4.0 \
        -Dtest.nativepath=/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/images/test/hotspot/jtreg/native \
        -Dtest.root=/mnt/repo/openjdk/jdk/test/hotspot/jtreg \
        -Dtest.name=runtime/os/TestTracePageSizes.java#compiler-options \
        -Dtest.file=/mnt/repo/openjdk/jdk/test/hotspot/jtreg/runtime/os/TestTracePageSizes.java \
        -Dtest.src=/mnt/repo/openjdk/jdk/test/hotspot/jtreg/runtime/os \
        -Dtest.src.path=/mnt/repo/openjdk/jdk/test/hotspot/jtreg/runtime/os:/mnt/repo/openjdk/jdk/test/lib \
        -Dtest.classes=/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/classes/0/runtime/os/TestTracePageSizes_compiler-options.d \
        -Dtest.class.path=/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/classes/0/runtime/os/TestTracePageSizes_compiler-options.d:/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/classes/0/test/lib \
        -Dtest.class.path.prefix=/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/classes/0/runtime/os/TestTracePageSizes_compiler-options.d:/mnt/repo/openjdk/jdk/test/hotspot/jtreg/runtime/os:/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/classes/0/test/lib \
        -XX:MaxRAMPercentage=4.16667 \
        -Dtest.boot.jdk=/mnt/download/jdk-20.0.1 \
        -Djava.io.tmpdir=/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/tmp \
        -XX:+UseShenandoahGC \
        -Djava.library.path=/mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/images/test/hotspot/jtreg/native \
        -XX:+AlwaysPreTouch \
        -Xmx128m \
        -Xlog:pagesize:ps-%p.log \
        -XX:-SegmentedCodeCache \
        -XX:+UseTransparentHugePages \
        com.sun.javatest.regtest.agent.MainWrapper /mnt/repo/openjdk/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/runtime/os/TestTracePageSizes_compiler-options.d/main.2.jta

TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.AssertionError: Page sizes mismatch: 4 != 2048

Also fails on linux-loongarch64:

ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.AssertionError: Page sizes mismatch: 16 != 32768
REASON: User specified action: run main/othervm -XX:+AlwaysPreTouch -Xmx128m -Xlog:pagesize:ps-%p.log -XX:-SegmentedCodeCache -XX:+UseTransparentHugePages TestTracePageSizes 
TIME:   1.162 seconds
messages:
command: main -XX:+AlwaysPreTouch -Xmx128m -Xlog:pagesize:ps-%p.log -XX:-SegmentedCodeCache -XX:+UseTransparentHugePages TestTracePageSizes
reason: User specified action: run main/othervm -XX:+AlwaysPreTouch -Xmx128m -Xlog:pagesize:ps-%p.log -XX:-SegmentedCodeCache -XX:+UseTransparentHugePages TestTracePageSizes 
started: Thu Jul 13 09:15:46 CST 2023
Mode: othervm [/othervm specified]
finished: Thu Jul 13 09:15:47 CST 2023
elapsed time (seconds): 1.162
configuration:
STDOUT:
STDERR:
OpenJDK 64-Bit Server VM warning: Large pages size (32768K) is too large to afford page-sized regions, disabling uncommit
java.lang.AssertionError: Page sizes mismatch: 16 != 32768
	at TestTracePageSizes.main(TestTracePageSizes.java:300)
	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:1570)

JavaTest Message: Test threw exception: java.lang.AssertionError: Page sizes mismatch: 16 != 32768
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.AssertionError: Page sizes mismatch: 16 != 32768
rerun:
cd /mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/scratch/1 && \
HOME=/home/zhaixiang \
LANG=zh_CN.UTF-8 \
LC_ALL=C \
PATH=/bin:/usr/bin:/usr/sbin \
TEST_IMAGE_DIR=/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/images/test \
_JVM_DWARF_PATH=/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/images/symbols \
CLASSPATH=/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/classes/0/runtime/os/TestTracePageSizes_compiler-options.d:/mnt/repo/private/jdk-ls/test/hotspot/jtreg/runtime/os:/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/classes/0/test/lib:/mnt/repo/private/jdk-ls/test/lib:/mnt/jtreg/lib/javatest.jar:/mnt/jtreg/lib/jtreg.jar \
    /mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/images/jdk/bin/java \
        -Dtest.vm.opts='-XX:MaxRAMPercentage=12.5 -Dtest.boot.jdk=/mnt/jdk-ls-loongarch64-fx-server-release-20230526 -Djava.io.tmpdir=/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/tmp -XX:+UseShenandoahGC' \
        -Dtest.tool.vm.opts='-J-XX:MaxRAMPercentage=12.5 -J-Dtest.boot.jdk=/mnt/jdk-ls-loongarch64-fx-server-release-20230526 -J-Djava.io.tmpdir=/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/tmp -J-XX:+UseShenandoahGC' \
        -Dtest.compiler.opts= \
        -Dtest.java.opts= \
        -Dtest.jdk=/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/images/jdk \
        -Dcompile.jdk=/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/images/jdk \
        -Dtest.timeout.factor=4.0 \
        -Dtest.nativepath=/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/images/test/hotspot/jtreg/native \
        -Dtest.root=/mnt/repo/private/jdk-ls/test/hotspot/jtreg \
        -Dtest.name=runtime/os/TestTracePageSizes.java#compiler-options \
        -Dtest.file=/mnt/repo/private/jdk-ls/test/hotspot/jtreg/runtime/os/TestTracePageSizes.java \
        -Dtest.src=/mnt/repo/private/jdk-ls/test/hotspot/jtreg/runtime/os \
        -Dtest.src.path=/mnt/repo/private/jdk-ls/test/hotspot/jtreg/runtime/os:/mnt/repo/private/jdk-ls/test/lib \
        -Dtest.classes=/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/classes/0/runtime/os/TestTracePageSizes_compiler-options.d \
        -Dtest.class.path=/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/classes/0/runtime/os/TestTracePageSizes_compiler-options.d:/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/classes/0/test/lib \
        -Dtest.class.path.prefix=/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/classes/0/runtime/os/TestTracePageSizes_compiler-options.d:/mnt/repo/private/jdk-ls/test/hotspot/jtreg/runtime/os:/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/classes/0/test/lib \
        -XX:MaxRAMPercentage=12.5 \
        -Dtest.boot.jdk=/mnt/jdk-ls-loongarch64-fx-server-release-20230526 \
        -Djava.io.tmpdir=/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/tmp \
        -XX:+UseShenandoahGC \
        -Djava.library.path=/mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/images/test/hotspot/jtreg/native \
        -XX:+AlwaysPreTouch \
        -Xmx128m \
        -Xlog:pagesize:ps-%p.log \
        -XX:-SegmentedCodeCache \
        -XX:+UseTransparentHugePages \
        com.sun.javatest.regtest.agent.MainWrapper /mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/runtime/os/TestTracePageSizes_compiler-options.d/main.2.jta

TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.AssertionError: Page sizes mismatch: 16 != 32768

Please review my patch.

Thanks,
Leslie Zhai


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8311986: Disable runtime/os/TestTracePageSizes.java for ShenandoahGC (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14858/head:pull/14858
$ git checkout pull/14858

Update a local copy of the PR:
$ git checkout pull/14858
$ git pull https://git.openjdk.org/jdk.git pull/14858/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14858

View PR using the GUI difftool:
$ git pr show -t 14858

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14858.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 13, 2023

👋 Welcome back lzhai! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 13, 2023
@openjdk
Copy link

openjdk bot commented Jul 13, 2023

@xiangzhai The following label will be automatically applied to this pull request:

  • hotspot-runtime

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Jul 13, 2023
@mlbridge
Copy link

mlbridge bot commented Jul 13, 2023

Webrevs

Copy link
Member

@DamonFool DamonFool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@openjdk
Copy link

openjdk bot commented Jul 13, 2023

@xiangzhai This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8311986: Disable runtime/os/TestTracePageSizes.java for ShenandoahGC

Reviewed-by: jiefu, stuefe, shade

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 20 new commits pushed to the master branch:

  • 7539cc0: 8303134: JFR: Missing stack trace during chunk rotation stress
  • d1fa1a8: 8311825: Duplicate qualified enum constants not detected
  • 4676b40: 8312049: runtime/logging/ClassLoadUnloadTest can be improved
  • bbb7ce5: 8311038: Incorrect exhaustivity computation
  • 2e12a12: 8281658: Add a security category to the java -XshowSettings option
  • 43099a8: 8311647: Memory leak in Java_jdk_internal_org_jline_terminal_impl_jna_linux_CLibraryImpl_ttyname_1r
  • c7c6d47: 6355567: AdobeMarkerSegment causes failure to read valid JPEG
  • af7f95e: 8310070: Test: javax/net/ssl/DTLS/DTLSWontNegotiateV10.java timed out
  • c710e71: 8311102: Write annotations in the classfile dumped by SA
  • 61932f4: 8244289: fatal error: Possible safepoint reached by thread that does not allow it
  • ... and 10 more: https://git.openjdk.org/jdk/compare/11a5115caf179a1bbed5311e12ed3851e026c5c5...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@DamonFool, @tstuefe, @shipilev) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 13, 2023
@xiangzhai
Copy link
Member Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jul 14, 2023
@openjdk
Copy link

openjdk bot commented Jul 14, 2023

@xiangzhai
Your change (at version 1cd286a) is now ready to be sponsored by a Committer.

@dholmes-ora
Copy link
Member

It would be nice to understand why the test fails with ShenandoahGC (and ZGC for that matter).

@xiangzhai
Copy link
Member Author

xiangzhai commented Jul 14, 2023

Hi @dholmes-ora

(single generation) ZGC and Generational ZGC are not able to reproduce the issue now:

diff --git a/test/hotspot/jtreg/runtime/os/TestTracePageSizes.java b/test/hotspot/jtreg/runtime/os/TestTracePageSizes.java
index 0ff34b3e72d..7c21fcd4edc 100644
--- a/test/hotspot/jtreg/runtime/os/TestTracePageSizes.java
+++ b/test/hotspot/jtreg/runtime/os/TestTracePageSizes.java
@@ -57,7 +57,6 @@
  * @library /test/lib
  * @build jdk.test.lib.Platform
  * @requires os.family == "linux"
- * @requires vm.gc != "Z" & vm.gc != "Shenandoah"
  * @run main/othervm -XX:+AlwaysPreTouch -Xmx128m -Xlog:pagesize:ps-%p.log -XX:-SegmentedCodeCache TestTracePageSizes
  * @run main/othervm -XX:+AlwaysPreTouch -Xmx128m -Xlog:pagesize:ps-%p.log -XX:-SegmentedCodeCache -XX:+UseLargePages TestTracePageSizes
  * @run main/othervm -XX:+AlwaysPreTouch -Xmx128m -Xlog:pagesize:ps-%p.log -XX:-SegmentedCodeCache -XX:+UseTransparentHugePages TestTracePageSizes

(single generation) ZGC and Generational ZGC passed on linux-x86_64 and linux-loongarch64:

$ make run-test CONF=fastdebug TEST="runtime/os/TestTracePageSizes.java" JTREG="VM_OPTIONS=-XX:+UseZGC -XX:+ZGenerational"
Building target 'run-test' in configuration 'linux-loongarch64-server-fastdebug'
Running tests using JTREG control variable 'VM_OPTIONS=-XX:+UseZGC -XX:+ZGenerational'
Test selection 'runtime/os/TestTracePageSizes.java', will run:
* jtreg:test/hotspot/jtreg/runtime/os/TestTracePageSizes.java

Running test 'jtreg:test/hotspot/jtreg/runtime/os/TestTracePageSizes.java'
Passed: runtime/os/TestTracePageSizes.java#no-options
Passed: runtime/os/TestTracePageSizes.java#compiler-options
Test results: passed: 2
Report written to /mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/test-results/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java/html/report.html
Results written to /mnt/repo/private/jdk-ls/build/linux-loongarch64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java
Finished running test 'jtreg:test/hotspot/jtreg/runtime/os/TestTracePageSizes.java'
Test report is stored in build/linux-loongarch64-server-fastdebug/test-results/jtreg_test_hotspot_jtreg_runtime_os_TestTracePageSizes_java

==============================
Test summary
==============================
   TEST                                              TOTAL  PASS  FAIL ERROR   
   jtreg:test/hotspot/jtreg/runtime/os/TestTracePageSizes.java
                                                         2     2     0     0   
==============================
TEST SUCCESS

Finished building target 'run-test' in configuration 'linux-loongarch64-server-fastdebug'

I am investigating why only (single generation) ShenandoahGC is able to reproduce the issue.

@shipilev @rkennke Could you give some hint?

Thanks,
Leslie Zhai

@xiangzhai
Copy link
Member Author

Hi @dholmes-ora

It might be VmFlags issue.

"VmFlags" field deserves a separate description. This member represents the kernel flags associated with the particular virtual memory area in two letter encoded manner https://github.com/torvalds/linux/blob/master/Documentation/filesystems/proc.rst

DEBUG on purpose to add two bitmaps: lzhai_bitmap and rzhai_bitmap and UseShenandoahGC to rerun the testcase:

DEBUG: size: 4194304 preferred_page_size: 2097152
DEBUG: size: 4194304 preferred_page_size: 4096
DEBUG: size: 4194304 preferred_page_size: 2097152
DEBUG: size: 4194304 preferred_page_size: 2097152
DEBUG: size: 2097152 preferred_page_size: 2097152
DEBUG: smapsFileToParse: null
DEBUG: smapsCopy: smaps-copy-38346-0.txt
DEBUG: line: [0.001s][info][pagesize] Using the default large page size: 2M
DEBUG: line: [0.001s][info][pagesize] Usable page sizes: 4k, 2M
DEBUG: line: [0.002s][info][pagesize] CodeCache:  min=4M max=240M base=0x00007f1584800000 size=240M page_size=2M
DEBUG: pageSize: 2M
DEBUG: pageSizeFromSmaps: 4
DEBUG: pageSizeFromTrace: 2048
DEBUG: VmFlags: rd wr ex mr mw me ac sd hg 
DEBUG: line: [0.003s][info][pagesize] Heap: req_size=128M req_page_size=2M base=0x00000000f8000000 size=128M page_size=2M
DEBUG: pageSize: 2M
DEBUG: pageSizeFromSmaps: 4
DEBUG: pageSizeFromTrace: 2048
DEBUG: VmFlags: rd wr mr mw me ac sd hg 
DEBUG: line: [0.003s][info][pagesize] Mark Bitmap: req_size=4M req_page_size=2M base=0x00007f15a2a00000 size=4M page_size=2M
DEBUG: pageSize: 2M
DEBUG: pageSizeFromSmaps: 4
DEBUG: pageSizeFromTrace: 2048
DEBUG: VmFlags: rd wr mr mw me ac sd hg 
DEBUG: line: [0.004s][info][pagesize] DEBUG: Leslie Zhai Bitmap: req_size=4M req_page_size=4K base=0x00007f15a1ffa000 size=4M page_size=4K
DEBUG: pageSize: 4K
DEBUG: pageSizeFromSmaps: 4
DEBUG: pageSizeFromTrace: 4
=> DEBUG: line: [0.004s][info][pagesize] DEBUG: Ray Zhai Bitmap: req_size=4M req_page_size=2M base=0x00007f15a1a00000 size=4M page_size=2M
DEBUG: pageSize: 2M
DEBUG: pageSizeFromSmaps: 4
DEBUG: pageSizeFromTrace: 2048
=> DEBUG: VmFlags: mr mw me nr sd 
java.lang.AssertionError: Page sizes mismatch: 4 != 2048
	at TestTracePageSizes.main(TestTracePageSizes.java:301)
	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:1570)

JavaTest Message: Test threw exception: java.lang.AssertionError: Page sizes mismatch: 4 != 2048
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.AssertionError: Page sizes mismatch: 4 != 2048

smaps-copy-38346-0.txt

The VmFlags of virtual memory area Ray Zhai Bitmap is lack of hg. So not hit the condition range.isTransparentHuge().

Compared with Generational ZGC UseZGC and ZGenerational to rerun the testcase:

DEBUG: smapsFileToParse: null
DEBUG: smapsCopy: smaps-copy-38376-0.txt
DEBUG: line: [0.001s][info][pagesize] Using the default large page size: 2M
DEBUG: line: [0.001s][info][pagesize] Usable page sizes: 4k, 2M
=> DEBUG: line: [0.002s][info][pagesize] CodeCache:  min=4M max=240M base=0x00007f024c800000 size=240M page_size=2M
DEBUG: pageSize: 2M
DEBUG: pageSizeFromSmaps: 4
DEBUG: pageSizeFromTrace: 2048
=> DEBUG: VmFlags: rd wr ex mr mw me ac sd hg 
STATUS:Passed.

There is hg in the VmFlags of vma CodeCache even if the os::vm_page_size (4KB for linux-x86_64) is not equals to bitmap_page_size when UseLargePages.

linux-x86_64 and linux-loongarch64 confirmed enabled THP:

$ cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never

Thanks,
Leslie Zhai

@rkennke
Copy link
Contributor

rkennke commented Jul 14, 2023

I believe @tstuefe might know more about this.

@tstuefe
Copy link
Member

tstuefe commented Jul 14, 2023

I believe @tstuefe might know more about this.

Possibly caused by defect THP detection. Possibly fixed by upcoming #14739.

I remember knowing more, e.g. why this affects Shenandoah only, but the details slipped my mind for a moment. But I know that is why we explicitly don't test for Shenandoah. Therefore this patch is fine.

Copy link
Member

@tstuefe tstuefe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please change issue subject and PR subject to something like "Disable xxx for Shenandoah", since this does not fix the issue, it just disables the test.

Otherwise okay.

@shipilev
Copy link
Member

I think it has to do with https://bugs.openjdk.org/browse/JDK-8310110 -- the test passes before that commit, and fails after it.

@tstuefe
Copy link
Member

tstuefe commented Jul 14, 2023

I think it has to do with https://bugs.openjdk.org/browse/JDK-8310110 -- the test passes before that commit, and fails after it.

Yes, before https://bugs.openjdk.org/browse/JDK-8310110 we did not output anything for Shenandoah, so this test was just is a noop since the Matcher does not match anything to check.

I now remember again. Underlying cause is that AUX bitmap is madviced incorrectly for Shenandoah.

See #14486 (comment) .

I have a line of patches upcoming, starting with #14739, then #14559, and the AUX bitmap issue must wait at least until 14739 is in. Then, finally, this test can be enabled properly for Shenandoah.

Its all sideline stuff though, since my main focus is Lilliput and native heap trimming. Its also Reviewer-bound - the THP detection fix alone is already open since > 2 weeks.

Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so let's disable this test for Shenandoah until the auxbitmap fix is here.

@xiangzhai
Copy link
Member Author

Hi @tstuefe

I now remember again. Underlying cause is that AUX bitmap is madviced incorrectly for Shenandoah.

Added Leslie Zhai Bitmap and Ray Zhai Bitmap before Aux Bitmap on purpose for DEBUG :)

Thanks,
Leslie Zhai

@xiangzhai xiangzhai changed the title 8311986: runtime/os/TestTracePageSizes.java fails for ShenandoahGC 8311986: Disable runtime/os/TestTracePageSizes.java for ShenandoahGC Jul 14, 2023
@openjdk openjdk bot removed the sponsor Pull request is ready to be sponsored label Jul 14, 2023
@xiangzhai
Copy link
Member Author

Can you please change issue subject and PR subject to something like "Disable xxx for Shenandoah", since this does not fix the issue, it just disables the test.

Done.

@@ -51,7 +51,7 @@
* @library /test/lib
* @build jdk.test.lib.Platform
* @requires os.family == "linux"
* @requires vm.gc != "Z"
* @requires vm.gc != "Shenandoah"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, wait, don't drop "Z" from here. This patch should only affect Shenandoah.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

But actually (single generation) ZGC and Generational ZGC are not able to reproduce the issue now :)

@DamonFool
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Jul 14, 2023

@DamonFool The PR has been updated since the change author (@xiangzhai) issued the integrate command - the author must perform this command again.

@xiangzhai
Copy link
Member Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jul 14, 2023
@openjdk
Copy link

openjdk bot commented Jul 14, 2023

@xiangzhai
Your change (at version c0fab84) is now ready to be sponsored by a Committer.

@DamonFool
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Jul 14, 2023

Going to push as commit 167d1c1.
Since your change was applied there have been 20 commits pushed to the master branch:

  • 7539cc0: 8303134: JFR: Missing stack trace during chunk rotation stress
  • d1fa1a8: 8311825: Duplicate qualified enum constants not detected
  • 4676b40: 8312049: runtime/logging/ClassLoadUnloadTest can be improved
  • bbb7ce5: 8311038: Incorrect exhaustivity computation
  • 2e12a12: 8281658: Add a security category to the java -XshowSettings option
  • 43099a8: 8311647: Memory leak in Java_jdk_internal_org_jline_terminal_impl_jna_linux_CLibraryImpl_ttyname_1r
  • c7c6d47: 6355567: AdobeMarkerSegment causes failure to read valid JPEG
  • af7f95e: 8310070: Test: javax/net/ssl/DTLS/DTLSWontNegotiateV10.java timed out
  • c710e71: 8311102: Write annotations in the classfile dumped by SA
  • 61932f4: 8244289: fatal error: Possible safepoint reached by thread that does not allow it
  • ... and 10 more: https://git.openjdk.org/jdk/compare/11a5115caf179a1bbed5311e12ed3851e026c5c5...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 14, 2023
@openjdk openjdk bot closed this Jul 14, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Jul 14, 2023
@openjdk
Copy link

openjdk bot commented Jul 14, 2023

@DamonFool @xiangzhai Pushed as commit 167d1c1.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
6 participants