Parallel GC: Waiting on ExpandHeap_lock may cause "expansion storm"

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 17
    • Affects Version/s: 17
    • Component/s: hotspot
    • gc
    • b10

      When expanding the old gen heap during young gc, that section of code is guarded by the ExpandHeap_lock. If multiple threads are out of memory (i.e. old gen PLAB), they will queue up on that lock.

      Since the threads after the first getting the ExpandHeap_lock do not retry the allocation, they will blindly expand the heap again, ultimately causing a "heap expansion storm".

      This not only takes lots of time, but also expands the heap unnecessarily.

            Assignee:
            Kim Barrett
            Reporter:
            Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: