ZGC: SoftReferences not always cleared before throwing OOME

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 11
    • Affects Version/s: 11
    • Component/s: hotspot
    • gc
    • b19
    • x86
    • linux

        The spec says "All soft references to softly-reachable objects are guaranteed to have been cleared before the virtual machine throws an OutOfMemoryError".

        We currently have a window/race in ZGC, where we can throw OOME before clearing all SoftReferences with a softly-reachable referent. The reason is that the current logic only guarantees that we wait with throwing OOME until the allocating thread have been part of a complete GC cycle, but there no guarantee that the last GC cycle also cleared SoftReferences.

              Assignee:
              Per Liden (Inactive)
              Reporter:
              Per Liden (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: