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

RISC-V: Fix temp usages of heapbase register killed by MacroAssembler::en/decode_klass_not_null



    • 19
    • b24
    • riscv
    • linux



        A crash is observed when running the movie-lens benchmark in Renaissance using a native build JDK with -UseCompressedOops, +UseCompressedClassPointers, and C2 enabled.

        The fix is understood and a workaround for this issue can be disabling CDS.

        To reproduce using a cross-compiled:
        # dump one cds-nocoops.jsa
        <java> -XX:-UseCompressedOops -XX:+UseCompressedClassPointers -Xshare:dump -Xlog:cds* -version

        # reproduce
        <java> -XX:-UseCompressedOops -XX:+UseCompressedClassPointers -Xshare:on -XX:-TieredCompilation -Xlog:cds* -Xlog:gc+metaspace=info -Xshare:on -jar renaissance-gpl-0.14.1.jar -r 1 movie-lens

        Logs: (fastdebug build)
        [1.089s][info][cds] trying to map /jdk/tmp2/jdk/lib/server/classes_nocoops.jsa
        [1.092s][info][cds] Opened archive /jdk/tmp2/jdk/lib/server/classes_nocoops.jsa.
        [1.092s][info][cds] Archive was created with UseCompressedOops = 0, UseCompressedClassPointers = 1
        [1.093s][info][cds] full module graph: disabled because archive was created without full module graph
        [1.093s][info][cds] Core region alignment: 4096
        [1.104s][info][cds] Reserved archive_space_rs [0x0000000800000000 - 0x0000000801000000] (16777216) bytes
        [1.105s][info][cds] Reserved class_space_rs [0x0000000801000000 - 0x0000000841000000] (1073741824) bytes
        [1.105s][info][cds] Mapped static region #0 at base 0x0000000800000000 top 0x00000008004fa000 (ReadWrite)
        [1.106s][info][cds] Mapped static region #1 at base 0x00000008004fa000 top 0x0000000800cdd000 (ReadOnly)
        [1.107s][info][cds] optimized module handling: enabled
        [1.107s][info][cds] full module graph: disabled
        [1.110s][info][gc,metaspace] CDS archive(s) mapped at: [0x0000000800000000-0x0000000800cdd000-0x0000000800cdd000), size 13488128, SharedBaseAddress: 0x0000000800000000, ArchiveRelocationMode: 0.
        [1.111s][info][gc,metaspace] Compressed class space mapped at: 0x0000000801000000-0x0000000841000000, reserved size: 1073741824
        [1.111s][info][gc,metaspace] Narrow klass base: 0x0000000800000000, Narrow klass shift: 0, Narrow klass range: 0x100000000
        Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
        ............. (ignored)
        [129.485s][info][gc,metaspace] GC(25) Metaspace: 66099K(67264K)->66099K(67264K) NonClass: 57560K(58240K)->57560K(58240K) Class: 8539K(9024K)->8539K(9024K)
        # To suppress the following error report, specify this argument# To suppress the following error report, specify this argument
        # after -XX: or in .hotspotrc: SuppressErrorAt=
        # after -XX: or in .hotspotrc: SuppressErrorAt=/stackValue.cpp:154/stackValue.cpp:154

        [thread 2836 also had an error]
        # A fatal error has been detected by the Java Runtime Environment:
        # Internal Error (/home/buildbot/worker/build-jdkX-debian11/build/src/hotspot/share/runtime/stackValue.cpp:154), pid=2608, tid=2838
        # assert(oopDesc::is_oop_or_null(val)) failed: bad oop found at 0x00000054e0e5d450 in_cont: 0 compressed: 0
        # JRE version: OpenJDK Runtime Environment (20.0) (fastdebug build 20-testing-builds.shipilev.net-openjdk-jdk-b249-20221102)
        # Java VM: OpenJDK 64-Bit Server VM (fastdebug 20-testing-builds.shipilev.net-openjdk-jdk-b249-20221102, mixed mode, sharing, compressed class ptrs, g1 gc, linux-riscv64)
        # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
        # An error report file with more information is saved as:
        # /jdk/hs_err_pid2608.log
        [thread 2837 also had an error]
        [130.823s][warning][os ] Loading hsdis library failed
        # If you would like to submit a bug report, please visit:
        # https://bugreport.java.com/bugreport/crash.jsp


          Issue Links



                xlinzheng Xiaolin Zheng
                xlinzheng Xiaolin Zheng
                0 Vote for this issue
                4 Start watching this issue