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

compiler/codecache/stress/RandomAllocationTest.java crashes with assert(max_capacity >= unallocated_capacity) failed

      compiler/codecache/stress/RandomAllocationTest.java crashes with the following assert:

      # after -XX: or in .hotspotrc: SuppressErrorAt=/codeCache.cpp:905
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/opt/mach5/mesos/work_dir/slaves/a2dc162d-743b-4800-9e92-31f85abb45b1-S153546/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/33002f47-7da5-408e-8e9a-6b4c7a5df8ec/runs/8c27fdf3-2e76-4351-af81-4da80436ff65/workspace/open/src/hotspot/share/code/codeCache.cpp:905), pid=926528, tid=926560
      # assert(max_capacity >= unallocated_capacity) failed: Must be
      #
      # JRE version: Java(TM) SE Runtime Environment (19.0+5) (fastdebug build 19-ea+5-169)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 19-ea+5-169, mixed mode, sharing, tiered, compressed class ptrs, z gc, linux-aarch64)
      # Problematic frame:
      # V [libjvm.so+0xa00b3c] CodeCache::reverse_free_ratio(int)+0x8c

      Stack trace:

      Stack: [0x0000fffd685c0000,0x0000fffd687c0000], sp=0x0000fffd687bd560, free space=2037k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xa00b3c] CodeCache::reverse_free_ratio(int)+0x8c
      V [libjvm.so+0xa284d4] LoopPredicate::apply(int, int, CompLevel, methodHandle const&) [clone .isra.0]+0x264
      V [libjvm.so+0xa29118] CompLevel CompilationPolicy::common<LoopPredicate>(methodHandle const&, CompLevel, bool)+0x148
      V [libjvm.so+0xa25e98] CompilationPolicy::call_event(methodHandle const&, CompLevel, Thread*)+0x38
      V [libjvm.so+0xa26e74] CompilationPolicy::event(methodHandle const&, methodHandle const&, int, int, CompLevel, CompiledMethod*, JavaThread*)+0x204
      V [libjvm.so+0xeb6f1c] InterpreterRuntime::frequency_counter_overflow_inner(JavaThread*, unsigned char*)+0x14c
      V [libjvm.so+0xeb708c] InterpreterRuntime::frequency_counter_overflow(JavaThread*, unsigned char*)+0x1c
      j compiler.codecache.stress.TestCaseImpl.method()I+0
      j compiler.codecache.stress.TestCaseImpl.method()I+24
      j compiler.codecache.stress.TestCaseImpl.method()I+24
      j compiler.codecache.stress.TestCaseImpl.method()I+24
      j compiler.codecache.stress.TestCaseImpl.method()I+24
      j compiler.codecache.stress.TestCaseImpl.method()I+24
      j compiler.codecache.stress.TestCaseImpl.method()I+24
      j compiler.codecache.stress.TestCaseImpl.method()I+24
      j compiler.codecache.stress.TestCaseImpl.lambda$getCallable$0()Ljava/lang/Integer;+6
      j compiler.codecache.stress.TestCaseImpl$$Lambda$43+0x0000000800c05a40.call()Ljava/lang/Object;+4
      j compiler.codecache.stress.Helper.callMethod(Ljava/util/concurrent/Callable;I)I+14
      j compiler.codecache.stress.CodeCacheStressRunner.test()Z+16
      j compiler.codecache.stress.CodeCacheStressRunner$$Lambda$42+0x0000000800c06230.call()Ljava/lang/Object;+4
      j jdk.test.lib.TimeLimitedRunner.call()Ljava/lang/Void;+30
      j compiler.codecache.stress.CodeCacheStressRunner.runTest()V+26
      j compiler.codecache.stress.RandomAllocationTest.main([Ljava/lang/String;)V+14
      j java.lang.invoke.LambdaForm$DMH+0x0000000800c02c00.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;)V+10 java.base@19-ea
      j java.lang.invoke.LambdaForm$MH+0x0000000800c05000.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+33 java.base@19-ea
      j java.lang.invoke.Invokers$Holder.invokeExact_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+20 java.base@19-ea
      j jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+55 java.base@19-ea
      j jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+23 java.base@19-ea
      j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base@19-ea

          [JDK-8279705] compiler/codecache/stress/RandomAllocationTest.java crashes with assert(max_capacity >= unallocated_capacity) failed

          I'm not able to reproduce this after several thousand runs with the same build. It's also not clear how this can happen and the code will be modified by JDK-8271008.

          Closing as Cannot Reproduce for now. Please re-open if this shows up again.

          Tobias Hartmann added a comment - I'm not able to reproduce this after several thousand runs with the same build. It's also not clear how this can happen and the code will be modified by JDK-8271008 . Closing as Cannot Reproduce for now. Please re-open if this shows up again.

          Dean Long added a comment -
          The assert looks like a non-fatal situation for a product build.

          ILW = assert in stress test, 1 time only, no workaround = MMH = P3

          Dean Long added a comment - The assert looks like a non-fatal situation for a product build. ILW = assert in stress test, 1 time only, no workaround = MMH = P3

          Dean Long added a comment -
          Looking at the failure history, this assert has happened one time on aarch64.

          Dean Long added a comment - Looking at the failure history, this assert has happened one time on aarch64.

            thartmann Tobias Hartmann
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: