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

Shenandoah should acquire CodeCache_lock without safepoint check

XMLWordPrintable

    • gc
    • b09

      JDK-8229000 enabled the strong assert in Monitor::check_safepoint_state: it would fail when some locks are acquired with safepoint checks. There is such a lock in Shenandoah on a very common path. CodeCache_lock is defined with Monitor::_safepoint_check_never, should be acquired without safepoint check. New stronger assert fails because of that:

       # Internal Error (/home/shade/trunks/jdk-jdk/src/hotspot/share/runtime/mutex.cpp:46), pid=27699, tid=27790
       # assert(thread->is_Java_thread() || !do_safepoint_check || _safepoint_check_required != Monitor::_safepoint_check_never) failed: NonJavaThread should not check for safepoint

       V [libjvm.so+0xff3399] Monitor::check_safepoint_state(Thread*, bool)+0x119
       V [libjvm.so+0xff33f1] Monitor::lock(Thread*)+0x29
       V [libjvm.so+0xff35fb] Monitor::lock()+0x23
       V [libjvm.so+0x119d62c] ShenandoahCodeRootsIterator::ShenandoahCodeRootsIterator()+0x10e

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: