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

NMethodSweeper::sweep_code_cache cause severe delays

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 12
    • 12
    • hotspot
    • gc
    • b19

      The method can block for several seconds on acquiring the CodeCache_lock.
      Since this is done without safepoint checks the thread is stuck with state _thread_in_vm for this period and any handshake or safepoint cannot continue. For safepoint this don't seem to bad, since the VM thread also tries to stop competing threads, but for a handshake, where a thread when finished it's handshake can continue to interfere will this lock, it's really bad.

      The delay can be seem with e.g:
      -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:HandshakeTimeout=5000 running RunThese30M
      Yes that is 5 seconds timeout on the handshake.

            rehn Robbin Ehn
            rehn Robbin Ehn
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: