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

Shenandoah crash in markWord::displaced_mark_helper on class unload

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 21
    • hotspot
    • AMD EPYC 9R14, 64 cores, 123G, Amazon Linux release 2023.7.20250609 (Amazon Linux)

    • gc
    • x86_64
    • linux

      Sometimes crashes in ShenandoahUnload::unload with an app that loads/unloads classes.


      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00007ff18be26194, pid=4014354, tid=4014358
      #
      # JRE version: OpenJDK Runtime Environment Corretto-21.0.7.6.1 (21.0.7+6) (build 21.0.7+6-LTS)
      # Java VM: OpenJDK 64-Bit Server VM Corretto-21.0.7.6.1 (21.0.7+6-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, shenandoah gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0xc26194] markWord::displaced_mark_helper() const+0x14
      #
      # Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /home/ec2-user/app/output/core.4014354)
      #
      # JFR recording file will be written. Location: /home/ec2-user/app/output/hs_err_pid4014354.jfr
      #
      # If you would like to submit a bug report, please visit:
      # https://github.com/corretto/corretto-21/issues/
      #

      --------------- S U M M A R Y ------------

      Command Line: -Djava.library.path=/home/ec2-user/app/cache/lib -Djava.security.manager=allow -XX:+UseShenandoahGC -XX:StartFlightRecording=jdk.CPUTimeSample#enabled=true,filename=profile-%p.jfr -XX:ErrorFile=/home/ec2-user/app/output/crash_reports/stress-apps/hs_err_2025-07-08T07:46:44+00:00_ClassLoading_%p.log -Xlog:gc*=info,heap*=info,safepoint=info:file=/home/ec2-user/app/output/logs/run_1751788288/ClassLoading.%p.gc.log -XX:+CrashOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/ec2-user/app/output/run_1751788288/heapdump_2025-07-08T07:46:44+00:00_ClassLoading_%p.hprof -XX:OnError=echo "$(TZ=UTC date -Iseconds) CRASH details in /home/ec2-user/app/output/crash_reports/stress-apps/hs_err_2025-07-08T07:46:44+00:00_ClassLoading_%p.log.bt" >> /home/ec2-user/app/output/progress/jep509-default.21.0.7-amzn.CONT.5.2025-07-06T07:51:27+00:00.log; /home/ec2-user/app/bin/pdbginfo %p > /home/ec2-user/app/output/crash_reports/stress-apps/hs_err_2025-07-08T07:46:44+00:00_ClassLoading_%p.log.bt 2>&1 ClassLoading

      Host: AMD EPYC 9R14, 64 cores, 123G, Amazon Linux release 2023.7.20250609 (Amazon Linux)
      Time: Tue Jul 8 07:55:14 2025 UTC elapsed time: 13.666699 seconds (0d 0h 0m 13s)

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

      Current thread (0x00007ff18417fa90): ConcurrentGCThread "Shenandoah Control Thread" [id=4014358, stack(0x00007ff1887df000,0x00007ff1888df000) (1024K)]

      Stack: [0x00007ff1887df000,0x00007ff1888df000], sp=0x00007ff1888dcef8, free space=1015k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xc26194] markWord::displaced_mark_helper() const+0x14
      V [libjvm.so+0xf381f5] ObjectSynchronizer::FastHashCode(Thread*, oopDesc*)+0x155
      V [libjvm.so+0x989430] JfrSymbolTable::mark_hidden_klass_name(InstanceKlass const*, bool)+0x170
      V [libjvm.so+0x9a3109] write_klass(JfrCheckpointWriter*, Klass const*, bool)+0x1b9
      V [libjvm.so+0x9abd14] JfrArtifactCallbackHost<Klass const*, CompositeFunctor<Klass const*, JfrTypeWriterHost<JfrPredicatedTypeWriterImplHost<Klass const*, SerializePredicate<Klass const*>, &(write__klass(JfrCheckpointWriter*, void const*))>, 178u>, KlassArtifactRegistrator> >::do_artifact(void const*)+0x84
      V [libjvm.so+0x99ff5f] do_unloading_klass(Klass*)+0x2f
      V [libjvm.so+0x63081e] ClassLoaderData::classes_do(void (*)(Klass*))+0x1e
      V [libjvm.so+0x63da83] ClassUnloadingContext::classes_unloading_do(void (*)(Klass*))+0x23
      V [libjvm.so+0x9a2e9c] do_klasses()+0x12c
      V [libjvm.so+0x9a95c4] JfrTypeSet::serialize(JfrCheckpointWriter*, JfrCheckpointWriter*, bool, bool)+0x724
      V [libjvm.so+0x9300ca] JfrCheckpointManager::on_unloading_classes()+0x3a
      V [libjvm.so+0xf3e0c9] SystemDictionary::do_unloading(GCTimer*)+0x199
      V [libjvm.so+0xe73be7] ShenandoahUnload::unload()+0x97
      V [libjvm.so+0xe01e68] ShenandoahConcurrentGC::entry_class_unloading()+0xc8
      V [libjvm.so+0xe03846] ShenandoahConcurrentGC::collect(GCCause::Cause)+0x266
      V [libjvm.so+0xe08f4a] ShenandoahControlThread::service_concurrent_normal_cycle(GCCause::Cause)+0xba
      V [libjvm.so+0xe096d7] ShenandoahControlThread::run_service()+0x5d7
      V [libjvm.so+0x6a692c] ConcurrentGCThread::run()+0x1c
      V [libjvm.so+0xf8d1ef] Thread::call_run()+0x9f
      V [libjvm.so+0xcf5e9a] thread_native_entry(Thread*)+0xda

            Unassigned Unassigned
            krk Kerem Kat
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: