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

[GenShen] assert(_heap->cancelled_gc()) failed: GC should already be cancelled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 26
    • hotspot
    • gc

      The test gc/stress/gcold/TestGCOldWithShenandoah.java#generational has run into the assertion "assert(_heap->cancelled_gc()) failed: GC should already be cancelled". It was running on a 64 thread Power10 machine and Compact Object Headers were enabled.

      Stack: [0x00007ffe84800000,0x00007ffe84a00000], sp=0x00007ffe849fcf30, free space=2035k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x1b0afb0] ShenandoahGenerationalControlThread::notify_cancellation(MonitorLocker&, GCCause::Cause)+0x150 (shenandoahGenerationalControlThread.cpp:708)
      V [libjvm.so+0x1b0b0b0] ShenandoahGenerationalControlThread::request_gc(GCCause::Cause)+0x70 (shenandoahGenerationalControlThread.cpp:704)
      V [libjvm.so+0x1ac19f8] ShenandoahController::handle_alloc_failure(ShenandoahAllocRequest const&, bool)+0x178 (shenandoahController.cpp:50)
      V [libjvm.so+0x1b5ede0] ShenandoahHeap::allocate_memory(ShenandoahAllocRequest&)+0x4c0 (shenandoahHeap.cpp:1001)
      V [libjvm.so+0x1b5f20c] ShenandoahHeap::mem_allocate(unsigned long)+0x4c (shenandoahHeap.cpp:1099)
      V [libjvm.so+0x161f2cc] MemAllocator::mem_allocate(MemAllocator::Allocation&) const+0x11c (memAllocator.cpp:236)
      V [libjvm.so+0x161f490] MemAllocator::allocate() const+0xd0 (memAllocator.cpp:353)
      V [libjvm.so+0x1eb0ffc] TypeArrayKlass::allocate_common(int, bool, JavaThread*)+0x1ec (collectedHeap.inline.hpp:41)
      V [libjvm.so+0x17c20e0] oopFactory::new_typeArray(BasicType, int, JavaThread*)+0x50 (typeArrayKlass.hpp:51)
      V [libjvm.so+0x19cc3a8] OptoRuntime::new_array_C(Klass*, int, JavaThread*)+0x118 (runtime.cpp:373)
      v ~RuntimeStub::C2 Runtime new_array_blob 0x00007fff9f847938
      J 316 c2 gc.stress.gcold.TestGCOld.doYoungGenAlloc(JI)V (41 bytes) @ 0x00007fffa0039330 [0x00007fffa0039100+0x0000000000000230]
      J 322 c1 gc.stress.gcold.TestGCOld.doStep(J)V (41 bytes) @ 0x00007fff9846a6f4 [0x00007fff9846a640+0x00000000000000b4]
      j gc.stress.gcold.TestGCOld.main([Ljava/lang/String;)V+205
      j java.lang.invoke.LambdaForm$DMH+0x000000d201042400.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;)V+10 java.base@26-internal
      j java.lang.invoke.LambdaForm$MH+0x000000d201044000.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+33 java.base@26-internal
      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@26-internal
      j jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+55 java.base@26-internal
      j jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+23 java.base@26-internal
      j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base@26-internal
      j com.sun.javatest.regtest.agent.MainWrapper$MainTask.run()V+134
      j java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@26-internal
      j java.lang.Thread.run()V+19 java.base@26-internal
      v ~StubRoutines::Stub Generator call_stub_stub 0x00007fff9f7c0b44
      V [libjvm.so+0x10751ec] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x56c (javaCalls.cpp:415)
      V [libjvm.so+0x17fa50c] os::os_exception_wrapper(void (*)(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*), JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x3c (os_linux.cpp:4921)
      V [libjvm.so+0x107599c] JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x36c (javaCalls.cpp:323)
      V [libjvm.so+0x1076078] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, JavaThread*)+0xd8 (javaCalls.cpp:185)
      V [libjvm.so+0x12a0518] thread_entry(JavaThread*, JavaThread*)+0x108 (jvm.cpp:2742)
      V [libjvm.so+0x10d1c9c] JavaThread::thread_main_inner()+0x17c (javaThread.cpp:775)
      V [libjvm.so+0x1e44190] Thread::call_run()+0xe0 (thread.cpp:243)
      V [libjvm.so+0x17fe098] thread_native_entry(Thread*)+0x178 (os_linux.cpp:898)
      C [libc.so.6+0xb2014] start_thread+0x184
      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      v ~RuntimeStub::C2 Runtime new_array_blob 0x00007fff9f847938
      J 316 c2 gc.stress.gcold.TestGCOld.doYoungGenAlloc(JI)V (41 bytes) @ 0x00007fffa0039330 [0x00007fffa0039100+0x0000000000000230]
      J 322 c1 gc.stress.gcold.TestGCOld.doStep(J)V (41 bytes) @ 0x00007fff9846a6f4 [0x00007fff9846a640+0x00000000000000b4]
      j gc.stress.gcold.TestGCOld.main([Ljava/lang/String;)V+205
      j java.lang.invoke.LambdaForm$DMH+0x000000d201042400.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;)V+10 java.base@26-internal
      j java.lang.invoke.LambdaForm$MH+0x000000d201044000.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+33 java.base@26-internal
      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@26-internal
      j jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+55 java.base@26-internal
      j jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+23 java.base@26-internal
      j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base@26-internal
      j com.sun.javatest.regtest.agent.MainWrapper$MainTask.run()V+134
      j java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@26-internal
      j java.lang.Thread.run()V+19 java.base@26-internal
      v ~StubRoutines::Stub Generator call_stub_stub 0x00007fff9f7c0b44

      ...
      Event: 91.678 {heap After GC invocations=17 (full 1):
       Generational Shenandoah Heap
        Young:
         341M max, 22013K used
        Old:
         44032K max, 41951K used
        Entire heap:
         384M soft max, 384M committed
         1536 x 256K regions
       Status: old marking, not cancelled
       Reserved region:
        - [0x00000000e8000000, 0x0000000100000000)
       Collection set:
        - map (vanilla): 0x0000000000013a00
        - map (biased): 0x0000000000010000

      }
      Event: 91.685 {heap Before GC invocations=17 (full 1):
       Generational Shenandoah Heap
        Young:
         341M max, 38141K used
        Old:
         44032K max, 41951K used
        Entire heap:
         384M soft max, 384M committed
         1536 x 256K regions
       Status: old marking, not cancelled
       Reserved region:
        - [0x00000000e8000000, 0x0000000100000000)
       Collection set:
        - map (vanilla): 0x0000000000013a00
        - map (biased): 0x0000000000010000

      }
      Event: 91.803 {heap After GC invocations=18 (full 1):
       Generational Shenandoah Heap
        Young:
         341M max, 323M used
        Old:
         44032K max, 41951K used
        Entire heap:
         384M soft max, 384M committed
         1536 x 256K regions
       Status: old marking, cancelled
       Reserved region:
        - [0x00000000e8000000, 0x0000000100000000)
       Collection set:
        - map (vanilla): 0x0000000000013a00
        - map (biased): 0x0000000000010000

      }
      Event: 91.803 {heap Before GC invocations=18 (full 1):
       Generational Shenandoah Heap
        Young:
         341M max, 323M used
        Old:
         44032K max, 41951K used
        Entire heap:
         384M soft max, 384M committed
         1536 x 256K regions
       Status: old marking, not cancelled
       Reserved region:
        - [0x00000000e8000000, 0x0000000100000000)
       Collection set:
        - map (vanilla): 0x0000000000013a00
        - map (biased): 0x0000000000010000

      }

            wkemper William Kemper
            mdoerr Martin Doerr
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: