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

[lworld] Register corruption in GC barrier slow paths in scalarized calling convention on AArch64

XMLWordPrintable

      Even with the fix for JDK-8364579, the tests from JDK-8364579 (both the ones attached to the bug as well as the one pushed as regression test) still trigger issues on AArch64.

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/home/opc/valhalla/open/src/hotspot/share/oops/compressedKlass.inline.hpp:80), pid=958046, tid=958048
      # assert(is_encodable(addr)) failed: Address 0x00000000c38726ce is not encodable (Klass range: [0x000000009f000000 - 0x00000000df000000), (1073741824 bytes), klass alignment: 8)
      #
      # JRE version: Java(TM) SE Runtime Environment (25.0) (fastdebug build 25-lworld5ea-LTS-2025-08-22-1512040.opc...)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-lworld5ea-LTS-2025-08-22-1512040.opc..., mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
      # Problematic frame:
      # V [libjvm.so+0x36542c] CompressedKlassPointers::decode_not_null(unsigned int)+0x16c
      #

      Stack: [0x0000ffffc6108000,0x0000ffffc6306000], sp=0x0000ffffc6303b50, free space=2030k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x36542c] CompressedKlassPointers::decode_not_null(unsigned int)+0x16c (compressedKlass.inline.hpp:80)
      V [libjvm.so+0xc74654] G1FullGCMarker::mark_object(oop)+0x174

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x0000ffff6b4a94c4, pid=958122, tid=958144
      #
      # JRE version: Java(TM) SE Runtime Environment (25.0) (fastdebug build 25-lworld5ea-LTS-2025-08-22-1512040.opc...)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-lworld5ea-LTS-2025-08-22-1512040.opc..., mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
      # Problematic frame:
      # J 41 c1 TestVirtualThreads2$LargeValueWithOops.verify(Ljava/lang/String;Ljava/lang/Object;)V (63 bytes) @ 0x0000ffff6b4a94c4 [0x0000ffff6b4a8c40+0x0000000000000884]
      #

      The issues reproduce with:
      -XX:-InlineTypeReturnedAsFields

      But not with
      -XX:-InlineTypePassFieldsAsArgs

      -XX:+VerifyOops also triggers which suggests that there is (at least) an invalid oop.

      Also reproduces with -XX:+UseParallelGC but then we always seem to hit this:

      Exception thrown: java.lang.NullPointerException: Cannot invoke "Object.toString()" because "obj" is null
      java.lang.NullPointerException: Cannot invoke "Object.toString()" because "obj" is null
              at java.base/java.lang.String.valueOf(String.java:4525)
              at TestVirtualThreads$LargeValueWithOops.verify(TestVirtualThreads.java:235)
              at TestVirtualThreads$LargeValueWithOops.verify(TestVirtualThreads.java:245)
              at TestVirtualThreads.testLargeValueWithOopsHelper(TestVirtualThreads.java:432)
              at TestVirtualThreads.lambda$main$0(TestVirtualThreads.java:592)
              at java.base/java.lang.Thread.run(Thread.java:1447)

      We should enable test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestOopsInReturnConvention.java on AArch64 once this issue is fixed.

            mchevalier Marc Chevalier
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: