Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8323556

CDS archive space addresses should be randomized with ArchiveRelocationMode=1

    XMLWordPrintable

Details

    • b26
    • b07
    • aarch64
    • generic
    • Verified

    Backports

      Description

        With JDK22 build 25: (expected behavior)
        ./jdk-22/fastdebug/bin/java -version
        java version "22-ea" 2024-03-19
        Java(TM) SE Runtime Environment (fastdebug build 22-ea+25-1998)
        Java HotSpot(TM) 64-Bit Server VM (fastdebug build 22-ea+25-1998, mixed mode, sharing)
        $ ./jdk-22/fastdebug/bin/java -Xlog:cds -XX:+UnlockDiagnosticVMOptions -XX:ArchiveRelocationMode=1 --version | grep archive_space_rs | tail -1
        [0.034s][info][cds] Reserved archive_space_rs [0x000002f000000000 - 0x000002f001000000] (16777216) bytes
        $ ./jdk-22/fastdebug/bin/java -Xlog:cds -XX:+UnlockDiagnosticVMOptions -XX:ArchiveRelocationMode=1 --version | grep archive_space_rs | tail -1
        [0.031s][info][cds] Reserved archive_space_rs [0x000001c000000000 - 0x000001c001000000] (16777216) bytes
        $ ./jdk-22/fastdebug/bin/java -Xlog:cds -XX:+UnlockDiagnosticVMOptions -XX:ArchiveRelocationMode=1 --version | grep archive_space_rs | tail -1
        [0.032s][info][cds] Reserved archive_space_rs [0x0000016000000000 - 0x0000016001000000] (16777216) bytes

        With JDK22 build 26: (the archive address spaces are the same from run to run)
        java version "22-ea" 2024-03-19
        Java(TM) SE Runtime Environment (fastdebug build 22-ea+26-2112)
        Java HotSpot(TM) 64-Bit Server VM (fastdebug build 22-ea+26-2112, mixed mode, sharing)
        $ ./jdk-22/fastdebug/bin/java -Xlog:cds -XX:+UnlockDiagnosticVMOptions -XX:ArchiveRelocationMode=1 --version | grep archive_space_rs | tail -1
        [0.033s][info][cds] Reserved archive_space_rs [0x00007ff000000000 - 0x00007ff001000000] (16777216) bytes
        $ ./jdk-22/fastdebug/bin/java -Xlog:cds -XX:+UnlockDiagnosticVMOptions -XX:ArchiveRelocationMode=1 --version | grep archive_space_rs | tail -1
        [0.032s][info][cds] Reserved archive_space_rs [0x00007ff000000000 - 0x00007ff001000000] (16777216) bytes
        $ ./jdk-22/fastdebug/bin/java -Xlog:cds -XX:+UnlockDiagnosticVMOptions -XX:ArchiveRelocationMode=1 --version | grep archive_space_rs | tail -1
        [0.032s][info][cds] Reserved archive_space_rs [0x00007ff000000000 - 0x00007ff001000000] (16777216) bytes

        Bug only observed on the aarch64 platform.

        (Note: in JDK22, the ArchiveRelocationMode is enabled by default. So the above results should be the same without the "-XX:+UnlockDiagnosticVMOptions -XX:ArchiveRelocationMode=1" VM options.)

        Attachments

          Issue Links

            Activity

              People

                ccheung Calvin Cheung
                ccheung Calvin Cheung
                Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: