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

Deoptimization fails with assert "object should be reallocated already"

XMLWordPrintable

    • b23

      Various stress tests intermittently hit below assert with -XX:+StressUnstableIfTraps (JDK-8335334):

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/open/src/hotspot/share/runtime/vframeArray.cpp:133), pid=1768113, tid=1768171
      # assert(!value->obj_is_scalar_replaced() || realloc_failures) failed: object should be reallocated already
      #
      # JRE version: Java(TM) SE Runtime Environment (24.0) (fastdebug build 24-internal-2024-07-08-1313517.tobias.hartmann.jdk2)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 24-internal-2024-07-08-1313517.tobias.hartmann.jdk2, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x187877c] vframeArrayElement::fill_in(compiledVFrame*, bool)+0x4ac

      Stack: [0x00007fce5ed78000,0x00007fce5ee78000], sp=0x00007fce5ee72160, free space=1000k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x187877c] vframeArrayElement::fill_in(compiledVFrame*, bool)+0x4ac (vframeArray.cpp:133)
      V [libjvm.so+0x187a326] vframeArray::fill_in(JavaThread*, int, GrowableArray<compiledVFrame*>*, RegisterMap const*, bool)+0x66 (vframeArray.cpp:533)
      V [libjvm.so+0x187a544] vframeArray::allocate(JavaThread*, int, GrowableArray<compiledVFrame*>*, RegisterMap*, frame, frame, frame, bool)+0x104 (vframeArray.cpp:520)
      V [libjvm.so+0xabbb5d] Deoptimization::create_vframeArray(JavaThread*, frame, RegisterMap*, GrowableArray<compiledVFrame*>*, bool)+0x14d (deoptimization.cpp:1678)
      V [libjvm.so+0xabf465] Deoptimization::fetch_unroll_info_helper(JavaThread*, int)+0x4f5 (deoptimization.cpp:560)
      V [libjvm.so+0xac08c2] Deoptimization::uncommon_trap(JavaThread*, int, int)+0x32 (deoptimization.cpp:2598)
      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      v ~UncommonTrapBlob 0x00007fce83e90081
      J 22039 c2 jdk.nio.zipfs.ZipFileSystem.iteratorOf(Ljdk/nio/zipfs/ZipPath;Ljava/nio/file/DirectoryStream$Filter;)Ljava/util/Iterator; jdk.zipfs@24-internal (150 bytes) @ 0x00007fce84e23238 [0x00007fce84e20420+0x0000000000002e18]
      J 19358 c1 jdk.nio.zipfs.ZipDirectoryStream.iterator()Ljava/util/Iterator; jdk.zipfs@24-internal (73 bytes) @ 0x00007fce7e6c91ac [0x00007fce7e6c9020+0x000000000000018c]
      J 19492 c1 java.nio.file.FileTreeWalker$DirectoryNode.<init>(Ljava/nio/file/Path;Ljava/lang/Object;Ljava/nio/file/DirectoryStream;)V java.base@24-internal (30 bytes) @ 0x00007fce7e6cab8c [0x00007fce7e6caa20+0x000000000000016c]
      j java.nio.file.FileTreeWalker.visit(Ljava/nio/file/Path;ZZ)Ljava/nio/file/FileTreeWalker$Event;+184 java.base@24-internal
      j java.nio.file.FileTreeWalker.next()Ljava/nio/file/FileTreeWalker$Event;+134 java.base@24-internal
      [...]

      And with compiler/codegen/aes/TestAESMain.java:

      Stack: [0x0000000171adc000,0x0000000171cdf000], sp=0x0000000171cdccc0, free space=2051k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.dylib+0x11303e4] VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x544 (vframeArray.cpp:133)
      V [libjvm.dylib+0x1130b94] VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*)+0x0
      V [libjvm.dylib+0x54c850] print_error_for_unit_test(char const*, char const*, char*)+0x0
      V [libjvm.dylib+0x1119650] vframeArrayElement::fill_in(compiledVFrame*, bool)+0xc94
      V [libjvm.dylib+0x111ae74] vframeArray::fill_in(JavaThread*, int, GrowableArray<compiledVFrame*>*, RegisterMap const*, bool)+0x64
      V [libjvm.dylib+0x111adf0] vframeArray::allocate(JavaThread*, int, GrowableArray<compiledVFrame*>*, RegisterMap*, frame, frame, frame, bool)+0xe8
      V [libjvm.dylib+0x56d068] Deoptimization::create_vframeArray(JavaThread*, frame, RegisterMap*, GrowableArray<compiledVFrame*>*, bool)+0x178
      V [libjvm.dylib+0x56ad28] Deoptimization::fetch_unroll_info_helper(JavaThread*, int)+0x61c
      V [libjvm.dylib+0x575dd4] Deoptimization::uncommon_trap(JavaThread*, int, int)+0xa4
      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      v ~UncommonTrapBlob 0x0000000113cf4fac
      J 1439 c2 compiler.codegen.aes.TestAESEncode.run()V (201 bytes) @ 0x00000001143180cc [0x00000001143174c0+0x0000000000000c0c]
      j compiler.codegen.aes.TestAESMain.main([Ljava/lang/String;)V+316

        1. Test.java
          2 kB
        2. Test2.java
          0.6 kB
        3. Test3.java
          0.6 kB

            cslucas Cesar Soares
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: