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

Shenandoah: Stricter placement for oom-evac scopes

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8-shenandoah, 11-shenandoah, 14, 15
    • Fix Version/s: 15
    • Component/s: hotspot
    • Subcomponent:
      gc
    • Resolved In Build:
      b05
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Currently, we have sprinkled OOM-evac scopes all over the place:
        - In the main evac-loop (of course)
        - In the LRB (of course)
        - In various places

        The latter is very questionable and has repeatedly lead to problems in the past. The trouble was usually that some weird path would dive into evacuation with a GC worker, although the oom-scope was already held at an outer scope. It becomes really bad when locks are involved, e.g. the heap-lock, code-cache-lock and recently the per-nmethod locks. This is very deadlock-prone.

        The way out is to be very strict about where we place the oom-scopes. They should *only* be very close to SH::evacuate_object(), and they should *always* be the innermost scopes, inside any possible locks. Placement must be such that both conditions are rather obviously met.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rkennke Roman Kennke
                  Reporter:
                  rkennke Roman Kennke
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: