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

Shenandoah: JFR crashes during class unloading

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 24
    • hotspot
    • gc

      While testing JDK-8279016, I caught a surprising failure here. It reproduces more or less reliably on current mainline:

      % CONF=linux-aarch64-server-fastdebug make test TEST=jdk/jfr/event/oldobject/TestMetadataRetention.java TEST_VM_OPTS="-XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive" JTREG=REPEAT_COUNT=1000

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x0000ffff9c657e64, pid=42887, tid=42956
      #
      # JRE version: OpenJDK Runtime Environment (24.0) (fastdebug build 24-internal-adhoc.shipilev.shipilev-jdk)
      # Java VM: OpenJDK 64-Bit Server VM (fastdebug 24-internal-adhoc.shipilev.shipilev-jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, shenandoah gc, linux-aarch64)
      # Problematic frame:
      # V [libjvm.so+0x1730e64] ObjectSynchronizer::FastHashCode(Thread*, oop)+0x3a0
      #
      # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
      #
      # JFR recording file will be written. Location: /local/home/shipilev/shipilev-jdk/build/linux-aarch64-server-fastdebug/test-support/jtreg_test_jdk_jdk_jfr_event_oldobject_TestMetadataRetention_java/scratch/0/hs_err_pid42887.jfr
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #

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

      Current thread (0x0000ffff941588c0): ConcurrentGCThread "Shenandoah Control Thread" [id=42956, stack(0x0000fffea0aed000,0x0000fffea0ceb000) (2040K)]

      Stack: [0x0000fffea0aed000,0x0000fffea0ceb000], sp=0x0000fffea0ce8bd0, free space=2030k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x1730e64] ObjectSynchronizer::FastHashCode(Thread*, oop)+0x3a0 (atomic.hpp:552)
      V [libjvm.so+0x1378ff8] oopDesc::slow_identity_hash()+0x4c (oop.cpp:110)
      V [libjvm.so+0xea60d0] JfrSymbolTable::hidden_klass_name_hash(InstanceKlass const*)+0xd0 (oop.inline.hpp:366)
      V [libjvm.so+0xea778c] JfrSymbolTable::mark_hidden_klass_name(InstanceKlass const*, bool)+0x68 (jfrSymbolTable.cpp:281)
      V [libjvm.so+0xea7c3c] JfrSymbolTable::mark(Klass const*, bool)+0x118 (jfrSymbolTable.cpp:291)
      V [libjvm.so+0xed0938] write_klass(JfrCheckpointWriter*, Klass const*, bool, int&)+0xd8 (jfrTypeSet.cpp:104)
      V [libjvm.so+0xed5610] JfrArtifactCallbackHost<Klass const*, CompositeFunctor<Klass const*, JfrTypeWriterHost<JfrPredicatedTypeWriterImplHost<Klass const*, SerializePredicate<Klass const*>, &(write__klass(JfrCheckpointWriter*, void const*))>, 181u>, KlassArtifactRegistrator> >::do_artifact(void const*)+0x90 (jfrTypeSet.cpp:398)
      V [libjvm.so+0x8e7b58] ClassLoaderData::classes_do(void (*)(Klass*))+0x30 (classLoaderData.cpp:395)
      V [libjvm.so+0x9057cc] ClassUnloadingContext::classes_unloading_do(void (*)(Klass*))+0x6c (classUnloadingContext.cpp:92)
      V [libjvm.so+0xed3654] JfrTypeSet::serialize(JfrCheckpointWriter*, JfrCheckpointWriter*, bool, bool)+0xcb4 (jfrTypeSet.cpp:556)
      V [libjvm.so+0xdfcad8] JfrCheckpointManager::on_unloading_classes()+0x58 (jfrCheckpointManager.cpp:631)
      V [libjvm.so+0x1739bb4] SystemDictionary::do_unloading(GCTimer*)+0x2ec (systemDictionary.cpp:1553)
      V [libjvm.so+0x163aef0] ShenandoahUnload::unload()+0xe8 (shenandoahUnload.cpp:152)
      V [libjvm.so+0x15829e4] ShenandoahConcurrentGC::entry_class_unloading()+0xc4 (shenandoahConcurrentGC.cpp:410)
      V [libjvm.so+0x1583a78] ShenandoahConcurrentGC::collect(GCCause::Cause)+0x288 (shenandoahConcurrentGC.cpp:161)
      V [libjvm.so+0x158c4e4] ShenandoahControlThread::service_concurrent_normal_cycle(GCCause::Cause)+0xb8 (shenandoahControlThread.cpp:320)
      V [libjvm.so+0x158d1e0] ShenandoahControlThread::run_service()+0x860 (shenandoahControlThread.cpp:154)
      V [libjvm.so+0x9a8ea8] ConcurrentGCThread::run()+0x28 (concurrentGCThread.cpp:48)
      V [libjvm.so+0x177c400] Thread::call_run()+0x120 (thread.cpp:225)
      V [libjvm.so+0x13adbec] thread_native_entry(Thread*)+0x12c (os_linux.cpp:858)
      C [libpthread.so.0+0x7230] start_thread+0xb0

      siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0xbaadbabebaadbabc

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: