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

assert(Atomic::add(&ik->_shared_class_load_count, 1) == 1) failed: shared class loaded more than once

XMLWordPrintable

    • b17
    • x86_64
    • linux

      The following test failed in the JDK24 CI:

      vmTestbase/nsk/sysdict/vm/stress/chain/chain007/chain007.java

      Here's a snippet from the log file:

      Starting Thread[#53,nsk.sysdict.share.SysDictTest$Worker@11fe44c7,5,MainThreadGroup]
      Starting Thread[#54,nsk.sysdict.share.SysDictTest$Worker@5ae7cbd1,5,MainThreadGroup]
      Starting Thread[#55,nsk.sysdict.share.SysDictTest$Worker@7e0a7597,5,MainThreadGroup]
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/opt/mach5/mesos/work_dir/slaves/a4a7850a-7c35-410a-b879-d77fbb2f6087-S151428/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/28898195-8c23-4edf-91c8-6d567c74e6ea/runs/28ecfe87-27b9-4343-976a-7f6cb8d7fff4/workspace/open/src/hotspot/share/classfile/systemDictionary.cpp:1134), pid=1252023, tid=1252110
      # assert(Atomic::add(&ik->_shared_class_load_count, 1) == 1) failed: shared class loaded more than once
      #
      # JRE version: Java(TM) SE Runtime Environment (24.0+12) (fastdebug build 24-ea+12-1234)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 24-ea+12-1234, compiled mode, sharing, tiered, compressed class ptrs, z gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x1798684] SystemDictionary::load_shared_class(InstanceKlass*, Handle, Handle, ClassFileStream const*, PackageEntry*, JavaThread*)+0x214
      #
      # 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/a4a7850a-7c35-410a-b879-d77fbb2f6087-S14872/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5d77ce6c-0689-4d80-8a03-08c1c1dfaafc/runs/1f79614b-b903-440c-a083-06a1d7a32053/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_sysdict/scratch/2/core.1252023)
      #
      # An error report file with more information is saved as:
      # /opt/mach5/mesos/work_dir/slaves/a4a7850a-7c35-410a-b879-d77fbb2f6087-S14872/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5d77ce6c-0689-4d80-8a03-08c1c1dfaafc/runs/1f79614b-b903-440c-a083-06a1d7a32053/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_sysdict/scratch/2/hs_err_pid1252023.log
      [54.878s][warning][os] Loading hsdis library failed
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #
      ----------System.err:(6/287)----------
      Java HotSpot(TM) 64-Bit Server VM warning: Option ZGenerational was deprecated in version 23.0 and will likely be removed in a future release.
      Java HotSpot(TM) 64-Bit Server VM warning: Non-generational ZGC is deprecated.
      field = HEIGHT
      field = WEIGHT
      field = rootName
      field = nodeNames
      ----------rerun:(39/8053)*----------


      Here's the crashing thread's stack:

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

      Current thread (0x00007f1d04329570): JavaThread "nsk.sysdict.share.SysDictTest$Worker@7e0a7597" [_thread_in_vm, id=1252110, stack(0x00007f1dad315000,0x00007f1dad415000) (1024K)]

      Stack: [0x00007f1dad315000,0x00007f1dad415000], sp=0x00007f1dad411570, free space=1009k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x1798684] SystemDictionary::load_shared_class(InstanceKlass*, Handle, Handle, ClassFileStream const*, PackageEntry*, JavaThread*)+0x214 (systemDictionary.cpp:1134)
      V [libjvm.so+0x1798d27] SystemDictionary::load_instance_class_impl(Symbol*, Handle, JavaThread*)+0x597 (systemDictionary.cpp:1273)
      V [libjvm.so+0x1796b2c] SystemDictionary::load_instance_class(Symbol*, Handle, JavaThread*)+0x1c (systemDictionary.cpp:1345)
      V [libjvm.so+0x1797544] SystemDictionary::resolve_instance_class_or_null(Symbol*, Handle, Handle, JavaThread*)+0x8b4 (systemDictionary.cpp:704)
      V [libjvm.so+0x1797c72] SystemDictionary::resolve_or_fail(Symbol*, Handle, Handle, bool, JavaThread*)+0x22 (systemDictionary.cpp:321)
      V [libjvm.so+0xa4659f] ConstantPool::klass_at_impl(constantPoolHandle const&, int, JavaThread*)+0x18f (constantPool.cpp:599)
      V [libjvm.so+0xae1212] Deoptimization::load_class_by_index(constantPoolHandle const&, int, JavaThread*)+0x172 (constantPool.hpp:381)
      V [libjvm.so+0xae4105] Deoptimization::uncommon_trap_inner(JavaThread*, int)+0x935 (deoptimization.cpp:2240)
      V [libjvm.so+0xae815c] Deoptimization::uncommon_trap(JavaThread*, int, int)+0x1c (deoptimization.cpp:2613)
      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      v ~UncommonTrapBlob 0x00007f1fcbdc7e01
      J 8068 c2 jdk.internal.classfile.impl.SplitConstantPool.interfaceMethodRefEntry(Ljava/lang/classfile/constantpool/ClassEntry;Ljava/lang/classfile/constantpool/NameAndTypeEntry;)Ljava/lang/classfile/constantpool/InterfaceMethodRefEntry; java.base@24-ea (110 bytes) @ 0x00007f1fcc3110bc [0x00007f1fcc310f20+0x000000000000019c]
      J 8063 c1 java.lang.classfile.constantpool.ConstantPoolBuilder.interfaceMethodRefEntry(Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/MethodTypeDesc;)Ljava/lang/classfile/constantpool/InterfaceMethodRefEntry; java.base@24-ea (22 bytes) @ 0x00007f1fc4e81a74 [0x00007f1fc4e817e0+0x0000000000000294]
      J 4688 c2 java.lang.invoke.InvokerBytecodeGenerator$3.accept(Ljava/lang/classfile/CodeBuilder;)V java.base@24-ea (219 bytes) @ 0x00007f1fcc5c5284 [0x00007f1fcc5c5120+0x0000000000000164]
      J 4686 c2 java.lang.invoke.InvokerBytecodeGenerator$3.accept(Ljava/lang/Object;)V java.base@24-ea (9 bytes) @ 0x00007f1fcc5c4ca0 [0x00007f1fcc5c4c40+0x0000000000000060]
      J 4656 c2 jdk.internal.classfile.impl.DirectCodeBuilder.build(Ljdk/internal/classfile/impl/MethodInfo;Ljava/util/function/Consumer;Ljdk/internal/classfile/impl/SplitConstantPool;Ljdk/internal/classfile/impl/ClassFileImpl;Ljava/lang/classfile/CodeModel;)Ljdk/internal/classfile/impl/UnboundAttribute; java.base@24-ea (81 bytes) @ 0x00007f1fcc5bf778 [0x00007f1fcc5bf200+0x0000000000000578]
      J 4652 c2 jdk.internal.classfile.impl.DirectMethodBuilder.withCode(Ljava/util/function/Consumer;)Ljava/lang/classfile/MethodBuilder; java.base@24-ea (7 bytes) @ 0x00007f1fcc5be8b4 [0x00007f1fcc5be860+0x0000000000000054]
      J 4024 c2 java.lang.invoke.InvokerBytecodeGenerator$MethodBody.accept(Ljava/lang/Object;)V java.base@24-ea (9 bytes) @ 0x00007f1fcc558cbc [0x00007f1fcc558c40+0x000000000000007c]
      J 4644 c2 jdk.internal.classfile.impl.DirectClassBuilder.withMethod(Ljava/lang/classfile/constantpool/Utf8Entry;Ljava/lang/classfile/constantpool/Utf8Entry;ILjava/util/function/Consumer;)Ljava/lang/classfile/ClassBuilder; java.base@24-ea (29 bytes) @ 0x00007f1fcc5bdb24 [0x00007f1fcc5bd940+0x00000000000001e4]
      J 3737 c2 java.lang.classfile.ClassBuilder.withMethod(Ljava/lang/String;Ljava/lang/constant/MethodTypeDesc;ILjava/util/function/Consumer;)Ljava/lang/classfile/ClassBuilder; java.base@24-ea (34 bytes) @ 0x00007f1fcc52c7d8 [0x00007f1fcc52c6e0+0x00000000000000f8]
      J 4830 c2 java.lang.invoke.InvokerBytecodeGenerator.clinit(Ljava/lang/classfile/ClassBuilder;Ljava/lang/constant/ClassDesc;Ljava/util/List;)V java.base@24-ea (92 bytes) @ 0x00007f1fcc5ef4c4 [0x00007f1fcc5ef2a0+0x0000000000000224]
      J 4810 c2 java.lang.invoke.InvokerBytecodeGenerator$4.accept(Ljava/lang/classfile/ClassBuilder;)V java.base@24-ea (42 bytes) @ 0x00007f1fcc5e9054 [0x00007f1fcc5e8f20+0x0000000000000134]
      J 3722 c2 java.lang.invoke.InvokerBytecodeGenerator$4.accept(Ljava/lang/Object;)V java.base@24-ea (9 bytes) @ 0x00007f1fcc52ad20 [0x00007f1fcc52acc0+0x0000000000000060]
      J 4806 c2 java.lang.invoke.InvokerBytecodeGenerator$2.accept(Ljava/lang/classfile/ClassBuilder;)V java.base@24-ea (72 bytes) @ 0x00007f1fcc5e8434 [0x00007f1fcc5e7fe0+0x0000000000000454]
      J 3671 c2 java.lang.invoke.InvokerBytecodeGenerator$2.accept(Ljava/lang/Object;)V java.base@24-ea (9 bytes) @ 0x00007f1fcc5249a0 [0x00007f1fcc524940+0x0000000000000060]
      J 4626 c2 jdk.internal.classfile.impl.ClassFileImpl.build(Ljava/lang/classfile/constantpool/ClassEntry;Ljava/lang/classfile/constantpool/ConstantPoolBuilder;Ljava/util/function/Consumer;)[B java.base@24-ea (38 bytes) @ 0x00007f1fcc5bbd68 [0x00007f1fcc5bba00+0x0000000000000368]
      J 4618 c2 java.lang.classfile.ClassFile.build(Ljava/lang/constant/ClassDesc;Ljava/util/function/Consumer;)[B java.base@24-ea (20 bytes) @ 0x00007f1fcc5ba2c0 [0x00007f1fcc5ba060+0x0000000000000260]
      J 4746 c2 java.lang.invoke.InvokerBytecodeGenerator.generateCustomizedCode(Ljava/lang/invoke/LambdaForm;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MemberName; java.base@24-ea (34 bytes) @ 0x00007f1fcc5deec4 [0x00007f1fcc5ded00+0x00000000000001c4]
      J 4510 c2 java.lang.invoke.LambdaForm.compileToBytecode()V java.base@24-ea (164 bytes) @ 0x00007f1fcc5a1ce0 [0x00007f1fcc5a1c60+0x0000000000000080]
      J 8058 c2 java.lang.invoke.LambdaForm.customize(Ljava/lang/invoke/MethodHandle;)Ljava/lang/invoke/LambdaForm; java.base@24-ea (59 bytes) @ 0x00007f1fcc4cccd8 [0x00007f1fcc4ccc40+0x0000000000000098]
      J 8056 c2 java.lang.invoke.MethodHandle$1.apply(Ljava/lang/Object;)Ljava/lang/Object; java.base@24-ea (9 bytes) @ 0x00007f1fcc39f690 [0x00007f1fcc39f640+0x0000000000000050]
      J 7911 c2 java.lang.invoke.MethodHandle.updateForm(Ljava/util/function/Function;)V java.base@24-ea (105 bytes) @ 0x00007f1fcc7fceb4 [0x00007f1fcc7fce40+0x0000000000000074]
      J 8064 c2 java.lang.invoke.MethodHandle.maybeCustomize()V java.base@24-ea (38 bytes) @ 0x00007f1fcc3adf08 [0x00007f1fcc3ade40+0x00000000000000c8]
      J 5081 c2 java.lang.invoke.Invokers.maybeCustomize(Ljava/lang/invoke/MethodHandle;)V java.base@24-ea (5 bytes) @ 0x00007f1fcc627f44 [0x00007f1fcc627f20+0x0000000000000024]
      J 5830 c2 java.lang.invoke.Invokers.checkCustomized(Ljava/lang/invoke/MethodHandle;)V java.base@24-ea (23 bytes) @ 0x00007f1fcc6bb120 [0x00007f1fcc6bb0c0+0x0000000000000060]
      J 7882 c2 java.lang.invoke.LambdaForm$MH+0x00007f1d3f0be800.invoke_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;JJJLjava/lang/Object;Ljava/lang/Object;)I java.base@24-ea (34 bytes) @ 0x00007f1fcc7fa38c [0x00007f1fcc7fa300+0x000000000000008c]
      J 8034 c2 nsk.share.gc.gp.GarbageUtils.eatMemory(Lnsk/share/test/ExecutionController;Lnsk/share/gc/gp/GarbageProducer;JJJLnsk/share/gc/gp/GarbageUtils$OOM_TYPE;)I (40 bytes) @ 0x00007f1fcc360c20 [0x00007f1fcc360bc0+0x0000000000000060]
      J 8038 c2 nsk.sysdict.share.SysDictTest$Worker.run()V (152 bytes) @ 0x00007f1fcc3ed150 [0x00007f1fcc3ed080+0x00000000000000d0]
      J 7615 c2 nsk.share.runner.ThreadsRunner$ManagedThread.run()V (180 bytes) @ 0x00007f1fcc7dc574 [0x00007f1fcc7dc2c0+0x00000000000002b4]
      J 1511 c2 java.lang.Thread.run()V java.base@24-ea (23 bytes) @ 0x00007f1fcc3de7e0 [0x00007f1fcc3de740+0x00000000000000a0]
      v ~StubRoutines::call_stub 0x00007f1fcbd6bcfa

            matsaave Matias Saavedra Silva
            dcubed Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: