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

Shenandoah: VMThread may become unable to complete safepoint synchronization

    XMLWordPrintable

Details

    • gc

    Description

      This issue was reported to the mailing list: https://mail.openjdk.org/pipermail/shenandoah-dev/2024-January/021138.html

      The interesting stack traces here are:

      The deadlock detector is requesting a safepoint operation:
      ```
      #4 0x00007f973aa0d5da in VMThread::wait_until_executed(VM_Operation*) () from /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.x86_64/lib/server/libjvm.so
      #5 0x00007f973aa0dd23 in VMThread::execute(VM_Operation*) () from /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.x86_64/lib/server/libjvm.so
      #6 0x00007f973a664e3a in find_deadlocks(bool, JavaThread*) () from /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.x86_64/lib/server/libjvm.so
      #7 0x00007f973a665117 in jmm_FindDeadlockedThreads () from /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.x86_64/lib/server/libjvm.so
      ```

      The VM thread is iteratively waiting for threads to reach the safepoint (so, more of a "live" lock situation):
      ```
      #2 0x00007f973a738649 in os::naked_short_sleep(long) () from /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.x86_64/lib/server/libjvm.so
      #3 0x00007f973a7de4fa in SafepointSynchronize::synchronize_threads(long, int, int*) () from /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.x86_64/lib/server/libjvm.so
      #4 0x00007f973a7df5c4 in SafepointSynchronize::begin() () from /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.x86_64/lib/server/libjvm.so
      #5 0x00007f973aa0dae5 in VMThread::inner_execute(VM_Operation*) () from /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.x86_64/lib/server/libjvm.so
      #6 0x00007f973aa0de37 in VMThread::run() () from /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.x86_64/lib/server/libjvm.so
      ```

      There is a Shenandoah worker thread trying to join the safepoint:
      ```
      #3 0x00007f973a6e55cd in Monitor::wait_without_safepoint_check(long) () from /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.x86_64/lib/server/libjvm.so
      #4 0x00007f973a91b91a in SuspendibleThreadSet::join() () from /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.x86_64/lib/server/libjvm.so
      #5 0x00007f973a833530 in ShenandoahConcurrentWeakRootsEvacUpdateTask::work(unsigned int) () from /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.x86_64/lib/server/libjvm.so
      #6 0x00007f973aa3d321 in GangWorker::loop() () from /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.x86_64/lib/server/libjvm.so
      #7 0x00007f973aa3d382 in GangWorker::run() () from /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.x86_64/lib/server/libjvm.so
      ```

      Attachments

        Issue Links

          Activity

            People

              wkemper William Kemper
              wkemper William Kemper
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: