NMethodSweeper::sweep_code_cache cause severe delays

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 12
    • Affects Version/s: 12
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: