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

gc/stringdedup/TestStringDeduplicationPrintOptions.java#ZSinglegen fails "guarantee(jfieldIDWorkaround::is_instance_jfieldID(k, id)) failed: must be an instance field"

    XMLWordPrintable

Details

    • x86_64
    • linux

    Description

      The following test failed in the JDK22 CI:

      gc/stringdedup/TestStringDeduplicationPrintOptions.java#ZSinglegen

      Here's a snippet from the log file:

      #section:driver
      ----------messages:(8/436)----------
      command: driver gc.stringdedup.TestStringDeduplicationPrintOptions Z -XX:-ZGenerational
      reason: User specified action: run driver gc.stringdedup.TestStringDeduplicationPrintOptions Z -XX:-ZGenerational
      started: Thu Dec 21 20:28:49 UTC 2023
      Mode: agentvm
      Agent id: 29
      Additional opens to unnamed modules from @modules: java.base/jdk.internal.misc java.base/java.lang
      finished: Thu Dec 21 20:28:58 UTC 2023
      elapsed time (seconds): 9.233
      ----------configuration:(18/2412)----------

      <snip>

      ----------System.out:(26/4852)----------
      Command line: [/opt/mach5/mesos/work_dir/jib-master/install/jdk-22+29-2284/linux-x64-debug.jdk/jdk-22/fastdebug/bin/java -cp /opt/mach5/mesos/work_dir/slaves/afbc6042-3a24-4198-9369-18c663a3f74c-S26268/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/2b87cfed-5401-43da-86a5-99a7926bc7b5/runs/2a1d280a-b563-43a4-86ac-a539052b21e6/testoutput/test-support/jtreg_open_test_hotspot_jtreg_gc/classes/4/gc/stringdedup/TestStringDeduplicationPrintOptions_ZSinglegen.d:/opt/mach5/mesos/work_dir/jib-master/install/jdk-22+29-2284/src.full/open/test/hotspot/jtreg/gc/stringdedup:/opt/mach5/mesos/work_dir/slaves/afbc6042-3a24-4198-9369-18c663a3f74c-S26268/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/2b87cfed-5401-43da-86a5-99a7926bc7b5/runs/2a1d280a-b563-43a4-86ac-a539052b21e6/testoutput/test-support/jtreg_open_test_hotspot_jtreg_gc/classes/4:/opt/mach5/mesos/work_dir/slaves/afbc6042-3a24-4198-9369-18c663a3f74c-S26268/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/2b87cfed-5401-43da-86a5-99a7926bc7b5/runs/2a1d280a-b563-43a4-86ac-a539052b21e6/testoutput/test-support/jtreg_open_test_hotspot_jtreg_gc/classes/4/test/lib:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/7.3.1/1/bundles/jtreg-7.3.1+1.zip/jtreg/lib/jtreg.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/7.3.1/1/bundles/jtreg-7.3.1+1.zip/jtreg/lib/junit-platform-console-standalone-1.9.2.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/7.3.1/1/bundles/jtreg-7.3.1+1.zip/jtreg/lib/testng-7.3.0.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/7.3.1/1/bundles/jtreg-7.3.1+1.zip/jtreg/lib/jcommander-1.82.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/7.3.1/1/bundles/jtreg-7.3.1+1.zip/jtreg/lib/guice-5.1.0.jar -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/21/35/bundles/linux-x64/jdk-21_linux-x64_bin.tar.gz/jdk-21 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/afbc6042-3a24-4198-9369-18c663a3f74c-S26268/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/2b87cfed-5401-43da-86a5-99a7926bc7b5/runs/2a1d280a-b563-43a4-86ac-a539052b21e6/testoutput/test-support/jtreg_open_test_hotspot_jtreg_gc/tmp -Dcom.oracle.usagetracker.config.file=/opt/mach5/mesos/work_dir/slaves/afbc6042-3a24-4198-9369-18c663a3f74c-S26268/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/2b87cfed-5401-43da-86a5-99a7926bc7b5/runs/2a1d280a-b563-43a4-86ac-a539052b21e6/./testoutput/test-support/jtreg_open_test_hotspot_jtreg_gc/usage-tracker.cfg -XX:+UseZGC -XX:-ZGenerational -Xmn50m -Xms100m -Xmx100m -XX:+UnlockDiagnosticVMOptions --add-opens=java.base/java.lang=ALL-UNNAMED -XX:+VerifyAfterGC -XX:+UseStringDeduplication -XX:StringDeduplicationAgeThreshold=3 gc.stringdedup.TestStringDeduplicationTools$DeduplicationTest 10 5 3 YoungGC ]
      [2023-12-21T20:28:49.418140939Z] Gathering output for process 2956899
      Begin: DeduplicationTest
      Creating strings: total=10, unique=5
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/opt/mach5/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S9811/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/3820ac90-4c7c-4931-abc4-22b8c8ffa586/runs/b50f3dab-c7ad-4cf2-afb8-c3821045bfc2/workspace/open/src/hotspot/share/prims/jni.cpp:250), pid=2956899, tid=2956900
      # guarantee(jfieldIDWorkaround::is_instance_jfieldID(k, id)) failed: must be an instance field
      #
      # JRE version: Java(TM) SE Runtime Environment (22.0+29) (fastdebug build 22-ea+29-2284)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 22-ea+29-2284, mixed mode, sharing, tiered, compressed class ptrs, z gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0xf99ce0] jfieldIDWorkaround::verify_instance_jfieldID(Klass*, _jfieldID*)+0x1e0
      #
      # Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /opt/mach5/mesos/work_dir/slaves/afbc6042-3a24-4198-9369-18c663a3f74c-S26268/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/2b87cfed-5401-43da-86a5-99a7926bc7b5/runs/2a1d280a-b563-43a4-86ac-a539052b21e6/testoutput/test-support/jtreg_open_test_hotspot_jtreg_gc/scratch/0/core.2956899)
      #
      # An error report file with more information is saved as:
      # /opt/mach5/mesos/work_dir/slaves/afbc6042-3a24-4198-9369-18c663a3f74c-S26268/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/2b87cfed-5401-43da-86a5-99a7926bc7b5/runs/2a1d280a-b563-43a4-86ac-a539052b21e6/testoutput/test-support/jtreg_open_test_hotspot_jtreg_gc/scratch/0/hs_err_pid2956899.log
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #

      [2023-12-21T20:28:58.522274398Z] Waiting for completion for process 2956899
      [2023-12-21T20:28:58.522427378Z] Waiting for completion finished for process 2956899
      ----------System.err:(38/2644)----------

       stdout: [Begin: DeduplicationTest
      Creating strings: total=10, unique=5
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/opt/mach5/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S9811/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/3820ac90-4c7c-4931-abc4-22b8c8ffa586/runs/b50f3dab-c7ad-4cf2-afb8-c3821045bfc2/workspace/open/src/hotspot/share/prims/jni.cpp:250), pid=2956899, tid=2956900
      # guarantee(jfieldIDWorkaround::is_instance_jfieldID(k, id)) failed: must be an instance field
      #
      # JRE version: Java(TM) SE Runtime Environment (22.0+29) (fastdebug build 22-ea+29-2284)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 22-ea+29-2284, mixed mode, sharing, tiered, compressed class ptrs, z gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0xf99ce0] jfieldIDWorkaround::verify_instance_jfieldID(Klass*, _jfieldID*)+0x1e0
      #
      # Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /opt/mach5/mesos/work_dir/slaves/afbc6042-3a24-4198-9369-18c663a3f74c-S26268/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/2b87cfed-5401-43da-86a5-99a7926bc7b5/runs/2a1d280a-b563-43a4-86ac-a539052b21e6/testoutput/test-support/jtreg_open_test_hotspot_jtreg_gc/scratch/0/core.2956899)
      #
      # An error report file with more information is saved as:
      # /opt/mach5/mesos/work_dir/slaves/afbc6042-3a24-4198-9369-18c663a3f74c-S26268/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/2b87cfed-5401-43da-86a5-99a7926bc7b5/runs/2a1d280a-b563-43a4-86ac-a539052b21e6/testoutput/test-support/jtreg_open_test_hotspot_jtreg_gc/scratch/0/hs_err_pid2956899.log
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #
      ];
       stderr: []
       exitValue = 134

      java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [134]
      at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:513)
      at gc.stringdedup.TestStringDeduplicationTools.testPrintOptions(TestStringDeduplicationTools.java:522)
      at gc.stringdedup.TestStringDeduplicationPrintOptions.main(TestStringDeduplicationPrintOptions.java:107)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      at java.base/java.lang.reflect.Method.invoke(Method.java:580)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
      at java.base/java.lang.Thread.run(Thread.java:1570)

      JavaTest Message: Test threw exception: java.lang.RuntimeException
      JavaTest Message: shutting down test

      result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [134]

      Here's the crashing thread's stack:

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

      Current thread (0x00007f695402e760): JavaThread "main" [_thread_in_vm, id=2956900, stack(0x00007f695ee95000,0x00007f695ef96000) (1028K)]

      Stack: [0x00007f695ee95000,0x00007f695ef96000], sp=0x00007f695ef936e0, free space=1017k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xf99ce0] jfieldIDWorkaround::verify_instance_jfieldID(Klass*, _jfieldID*)+0x1e0 (jni.cpp:250)
      V [libjvm.so+0xf9f84a] jni_SetIntField+0xda (jfieldIDWorkaround.hpp:137)
      C [libjava.so+0x10223] Java_jdk_internal_loader_NativeLibraries_load+0x243 (NativeLibraries.c:166)
      j jdk.internal.loader.NativeLibraries.load(Ljdk/internal/loader/NativeLibraries$NativeLibraryImpl;Ljava/lang/String;ZZ)Z+0 java.base@22-ea
      j jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open()Z+57 java.base@22-ea
      j jdk.internal.loader.NativeLibraries.loadLibrary(Ljava/lang/Class;Ljava/lang/String;Z)Ljdk/internal/loader/NativeLibrary;+254 java.base@22-ea
      j jdk.internal.loader.NativeLibraries.loadLibrary(Ljava/lang/Class;Ljava/io/File;)Ljdk/internal/loader/NativeLibrary;+51 java.base@22-ea
      j jdk.internal.loader.NativeLibraries.findFromPaths([Ljava/lang/String;Ljava/lang/Class;Ljava/lang/String;)Ljdk/internal/loader/NativeLibrary;+44 java.base@22-ea
      j jdk.internal.loader.NativeLibraries.loadLibrary(Ljava/lang/Class;Ljava/lang/String;)Ljdk/internal/loader/NativeLibrary;+30 java.base@22-ea
      j java.lang.ClassLoader.loadLibrary(Ljava/lang/Class;Ljava/lang/String;)Ljdk/internal/loader/NativeLibrary;+22 java.base@22-ea
      j java.lang.Runtime.loadLibrary0(Ljava/lang/Class;Ljava/lang/String;)V+53 java.base@22-ea
      j java.lang.System.loadLibrary(Ljava/lang/String;)V+7 java.base@22-ea
      j java.lang.management.ManagementFactory.lambda$loadNativeLib$8()Ljava/lang/Void;+3 java.management@22-ea
      j java.lang.management.ManagementFactory$$Lambda+0x00007f66df044eb0.run()Ljava/lang/Object;+0 java.management@22-ea
      j java.security.AccessController.executePrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;Ljava/lang/Class;)Ljava/lang/Object;+29 java.base@22-ea
      j java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;+5 java.base@22-ea
      j java.lang.management.ManagementFactory.loadNativeLib()V+5 java.management@22-ea
      j java.lang.management.ManagementFactory.<clinit>()V+16 java.management@22-ea
      v ~StubRoutines::call_stub 0x00007f694417ed1a
      V [libjvm.so+0xe83a39] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x4a9 (javaCalls.cpp:415)
      V [libjvm.so+0xe34ab5] InstanceKlass::call_class_initializer(JavaThread*)+0x265 (instanceKlass.cpp:1630)
      V [libjvm.so+0xe375ad] InstanceKlass::initialize_impl(JavaThread*)+0x7ad (instanceKlass.cpp:1214)
      V [libjvm.so+0xe37d6e] InstanceKlass::initialize(JavaThread*)+0x9e (instanceKlass.cpp:753)
      V [libjvm.so+0x123c1f8] LinkResolver::resolve_static_call(CallInfo&, LinkInfo const&, bool, JavaThread*)+0x98 (linkResolver.cpp:1079)
      V [libjvm.so+0x123c4d3] LinkResolver::resolve_invokestatic(CallInfo&, constantPoolHandle const&, int, JavaThread*)+0x73 (linkResolver.cpp:1674)
      V [libjvm.so+0x123f558] LinkResolver::resolve_invoke(CallInfo&, Handle, constantPoolHandle const&, int, Bytecodes::Code, JavaThread*)+0x108 (linkResolver.cpp:1633)
      V [libjvm.so+0xe6c074] InterpreterRuntime::resolve_invoke(JavaThread*, Bytecodes::Code)+0x304 (interpreterRuntime.cpp:848)
      V [libjvm.so+0xe6cd78] InterpreterRuntime::resolve_from_cache(JavaThread*, Bytecodes::Code)+0x88 (interpreterRuntime.cpp:976)
      j gc.stringdedup.TestStringDeduplicationTools.registerGCListener()V+0
      j gc.stringdedup.TestStringDeduplicationTools.doYoungGc(I)V+12
      j gc.stringdedup.TestStringDeduplicationTools.forceDeduplication(ILjava/lang/String;)V+19
      j gc.stringdedup.TestStringDeduplicationTools$DeduplicationTest.main([Ljava/lang/String;)V+44
      v ~StubRoutines::call_stub 0x00007f694417ed1a
      V [libjvm.so+0xe83a39] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x4a9 (javaCalls.cpp:415)
      V [libjvm.so+0xfb67f0] jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, JavaThread*) [clone .constprop.1]+0x360 (jni.cpp:888)
      V [libjvm.so+0xfb9ef3] jni_CallStaticVoidMethod+0x193 (jni.cpp:1712)
      C [libjli.so+0x39f0] invokeStaticMainWithArgs+0x70 (java.c:418)
      C [libjli.so+0x49cd] JavaMain+0xd9d (java.c:623)
      C [libjli.so+0x7ca9] ThreadJavaMain+0x9 (java_md.c:650)
      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      j jdk.internal.loader.NativeLibraries.load(Ljdk/internal/loader/NativeLibraries$NativeLibraryImpl;Ljava/lang/String;ZZ)Z+0 java.base@22-ea
      j jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open()Z+57 java.base@22-ea
      j jdk.internal.loader.NativeLibraries.loadLibrary(Ljava/lang/Class;Ljava/lang/String;Z)Ljdk/internal/loader/NativeLibrary;+254 java.base@22-ea
      j jdk.internal.loader.NativeLibraries.loadLibrary(Ljava/lang/Class;Ljava/io/File;)Ljdk/internal/loader/NativeLibrary;+51 java.base@22-ea
      j jdk.internal.loader.NativeLibraries.findFromPaths([Ljava/lang/String;Ljava/lang/Class;Ljava/lang/String;)Ljdk/internal/loader/NativeLibrary;+44 java.base@22-ea
      j jdk.internal.loader.NativeLibraries.loadLibrary(Ljava/lang/Class;Ljava/lang/String;)Ljdk/internal/loader/NativeLibrary;+30 java.base@22-ea
      j java.lang.ClassLoader.loadLibrary(Ljava/lang/Class;Ljava/lang/String;)Ljdk/internal/loader/NativeLibrary;+22 java.base@22-ea
      j java.lang.Runtime.loadLibrary0(Ljava/lang/Class;Ljava/lang/String;)V+53 java.base@22-ea
      j java.lang.System.loadLibrary(Ljava/lang/String;)V+7 java.base@22-ea
      j java.lang.management.ManagementFactory.lambda$loadNativeLib$8()Ljava/lang/Void;+3 java.management@22-ea
      j java.lang.management.ManagementFactory$$Lambda+0x00007f66df044eb0.run()Ljava/lang/Object;+0 java.management@22-ea
      j java.security.AccessController.executePrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;Ljava/lang/Class;)Ljava/lang/Object;+29 java.base@22-ea
      j java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;+5 java.base@22-ea
      j java.lang.management.ManagementFactory.loadNativeLib()V+5 java.management@22-ea
      j java.lang.management.ManagementFactory.<clinit>()V+16 java.management@22-ea
      v ~StubRoutines::call_stub 0x00007f694417ed1a
      j gc.stringdedup.TestStringDeduplicationTools.registerGCListener()V+0
      j gc.stringdedup.TestStringDeduplicationTools.doYoungGc(I)V+12
      j gc.stringdedup.TestStringDeduplicationTools.forceDeduplication(ILjava/lang/String;)V+19
      j gc.stringdedup.TestStringDeduplicationTools$DeduplicationTest.main([Ljava/lang/String;)V+44
      v ~StubRoutines::call_stub 0x00007f694417ed1a


      Since this test failure happened in a jni_SetIntField() call, I'm
      starting this bug off in hotspot/runtime for initial triage.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dcubed Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: