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

[lworld] ShouldNotReachHere in FieldLayout::remove_null_marker()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • repo-valhalla
    • repo-valhalla
    • hotspot

      Running TestFieldNullMarkers.java from my prototype fix for JDK-8341759 (see https://github.com/openjdk/valhalla/pull/1318) with "-Xint and "-XX:InlineFieldMaxFlatSize=0" crashes the VM:

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/oracle/valhalla/open/src/hotspot/share/classfile/fieldLayoutBuilder.cpp:599), pid=3472339, tid=3472358
      # Error: ShouldNotReachHere()
      #
      # JRE version: Java(TM) SE Runtime Environment (24.0) (fastdebug build 24-lworld5ea-2024-12-16-0919151.tobias...)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 24-lworld5ea-2024-12-16-0919151.tobias..., interpreted mode, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0xc737b6] FieldLayout::remove_null_marker()+0xa6
      #
      # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /oracle/valhalla/open/JTwork/scratch/core.3472339)
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #

      --------------- S U M M A R Y ------------

      Command Line: -Dtest.vm.opts=-XX:InlineFieldMaxFlatSize=0 -Xint -Dtest.tool.vm.opts=-J-XX:InlineFieldMaxFlatSize=0 -J-Xint -Dtest.compiler.opts= -Dtest.java.opts= -Dtest.jdk=/oracle/valhalla/build/fastdebug/jdk -Dcompile.jdk=/oracle/valhalla/build/fastdebug/jdk -Dtest.timeout.factor=10.0 -Dtest.root=/oracle/valhalla/open/test/hotspot/jtreg -Dtest.name=compiler/valhalla/inlinetypes/TestFieldNullMarkers.java -Dtest.file=/oracle/valhalla/open/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestFieldNullMarkers.java -Dtest.src=/oracle/valhalla/open/test/hotspot/jtreg/compiler/valhalla/inlinetypes -Dtest.src.path=/oracle/valhalla/open/test/hotspot/jtreg/compiler/valhalla/inlinetypes:/oracle/valhalla/open/test/lib:/oracle/valhalla/open/test/hotspot/jtreg -Dtest.classes=/oracle/valhalla/open/JTwork/classes/compiler/valhalla/inlinetypes/TestFieldNullMarkers.d -Dtest.class.path=/oracle/valhalla/open/JTwork/classes/compiler/valhalla/inlinetypes/TestFieldNullMarkers.d:/oracle/valhalla/open/JTwork/classes/test/lib:/oracle/valhalla/open/JTwork/classes -Dtest.modules=java.base/jdk.internal.value java.base/jdk.internal.vm.annotation -Dtest.enable.preview=true --add-modules=java.base --add-exports=java.base/jdk.internal.value=ALL-UNNAMED --add-exports=java.base/jdk.internal.vm.annotation=ALL-UNNAMED -XX:InlineFieldMaxFlatSize=0 -Xint -Xbatch -XX:+NullableFieldFlattening -XX:+AtomicFieldFlattening --enable-preview com.sun.javatest.regtest.agent.MainWrapper /oracle/valhalla/open/JTwork/compiler/valhalla/inlinetypes/TestFieldNullMarkers.d/main.1.jta

      Host: prometheus, 12th Gen Intel(R) Core(TM) i7-12800H, 20 cores, 31G, Ubuntu 24.04.1 LTS
      Time: Fri Dec 20 09:21:10 2024 CET elapsed time: 0.314672 seconds (0d 0h 0m 0s)

      --------------- T H R E A D ---------------

      Current thread (0x000078bbb84e68e0): JavaThread "MainThread" [_thread_in_vm, id=3472358, stack(0x000078bb9bf00000,0x000078bb9c000000) (1024K)]

      Stack: [0x000078bb9bf00000,0x000078bb9c000000], sp=0x000078bb9bff9660, free space=997k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xc737b6] FieldLayout::remove_null_marker()+0xa6 (fieldLayoutBuilder.cpp:599)
      V [libjvm.so+0xc7d3e4] FieldLayoutBuilder::compute_inline_class_layout()+0x514 (fieldLayoutBuilder.cpp:1180)
      V [libjvm.so+0x9d8244] ClassFileParser::post_process_parsed_stream(ClassFileStream const*, ConstantPool*, JavaThread*)+0x1a44 (classFileParser.cpp:6300)
      V [libjvm.so+0x9df142] ClassFileParser::ClassFileParser(ClassFileStream*, Symbol*, ClassLoaderData*, ClassLoadInfo const*, ClassFileParser::Publicity, JavaThread*)+0x392 (classFileParser.cpp:5685)
      V [libjvm.so+0x12b3796] KlassFactory::create_from_stream(ClassFileStream*, Symbol*, ClassLoaderData*, ClassLoadInfo const&, JavaThread*)+0xd6 (klassFactory.cpp:202)
      V [libjvm.so+0x189c812] SystemDictionary::resolve_class_from_stream(ClassFileStream*, Symbol*, Handle, ClassLoadInfo const&, JavaThread*)+0xb2 (systemDictionary.cpp:911)
      V [libjvm.so+0x10df53e] jvm_define_class_common(char const*, _jobject*, signed char const*, int, _jobject*, char const*, JavaThread*)+0x2ae (jvm.cpp:977)
      V [libjvm.so+0x10df7dc] JVM_DefineClassWithSource+0x8c (jvm.cpp:1144)
      C [libjava.so+0xf112] Java_java_lang_ClassLoader_defineClass1+0x152 (ClassLoader.c:139)

            fparain Frederic Parain
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: